Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jun 2016 16:28:24 +0200
From:      Roger Pau =?iso-8859-1?Q?Monn=E9?= <royger@FreeBSD.org>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r301197 - head/sys/dev/xen/netfront
Message-ID:  <20160602142824.m6d24n2rx3i2kclt@mac>
In-Reply-To: <c8ef340a-e3d3-af3e-d45c-eedf4183750b@selasky.org>
References:  <201606021114.u52BEQqB047172@repo.freebsd.org> <2c81e44d-65de-10f0-8837-f23896855150@selasky.org> <20160602125422.gmdsueoeu5fiiec5@mac> <c8ef340a-e3d3-af3e-d45c-eedf4183750b@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 02, 2016 at 03:01:03PM +0200, Hans Petter Selasky wrote:
> On 06/02/16 14:54, Roger Pau Monné wrote:
> > On Thu, Jun 02, 2016 at 01:19:56PM +0200, Hans Petter Selasky wrote:
> > > On 06/02/16 13:14, Roger Pau Monné wrote:
> > > > +		callout_reset(&rxq->rx_refill, hz/10, xn_alloc_rx_buffers_callout,
> > > > +		    rxq);
> > > 
> > > Maybe use callout_reset_curcpu() to take advantage of callout's SMP
> > > capabilities ?
> > 
> > Yes, that's fine. But what's the benefit of it? I don't really care whether
> > the callout is run on the current CPU or not. Is callout_reset_curcpu
> > cheaper than callout_reset?
> > 
> 
> Hi,
> 
> It is maybe not cheaper, but it will distribute the load of the
> xn_alloc_rx_buffers_callout() callback, to the current CPU calling
> callout_reset_curcpu(). Else xn_alloc_rx_buffers_callout() will always be
> called from callback thread zero.

Thanks for the clarification. I did get the impression that callout_reset 
already distributed the callbacks across the number of available CPUs, maybe 
the man page should be expanded to explain this?

I've committed the change as r301204.

Roger.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160602142824.m6d24n2rx3i2kclt>