diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2011-10-30 10:17:05 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-10-30 10:16:45 -0400 |
commit | a2b86019826cb97fd964fbaf101410c64cd78681 (patch) | |
tree | da7659c2d90dcfd83d23ba3f432baa9f84aa80a2 /drivers/s390 | |
parent | 80376f347d70ce5fcfb98105d83624518e0911d6 (diff) |
[S390] qdio: add timestamp for last queue scan time
Add a timestamp per queue and update the timestamp when the queue is
scanned. Add the queue timestamps and the timestamp of the last
adapter interrupt to the debugfs output. The timestamps are useful
for debugging stall conditions.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/qdio.h | 5 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_debug.c | 10 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_main.c | 4 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_thinint.c | 2 |
4 files changed, 16 insertions, 5 deletions
diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h index 3dd86441da3..c15624b7690 100644 --- a/drivers/s390/cio/qdio.h +++ b/drivers/s390/cio/qdio.h | |||
@@ -290,6 +290,9 @@ struct qdio_q { | |||
290 | /* error condition during a data transfer */ | 290 | /* error condition during a data transfer */ |
291 | unsigned int qdio_error; | 291 | unsigned int qdio_error; |
292 | 292 | ||
293 | /* last scan of the queue */ | ||
294 | u64 timestamp; | ||
295 | |||
293 | struct tasklet_struct tasklet; | 296 | struct tasklet_struct tasklet; |
294 | struct qdio_queue_perf_stat q_stats; | 297 | struct qdio_queue_perf_stat q_stats; |
295 | 298 | ||
@@ -449,6 +452,8 @@ static inline int shared_ind(struct qdio_q *q) | |||
449 | return references_shared_dsci(i) || has_multiple_inq_on_dsci(i); | 452 | return references_shared_dsci(i) || has_multiple_inq_on_dsci(i); |
450 | } | 453 | } |
451 | 454 | ||
455 | extern u64 last_ai_time; | ||
456 | |||
452 | /* prototypes for thin interrupt */ | 457 | /* prototypes for thin interrupt */ |
453 | void qdio_setup_thinint(struct qdio_irq *irq_ptr); | 458 | void qdio_setup_thinint(struct qdio_irq *irq_ptr); |
454 | int qdio_establish_thinint(struct qdio_irq *irq_ptr); | 459 | int qdio_establish_thinint(struct qdio_irq *irq_ptr); |
diff --git a/drivers/s390/cio/qdio_debug.c b/drivers/s390/cio/qdio_debug.c index aaf7f935bfd..ed68245f974 100644 --- a/drivers/s390/cio/qdio_debug.c +++ b/drivers/s390/cio/qdio_debug.c | |||
@@ -54,15 +54,17 @@ static int qstat_show(struct seq_file *m, void *v) | |||
54 | if (!q) | 54 | if (!q) |
55 | return 0; | 55 | return 0; |
56 | 56 | ||
57 | seq_printf(m, "DSCI: %d nr_used: %d\n", | 57 | seq_printf(m, "Timestamp: %Lx Last AI: %Lx\n", |
58 | *(u32 *)q->irq_ptr->dsci, atomic_read(&q->nr_buf_used)); | 58 | q->timestamp, last_ai_time); |
59 | seq_printf(m, "ftc: %d last_move: %d\n", | 59 | seq_printf(m, "nr_used: %d ftc: %d last_move: %d\n", |
60 | atomic_read(&q->nr_buf_used), | ||
60 | q->first_to_check, q->last_move); | 61 | q->first_to_check, q->last_move); |
61 | if (q->is_input_q) { | 62 | if (q->is_input_q) { |
62 | seq_printf(m, "polling: %d ack start: %d ack count: %d\n", | 63 | seq_printf(m, "polling: %d ack start: %d ack count: %d\n", |
63 | q->u.in.polling, q->u.in.ack_start, | 64 | q->u.in.polling, q->u.in.ack_start, |
64 | q->u.in.ack_count); | 65 | q->u.in.ack_count); |
65 | seq_printf(m, "IRQs disabled: %u\n", | 66 | seq_printf(m, "DSCI: %d IRQs disabled: %u\n", |
67 | *(u32 *)q->irq_ptr->dsci, | ||
66 | test_bit(QDIO_QUEUE_IRQS_DISABLED, | 68 | test_bit(QDIO_QUEUE_IRQS_DISABLED, |
67 | &q->u.in.queue_irq_state)); | 69 | &q->u.in.queue_irq_state)); |
68 | } | 70 | } |
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 7ded1b26fd2..a76d6764ce6 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c | |||
@@ -512,6 +512,8 @@ static int get_inbound_buffer_frontier(struct qdio_q *q) | |||
512 | int count, stop; | 512 | int count, stop; |
513 | unsigned char state = 0; | 513 | unsigned char state = 0; |
514 | 514 | ||
515 | q->timestamp = get_clock_fast(); | ||
516 | |||
515 | /* | 517 | /* |
516 | * Don't check 128 buffers, as otherwise qdio_inbound_q_moved | 518 | * Don't check 128 buffers, as otherwise qdio_inbound_q_moved |
517 | * would return 0. | 519 | * would return 0. |
@@ -781,6 +783,8 @@ static int get_outbound_buffer_frontier(struct qdio_q *q) | |||
781 | int count, stop; | 783 | int count, stop; |
782 | unsigned char state = 0; | 784 | unsigned char state = 0; |
783 | 785 | ||
786 | q->timestamp = get_clock_fast(); | ||
787 | |||
784 | if (need_siga_sync(q)) | 788 | if (need_siga_sync(q)) |
785 | if (((queue_type(q) != QDIO_IQDIO_QFMT) && | 789 | if (((queue_type(q) != QDIO_IQDIO_QFMT) && |
786 | !pci_out_supported(q)) || | 790 | !pci_out_supported(q)) || |
diff --git a/drivers/s390/cio/qdio_thinint.c b/drivers/s390/cio/qdio_thinint.c index a3e3949d7b6..8c1f412b7e6 100644 --- a/drivers/s390/cio/qdio_thinint.c +++ b/drivers/s390/cio/qdio_thinint.c | |||
@@ -36,7 +36,7 @@ static u8 *tiqdio_alsi; | |||
36 | 36 | ||
37 | struct indicator_t *q_indicators; | 37 | struct indicator_t *q_indicators; |
38 | 38 | ||
39 | static u64 last_ai_time; | 39 | u64 last_ai_time; |
40 | 40 | ||
41 | /* returns addr for the device state change indicator */ | 41 | /* returns addr for the device state change indicator */ |
42 | static u32 *get_indicator(void) | 42 | static u32 *get_indicator(void) |