From: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
To: Anton Blanchard <anton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Cc: Hoang-Nam Nguyen
<hnguyen-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>,
Christoph Raisch <raisch-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>,
Stefan Roscher
<ossrosch-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
Alexander Schmidt
<alexs-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
Joachim Fenkes <fenkes-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] IB/ehca: Reduce number of spin_lock/spin_unlocks in ehca_poll_eqs
Date: Sun, 29 Nov 2009 21:26:35 -0800 [thread overview]
Message-ID: <adad430y450.fsf@roland-alpha.cisco.com> (raw)
In-Reply-To: <20091127031320.GV32182@kryten> (Anton Blanchard's message of "Fri, 27 Nov 2009 14:13:20 +1100")
> +
> spin_lock_irqsave(&eq->spinlock, flags);
> +
> q_ofs = eq->ipz_queue.current_q_offset;
> - spin_unlock_irqrestore(&eq->spinlock, flags);
> do {
> - spin_lock_irqsave(&eq->spinlock, flags);
> q_ofs2 = eq->ipz_queue.current_q_offset;
> - spin_unlock_irqrestore(&eq->spinlock, flags);
> max--;
> } while (q_ofs == q_ofs2 && max > 0);
> +
> + spin_unlock_irqrestore(&eq->spinlock, flags);
> +
Does this loop have to drop the lock to give the EQ code a chance to
update the queue pointer? If I understand this correctly, the EQ
polling code is just trying to have a fallback if interrupts don't
work...
- R.
--
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:[~2009-11-30 5:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-27 3:13 [PATCH] IB/ehca: Reduce number of spin_lock/spin_unlocks in ehca_poll_eqs Anton Blanchard
2009-11-30 5:26 ` Roland Dreier [this message]
[not found] ` <adad430y450.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2009-11-30 8:19 ` Hoang-Nam Nguyen
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=adad430y450.fsf@roland-alpha.cisco.com \
--to=rdreier-fyb4gu1cfyuavxtiumwx3w@public.gmane.org \
--cc=alexs-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=anton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
--cc=fenkes-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=hnguyen-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ossrosch-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=raisch-tA70FqPdS9bQT0dZR+AlfA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox