mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: akpm@linux-foundation.org, a.p.zijlstra@chello.nl,
	travis@sgi.com, linux-kernel@vger.kernel.org,
	cl@linux-foundation.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] percpu_counter: FBC_BATCH might be too big
Date: Fri, 05 Dec 2008 12:32:02 -0800 (PST)	[thread overview]
Message-ID: <20081205.123202.98853955.davem@davemloft.net> (raw)
In-Reply-To: <4939513C.3090101@cosmosbay.com>

From: Eric Dumazet <dada1@cosmosbay.com>
Date: Fri, 05 Dec 2008 17:05:16 +0100

> For NR_CPUS >= 16 values, FBC_BATCH is 2*NR_CPUS
> 
> Considering more and more distros are using high NR_CPUS values,
> it makes sense to use a more sensible value for FBC_BATCH.
> 
> A sensible value is 2*num_online_cpus(), with a minimum value of 32
> (This minimum value helps branch prediction in __percpu_counter_add())
> 
> We already have a hotcpu notifier, so we can adjust FBC_BATCH dynamically.
> 
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>

The downside is now we must load this value in these common
routines.  But I think the gain outweights the loss so:

Acked-by: David S. Miller <davem@davemloft.net>

  parent reply	other threads:[~2008-12-05 20:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-05 16:05 Eric Dumazet
2008-12-05 16:40 ` Peter Zijlstra
2008-12-05 20:32 ` David Miller [this message]
2008-12-07  9:25 ` [PATCH, take2] " Eric Dumazet
2008-12-07 17:09   ` Andrew Morton
2008-12-07 18:30     ` Eric Dumazet
2008-12-08  4:32       ` Andrew Morton
2008-12-08  8:05         ` [PATCH] percpu_counter: FBC_BATCH should be a variable Eric Dumazet
2008-12-08  8:19           ` Andrew Morton

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=20081205.123202.98853955.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=dada1@cosmosbay.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=travis@sgi.com \
    /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
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

Powered by JetHome