public inbox for linuxppc-dev@ozlabs.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, openib-general@openib•org,
	hch@infradead•org, linuxppc-dev@ozlabs•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.

  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 [PATCH 2.6.21-rc1 4/5] ehca: replace yield() by wait_for_completion() Hoang-Nam Nguyen
2007-02-14 22:28 ` Christoph Hellwig [this message]
2007-02-15  0:50 ` Roland Dreier
  -- strict thread matches above, loose matches on Subject: below --
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$(echo .)org \
    --cc=h.carstens@de$(echo .)ibm.com \
    --cc=hnguyen@linux$(echo .)vnet.ibm.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=openib-general@openib$(echo .)org \
    --cc=raisch@de$(echo .)ibm.com \
    --cc=rdreier@cisco$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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