Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1269428
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/9] IB: add a proper completion queue abstraction |
| Date | 2015-11-14 08:10 +0100 |
| Message-ID | <quD8d-Wt-7@gated-at.bofh.it> (permalink) |
| References | <qun3s-77o-17@gated-at.bofh.it> <qun3s-77o-15@gated-at.bofh.it> <qurgL-1vA-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Nov 13, 2015 at 11:25:13AM -0700, Jason Gunthorpe wrote:
> For instance, like this, not fulling draining the cq and then doing:
>
> > + completed = __ib_process_cq(cq, budget);
> > + if (completed < budget) {
> > + irq_poll_complete(&cq->iop);
> > + if (ib_req_notify_cq(cq, IB_POLL_FLAGS) > 0) {
>
> Doesn't seem entirely right? There is no point in calling
> ib_req_notify_cq if the code knows there is still stuff in the CQ and
> has already, independently, arranged for ib_poll_hander to be
> guarenteed called.
The code only calls ib_req_notify_cq if it knowns we finished earlier than
our budget.
> > + completed = __ib_process_cq(cq, IB_POLL_BUDGET_WORKQUEUE);
> > + if (completed >= IB_POLL_BUDGET_WORKQUEUE ||
> > + ib_req_notify_cq(cq, IB_POLL_FLAGS) > 0)
> > + queue_work(ib_comp_wq, &cq->work);
>
> Same comment here..
Same here - we only requeue the work item if either we processed all of
our budget, or ib_req_notify_cq with IB_CQ_REPORT_MISSED_EVENTS told
us that we need to poll again.
> I understand several drivers are not using a hard irq context for the
> comp_handler call back. Is there any way to exploit that in this new
> API so we don't have to do so many context switches? Ie if the driver
> already is using a softirq when calling comp_handler can we somehow
> just rig ib_poll_handler directly and avoid the overhead? (Future)
Let's say this API makes it possible. I still don't think moving the
whole budget and rearm logic into the LLD is necessarily a good idea
if we can avoid it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 2/9] IB: add a proper completion queue abstraction Christoph Hellwig <hch@lst.de> - 2015-11-13 15:00 +0100
Re: [PATCH 2/9] IB: add a proper completion queue abstraction Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2015-11-13 19:30 +0100
Re: [PATCH 2/9] IB: add a proper completion queue abstraction Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2015-11-13 23:10 +0100
Re: [PATCH 2/9] IB: add a proper completion queue abstraction Christoph Hellwig <hch@lst.de> - 2015-11-14 08:20 +0100
Re: [PATCH 2/9] IB: add a proper completion queue abstraction Christoph Hellwig <hch@lst.de> - 2015-11-14 08:10 +0100
Re: [PATCH 2/9] IB: add a proper completion queue abstraction Sagi Grimberg <sagig@dev.mellanox.co.il> - 2015-11-15 10:50 +0100
Re: [PATCH 2/9] IB: add a proper completion queue abstraction Christoph Hellwig <hch@lst.de> - 2015-11-15 14:00 +0100
Re: [PATCH 2/9] IB: add a proper completion queue abstraction Sagi Grimberg <sagig@dev.mellanox.co.il> - 2015-11-15 14:30 +0100
csiph-web