LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>
Cc: Roland Dreier <rdreier@cisco.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
openib-general@openib.org, hch@infradead.org, raisch@de.ibm.com,
h.carstens@de.ibm.com
Subject: Re: [PATCH 2.6.21-rc1 4/5] ehca: replace yield() by wait_for_completion()
Date: Wed, 14 Feb 2007 22:28:24 +0000 [thread overview]
Message-ID: <20070214222824.GA11579@infradead.org> (raw)
In-Reply-To: <200702141741.35444.hnguyen@linux.vnet.ibm.com>
> @@ -332,7 +333,7 @@ int ehca_destroy_cq(struct ib_cq *cq)
> spin_lock_irqsave(&ehca_cq_idr_lock, flags);
> while (my_cq->nr_callbacks) {
> spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
> - yield();
> + wait_for_completion(&my_cq->zero_callbacks);
> spin_lock_irqsave(&ehca_cq_idr_lock, flags);
> }
A while loop around wait_for_completion doesn't make all that much sense.
I suspect a simple
if (my_cq->nr_callbacks)
wait_for_completion(&my_cq->zero_callbacks);
Is what you need.
next prev parent reply other threads:[~2007-02-14 22:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-14 16:41 Hoang-Nam Nguyen
2007-02-14 22:28 ` Christoph Hellwig [this message]
2007-02-15 0:50 ` Roland Dreier
2007-02-15 16:09 Hoang-Nam Nguyen
2007-02-15 17:57 ` Roland Dreier
2007-02-15 19:54 ` 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=20070214222824.GA11579@infradead.org \
--to=hch@infradead.org \
--cc=h.carstens@de.ibm.com \
--cc=hnguyen@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=openib-general@openib.org \
--cc=raisch@de.ibm.com \
--cc=rdreier@cisco.com \
--subject='Re: [PATCH 2.6.21-rc1 4/5] ehca: replace yield() by wait_for_completion()' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).