From: Eric Dumazet <dada1@cosmosbay.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <clameter@sgi.com>,
davem@davemloft.net, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, yanmin_zhang@linux.intel.com,
travis@sgi.com
Subject: Re: [PATCH] alloc_percpu() fails to allocate percpu data
Date: Sat, 01 Mar 2008 14:53:00 +0100 [thread overview]
Message-ID: <47C95FBC.1010703@cosmosbay.com> (raw)
In-Reply-To: <20080227122451.6a3b5565.akpm@linux-foundation.org>
Andrew Morton a écrit :
> On Wed, 27 Feb 2008 11:59:32 -0800 (PST)
> Christoph Lameter <clameter@sgi.com> wrote:
>
>> Any decision made on what to do about this one? Mike or I can
>> repost the per cpu allocator against mm? The fix by Eric could be used
>> in the interim for 2.6.24?
>>
>
> I suppose I'll merge Eric's patch when I've tested it fully (well, as fully
> as I test stuff).
>
> It'd be nice to get that cache_line_size()/L1_CACHE_BYTES/L1_CACHE_ALIGN()
> mess sorted out. If it's a mess - I _think_ it is?
Just coming back from hollidays, sorry for the delay.
I can provide a patch so that L1_CACHE_BYTES is not anymore a compile time
constant if you want, but I am not sure it is worth the trouble ? (and this
certainly not 2.6.{24|25} stuff :) )
Current situation :
L1_CACHE_BYTES is known at compile time, and can be quite large (128 bytes),
while cache_line_size() gives the real cache line size selected at boot time
given the hardware capabilities.
If L1_CACHE_BYTES is not anymore a constant, compiler will also uses plain
divides to compute L1_CACHE_ALIGN()
Maybe uses of L1_CACHE_ALIGN() in fastpath would 'force' us to not only
declare a cache_line_size() but also a cache_line_size_{mask|shift}() so that
x86 could use :
#define L1_CACHE_ALIGN(x) ((((x)+cache_line_mask())) >> cache_line_shift())
#define L1_CACHE_BYTES (cache_line_size())
But I am not sure we want to play these games (we must also make sure nothing
in the tree wants a constant L1_CACHE_BYTES and replace by SMP_CACHE_BYTES)
next prev parent reply other threads:[~2008-03-01 13:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-21 18:00 [PATCH] alloc_percpu() fails to allocate percpu data Eric Dumazet
2008-02-21 22:26 ` Peter Zijlstra
2008-02-23 9:23 ` Nick Piggin
2008-02-27 19:44 ` Christoph Lameter
2008-03-03 3:14 ` Nick Piggin
2008-03-03 7:48 ` Eric Dumazet
2008-03-03 9:41 ` Nick Piggin
2008-03-03 19:30 ` Christoph Lameter
2008-02-23 8:04 ` Andrew Morton
2008-02-27 19:59 ` Christoph Lameter
2008-02-27 20:24 ` Andrew Morton
2008-02-27 21:56 ` Christoph Lameter
2008-03-01 13:53 ` Eric Dumazet [this message]
2008-03-11 18:15 ` Mike Snitzer
2008-03-11 18:41 ` Eric Dumazet
2008-03-11 19:39 ` Mike Snitzer
2008-03-12 0:18 ` [stable] " Chris Wright
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=47C95FBC.1010703@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=travis@sgi.com \
--cc=yanmin_zhang@linux.intel.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;
as well as URLs for NNTP newsgroup(s).