blob: 7821ac4fa51759196f6dbdc0bf56045aef9140aa [file] [log] [blame]
Jan Glauber779e6e12008-07-17 17:16:48 +02001/*
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>
12#include <linux/device.h>
13#include <asm/atomic.h>
14
15struct qdio_perf_stats {
16 /* interrupt handler calls */
17 atomic_long_t qdio_int;
18 atomic_long_t pci_int;
19 atomic_long_t thin_int;
20
21 /* tasklet runs */
22 atomic_long_t tasklet_inbound;
23 atomic_long_t tasklet_outbound;
24 atomic_long_t tasklet_thinint;
25 atomic_long_t tasklet_thinint_loop;
26 atomic_long_t thinint_inbound;
27 atomic_long_t thinint_inbound_loop;
28 atomic_long_t thinint_inbound_loop2;
29
30 /* signal adapter calls */
31 atomic_long_t siga_out;
32 atomic_long_t siga_in;
33 atomic_long_t siga_sync;
34
35 /* misc */
36 atomic_long_t inbound_handler;
37 atomic_long_t outbound_handler;
38 atomic_long_t fast_requeue;
Jan Glauber50f769d2008-12-25 13:38:47 +010039 atomic_long_t outbound_target_full;
Jan Glauber779e6e12008-07-17 17:16:48 +020040
41 /* for debugging */
42 atomic_long_t debug_tl_out_timer;
43 atomic_long_t debug_stop_polling;
Jan Glauber23589d02008-12-25 13:38:44 +010044 atomic_long_t debug_eqbs_all;
45 atomic_long_t debug_eqbs_incomplete;
46 atomic_long_t debug_sqbs_all;
47 atomic_long_t debug_sqbs_incomplete;
Jan Glauber779e6e12008-07-17 17:16:48 +020048};
49
50extern struct qdio_perf_stats perf_stats;
51extern int qdio_performance_stats;
52
53int qdio_setup_perf_stats(void);
54void qdio_remove_perf_stats(void);
55
56extern void qdio_perf_stat_inc(atomic_long_t *count);
57extern void qdio_perf_stat_dec(atomic_long_t *count);
58
59#endif