Skip to content

Commit a709423

Browse files
julianwiedmannhcahca
authored andcommitted
s390/qdio: remove internal polling in non-thinint path
For non-thinint devices in LPAR, qdio polls an idle Input Queue for a little while to catch more work. But platform support for thinints has been around practically _forever_ by now, so this micro-optimization is seeing 0 actual use. Remove it to reduce the overall complexity of the hot path. In the meantime we also grew support for driver-level polling (eg. NAPI in qeth), so it's quite questionable how useful this would actually be on current kernels. Signed-off-by: Julian Wiedmann <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent 2bbf282 commit a709423

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

drivers/s390/cio/qdio.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#define QDIO_BUSY_BIT_PATIENCE (100 << 12) /* 100 microseconds */
1616
#define QDIO_BUSY_BIT_RETRY_DELAY 10 /* 10 milliseconds */
1717
#define QDIO_BUSY_BIT_RETRIES 1000 /* = 10s retry time */
18-
#define QDIO_INPUT_THRESHOLD (500 << 12) /* 500 microseconds */
1918

2019
enum qdio_irq_states {
2120
QDIO_IRQ_STATE_INACTIVE,
@@ -181,8 +180,6 @@ struct qdio_input_q {
181180
/* Batch of SBALs that we processed while polling the queue: */
182181
unsigned int batch_start;
183182
unsigned int batch_count;
184-
/* last time of noticing incoming data */
185-
u64 timestamp;
186183
};
187184

188185
struct qdio_output_q {

drivers/s390/cio/qdio_main.c

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -510,14 +510,7 @@ static int get_inbound_buffer_frontier(struct qdio_q *q, unsigned int start)
510510

511511
static int qdio_inbound_q_moved(struct qdio_q *q, unsigned int start)
512512
{
513-
int count;
514-
515-
count = get_inbound_buffer_frontier(q, start);
516-
517-
if (count && !is_thinint_irq(q->irq_ptr) && MACHINE_IS_LPAR)
518-
q->u.in.timestamp = get_tod_clock();
519-
520-
return count;
513+
return get_inbound_buffer_frontier(q, start);
521514
}
522515

523516
static inline int qdio_inbound_q_done(struct qdio_q *q, unsigned int start)
@@ -535,22 +528,7 @@ static inline int qdio_inbound_q_done(struct qdio_q *q, unsigned int start)
535528
/* more work coming */
536529
return 0;
537530

538-
if (is_thinint_irq(q->irq_ptr))
539-
return 1;
540-
541-
/* don't poll under z/VM */
542-
if (MACHINE_IS_VM)
543-
return 1;
544-
545-
/*
546-
* At this point we know, that inbound first_to_check
547-
* has (probably) not moved (see qdio_inbound_processing).
548-
*/
549-
if (get_tod_clock_fast() > q->u.in.timestamp + QDIO_INPUT_THRESHOLD) {
550-
DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "in done:%02x", start);
551-
return 1;
552-
} else
553-
return 0;
531+
return 1;
554532
}
555533

556534
static inline void qdio_handle_aobs(struct qdio_q *q, int start, int count)

0 commit comments

Comments
 (0)