public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] Is lib/irq_poll still considered useful?
       [not found] <20210930103754.2128949-1-bigeasy@linutronix.de>
@ 2021-09-30 10:56 ` Sebastian Andrzej Siewior
  2021-10-01  4:24   ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2021-09-30 10:56 UTC (permalink / raw)
  To: linux-kernel, linux-scsi
  Cc: Peter Zijlstra, Thomas Gleixner, Christoph Hellwig,
	Greg Kroah-Hartman, Doug Ledford, Jason Gunthorpe, linux-rdma,
	Subbu Seetharaman, Ketan Mukadam, Jitendra Bhivare,
	James E.J. Bottomley, Martin K. Petersen, Manoj N. Kumar,
	Matthew R. Ochs, Uma Krishnan, Brian King, James Smart,
	Dick Kennedy, Kashyap Desai, Sumit Saxena, Shivasharan S,
	megaraidlinux.pdl, Sathya Prakash, Sreekanth Reddy,
	Suganath Prabu Subramani, MPT-FusionLinux.pdl

I was looking at irq_poll and for missing scheduling points.
It raised the question why are there 7 driver still using irq_poll and
not moved on to something else like threaded interrupts or kworker.

There is:
- Infiband can complete direct, irq_poll and kworker.
- be2iscsi only irq_poll.
- cxlflash only irq_poll. Not sure how IRQs are acked.
- ipr direct or irq_poll, can be configured. Now sure how IRQs are acked.
- lpfc kworker and/or irq_poll. Not sure all invocations are from
  interrupts like context [0].
- megaraid irq_poll. Not sure all invocations are from interrupts like
  context [0].
- mpt3sas irq_poll or io_uring io poll. Not sure all invocations are
  from interrupts like context [0].

[0] If irq_poll_sched() is not used from an interrupt (as in interrupt
service routine, timer handler, tasklet (not encouraging just noticed))
but from task context (as in kworker for instance) then irq-poll handler
will not be invoked right away. Instead it will be delayed to random
point in time until an interrupt fires or something down the stack
performs a pending softirq check.
Waking ksoftirqd itself isn't helping much since it will set a
NEED_RESCHED bit in the task_struct which local_irq_restore() isn't
testing for. So the scheduling event is delayed until spin_unlock() for
instance.

Is there a reason for the remaining user of irq_poll to keep using it?

Sebastian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] Is lib/irq_poll still considered useful?
  2021-09-30 10:56 ` [RFC] Is lib/irq_poll still considered useful? Sebastian Andrzej Siewior
@ 2021-10-01  4:24   ` Christoph Hellwig
  2021-10-01  6:41     ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2021-10-01  4:24 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: linux-kernel, linux-scsi, Peter Zijlstra, Thomas Gleixner,
	Christoph Hellwig, Greg Kroah-Hartman, Doug Ledford,
	Jason Gunthorpe, linux-rdma, Subbu Seetharaman, Ketan Mukadam,
	Jitendra Bhivare, James E.J. Bottomley, Martin K. Petersen,
	Manoj N. Kumar, Matthew R. Ochs, Uma Krishnan, Brian King,
	James Smart, Dick Kennedy, Kashyap Desai, Sumit Saxena,
	Shivasharan S, megaraidlinux.pdl, Sathya Prakash, Sreekanth Reddy,
	Suganath Prabu Subramani, MPT-FusionLinux.pdl

On Thu, Sep 30, 2021 at 12:56:05PM +0200, Sebastian Andrzej Siewior wrote:
> Is there a reason for the remaining user of irq_poll to keep using it?

At least for RDMA there are workloads where the latency difference
matters.  That's why we added both the irq_poll and workqueue mode
to thew new CQ API a few years ago.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] Is lib/irq_poll still considered useful?
  2021-10-01  4:24   ` Christoph Hellwig
@ 2021-10-01  6:41     ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2021-10-01  6:41 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-kernel, linux-scsi, Peter Zijlstra, Thomas Gleixner,
	Greg Kroah-Hartman, Doug Ledford, Jason Gunthorpe, linux-rdma,
	Subbu Seetharaman, Ketan Mukadam, Jitendra Bhivare,
	James E.J. Bottomley, Martin K. Petersen, Manoj N. Kumar,
	Matthew R. Ochs, Uma Krishnan, Brian King, James Smart,
	Dick Kennedy, Kashyap Desai, Sumit Saxena, Shivasharan S,
	megaraidlinux.pdl, Sathya Prakash, Sreekanth Reddy,
	Suganath Prabu Subramani, MPT-FusionLinux.pdl

On 2021-10-01 05:24:49 [+0100], Christoph Hellwig wrote:
> On Thu, Sep 30, 2021 at 12:56:05PM +0200, Sebastian Andrzej Siewior wrote:
> > Is there a reason for the remaining user of irq_poll to keep using it?
> 
> At least for RDMA there are workloads where the latency difference
> matters.  That's why we added both the irq_poll and workqueue mode
> to thew new CQ API a few years ago.

Would it work for them to move to threaded interrupts or is the NAPI
like behaviour (delay after a while to the next jiffy) the killer
feature?

Sebastian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-01  6:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20210930103754.2128949-1-bigeasy@linutronix.de>
2021-09-30 10:56 ` [RFC] Is lib/irq_poll still considered useful? Sebastian Andrzej Siewior
2021-10-01  4:24   ` Christoph Hellwig
2021-10-01  6:41     ` Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox