From: "ira.weiny" <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Dean Luick <dean.luick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] IB/mad: Ensure fairness in ib_mad_completion_handler
Date: Mon, 28 Dec 2015 18:05:46 -0500 [thread overview]
Message-ID: <20151228230546.GA19794@phlsvsds.ph.intel.com> (raw)
In-Reply-To: <20151228165130.GA13150-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
On Mon, Dec 28, 2015 at 06:51:30PM +0200, Eli Cohen wrote:
> On Thu, Dec 10, 2015 at 04:52:30PM -0500, ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
> > From: Dean Luick <dean.luick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> >
> >
> > @@ -2555,6 +2567,7 @@ static void ib_mad_completion_handler(struct work_struct *work)
> > {
> > struct ib_mad_port_private *port_priv;
> > struct ib_wc wc;
> > + int count = 0;
> >
> > port_priv = container_of(work, struct ib_mad_port_private, work);
> > ib_req_notify_cq(port_priv->cq, IB_CQ_NEXT_COMP);
>
> I think you shoudld push the call to ib_req_notify_cq outside the
> while loop. You don't need to arm the CQ if you re-queued the work.
> Only when you have drained the CQ should you re-arm.
Will it hurt to rearm? The way the code stands I think the worse that will
happen is an extra work item scheduled and an ib_poll_cq call.
I'm not quite sure what you mean about moving the ib_req_notify_cq outside of
the while loop. It seems like to do what you say we would need another work
item which just does ib_poll_cq. Is that what you meant?
Ira
>
> > @@ -2574,6 +2587,11 @@ static void ib_mad_completion_handler(struct work_struct *work)
> > }
> > } else
> > mad_error_handler(port_priv, &wc);
> > +
> > + if (++count > MAD_COMPLETION_PROC_LIMIT) {
> > + queue_work(port_priv->wq, &port_priv->work);
> > + break;
> > + }
> > }
> > }
> >
> > --
> > 1.8.2
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-12-28 23:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 21:52 [PATCH] IB/mad: Ensure fairness in ib_mad_completion_handler ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1449784350-30214-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-12-23 20:01 ` ira.weiny
[not found] ` <20151223200104.GR3860-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-12-24 5:21 ` Doug Ledford
2015-12-28 16:51 ` Eli Cohen
[not found] ` <20151228165130.GA13150-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
2015-12-28 23:05 ` ira.weiny [this message]
[not found] ` <20151228230546.GA19794-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-12-28 23:25 ` Eli Cohen
[not found] ` <20151228232533.GB13150-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
2015-12-29 0:35 ` ira.weiny
[not found] ` <20151229003514.GC19794-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-12-30 14:15 ` Eli Cohen
2015-12-29 9:17 ` Christoph Hellwig
[not found] ` <20151229091730.GA8445-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-12-29 9:51 ` Sagi Grimberg
[not found] ` <56825797.5030008-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-12-29 17:40 ` ira.weiny
[not found] ` <20151229174014.GA329-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-12-30 11:01 ` Christoph Hellwig
[not found] ` <20151230110133.GA4859-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-12-31 2:00 ` ira.weiny
[not found] ` <20151231020007.GB329-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-01-02 17:03 ` Christoph Hellwig
[not found] ` <20160102170331.GC21479-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-01-04 3:10 ` ira.weiny
2016-01-04 3:19 ` ira.weiny
2016-01-04 6:55 ` ira.weiny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151228230546.GA19794@phlsvsds.ph.intel.com \
--to=ira.weiny-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dean.luick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.