From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [RFC PATCH 1/6] netback: page pool version 1 Date: Mon, 16 Jan 2012 09:31:12 +0000 Message-ID: <1326706272.5285.3.camel@liuw-desktop> References: <1326473949-22389-1-git-send-email-wei.liu2@citrix.com> <1326473949-22389-2-git-send-email-wei.liu2@citrix.com> <20120113173746.GA16182@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120113173746.GA16182@phenom.dumpdata.com> Sender: netdev-owner@vger.kernel.org To: Konrad Rzeszutek Wilk Cc: wei.liu2@citrix.com, Ian Campbell , "xen-devel@lists.xensource.com" , "netdev@vger.kernel.org" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-01-13 at 17:37 +0000, Konrad Rzeszutek Wilk wrote: > > +static idx_t free_head; > > +static int free_count; > > +static unsigned long pool_size; > > +static DEFINE_SPINLOCK(pool_lock); > > +static struct page_pool_entry *pool; > > + > > +static int get_free_entry(void) > > +{ > > + unsigned long flag; > > + int idx; > > + > > + spin_lock_irqsave(&pool_lock, flag); > > What is the benfit of using the irq version of the spinlock instead > of the normal one?? > This should be vestige of iterations, fixed. Thanks Wei.