From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rune.pobox.com (rune.pobox.com [208.210.124.79]) by ozlabs.org (Postfix) with ESMTP id 1988DDE098 for ; Fri, 12 Jan 2007 06:41:08 +1100 (EST) Date: Thu, 11 Jan 2007 13:40:54 -0600 From: Nathan Lynch To: Christoph Hellwig , Hoang-Nam Nguyen , Roland Dreier , linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, openfabrics-ewg@openib.org, openib-general@openib.org, raisch@de.ibm.com Subject: Re: [PATCH/RFC 2.6.21 3/5] ehca: completion queue: remove use of do_mmap() Message-ID: <20070111194054.GA11770@localdomain> References: <200701112008.37236.hnguyen@linux.vnet.ibm.com> <20070111192056.GB24623@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20070111192056.GB24623@infradead.org> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Christoph Hellwig wrote: > On Thu, Jan 11, 2007 at 08:08:36PM +0100, Hoang-Nam Nguyen wrote: > > > spin_lock_irqsave(&ehca_cq_idr_lock, flags); > > while (my_cq->nr_callbacks) > > yield(); > > Calling yield is a very bad idea in general. You should probably > add a waitqueue that gets woken when nr_callbacks reaches zero to > sleep effectively here. Isn't that code outright buggy? Calling into the scheduler with a spinlock held and local interrupts disabled...