From: Rusty Russell <rusty@rustcorp.com.au>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>,
lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Oops in percpu_modalloc in 2.6.9-rc1-mm1
Date: Fri, 03 Sep 2004 11:10:29 +1000 [thread overview]
Message-ID: <1094125902.17005.40.camel@bach> (raw)
In-Reply-To: <20040901233556.6456ea9a@lembas.zaitcev.lan>
On Thu, 2004-09-02 at 16:35, Pete Zaitcev wrote:
> On Wed, 01 Sep 2004 15:21:45 +1000
> Rusty Russell <rusty@rustcorp.com.au> wrote:
>
> > Pete, can you figure out what module it is which goes boom, send me the
> > .ko file, and tell me the value of CONFIG_X86_L1_CACHE_SHIFT?
>
> Two modules have percpu data segment: net/ipv4/netfilter/ipchains.o
> and net/ipv4/netfilter/ip_conntrack_core.o.
> The CONFIG_X86_L1_CACHE_SHIFT is 4.
...
> 12 .data 000006e4 00000000 00000000 0000ba20 2**5
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 13 .data.percpu 0000003c 00000000 00000000 0000c120 2**5
> CONTENTS, ALLOC, LOAD, DATA
Well, here's the problem. alloc_bootmem will return something
SMP_CACHE_BYTES aligned, so we can't meet this. If we knew in advance
what the alignment requirements were, we could do so.
Note also, that archs currently use vmalloc() or variants for
module_alloc, but they could easily use kmalloc() for small sizes. This
would make your life painful, since kmalloc() also returns L1
cache-aligned memory.
I'd suggest that for a 486 configuration, GCC shouldn't be asking for
32-byte alignment for anything. Still, we probably have to remove the
BUG_ON and simply accept that alignment > SMP_CACHE_BYTES is actually
taking pot luck (depends if the original allocation was aligned).
Rusty.
--
Anyone who quotes me in their signature is an idiot -- Rusty Russell
next parent reply other threads:[~2004-09-03 1:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040831214659.2471c043.akpm@osdl.org>
[not found] ` <1094016105.17835.50.camel@bach>
[not found] ` <20040901233556.6456ea9a@lembas.zaitcev.lan>
2004-09-03 1:10 ` Rusty Russell [this message]
2004-09-01 3:32 Oops in percpu_modalloc in 2.6.9-rc1-mm1 Pete Zaitcev
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=1094125902.17005.40.camel@bach \
--to=rusty@rustcorp.com.au \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zaitcev@redhat.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