Jan Glauber | 779e6e1 | 2008-07-17 17:16:48 +0200 | [diff] [blame] | 1 | /* |
| 2 | * drivers/s390/cio/qdio_perf.h |
| 3 | * |
| 4 | * Copyright IBM Corp. 2008 |
| 5 | * |
| 6 | * Author: Jan Glauber (jang@linux.vnet.ibm.com) |
| 7 | */ |
| 8 | #ifndef QDIO_PERF_H |
| 9 | #define QDIO_PERF_H |
| 10 | |
| 11 | #include <linux/types.h> |
Jan Glauber | 779e6e1 | 2008-07-17 17:16:48 +0200 | [diff] [blame] | 12 | #include <asm/atomic.h> |
| 13 | |
| 14 | struct qdio_perf_stats { |
| 15 | /* interrupt handler calls */ |
| 16 | atomic_long_t qdio_int; |
| 17 | atomic_long_t pci_int; |
| 18 | atomic_long_t thin_int; |
| 19 | |
| 20 | /* tasklet runs */ |
| 21 | atomic_long_t tasklet_inbound; |
| 22 | atomic_long_t tasklet_outbound; |
| 23 | atomic_long_t tasklet_thinint; |
| 24 | atomic_long_t tasklet_thinint_loop; |
| 25 | atomic_long_t thinint_inbound; |
| 26 | atomic_long_t thinint_inbound_loop; |
| 27 | atomic_long_t thinint_inbound_loop2; |
| 28 | |
| 29 | /* signal adapter calls */ |
| 30 | atomic_long_t siga_out; |
| 31 | atomic_long_t siga_in; |
| 32 | atomic_long_t siga_sync; |
| 33 | |
| 34 | /* misc */ |
| 35 | atomic_long_t inbound_handler; |
| 36 | atomic_long_t outbound_handler; |
| 37 | atomic_long_t fast_requeue; |
Jan Glauber | 50f769d | 2008-12-25 13:38:47 +0100 | [diff] [blame] | 38 | atomic_long_t outbound_target_full; |
Jan Glauber | 779e6e1 | 2008-07-17 17:16:48 +0200 | [diff] [blame] | 39 | |
| 40 | /* for debugging */ |
| 41 | atomic_long_t debug_tl_out_timer; |
| 42 | atomic_long_t debug_stop_polling; |
Jan Glauber | 23589d0 | 2008-12-25 13:38:44 +0100 | [diff] [blame] | 43 | atomic_long_t debug_eqbs_all; |
| 44 | atomic_long_t debug_eqbs_incomplete; |
| 45 | atomic_long_t debug_sqbs_all; |
| 46 | atomic_long_t debug_sqbs_incomplete; |
Jan Glauber | 779e6e1 | 2008-07-17 17:16:48 +0200 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | extern struct qdio_perf_stats perf_stats; |
| 50 | extern int qdio_performance_stats; |
| 51 | |
Jan Glauber | a7c65a5 | 2009-06-12 10:26:29 +0200 | [diff] [blame] | 52 | static inline void qdio_perf_stat_inc(atomic_long_t *count) |
| 53 | { |
| 54 | if (qdio_performance_stats) |
| 55 | atomic_long_inc(count); |
| 56 | } |
| 57 | |
Jan Glauber | 779e6e1 | 2008-07-17 17:16:48 +0200 | [diff] [blame] | 58 | int qdio_setup_perf_stats(void); |
| 59 | void qdio_remove_perf_stats(void); |
| 60 | |
Jan Glauber | 779e6e1 | 2008-07-17 17:16:48 +0200 | [diff] [blame] | 61 | #endif |