* Re: [Bugme-new] [Bug 8778] New: Ocotea board: kernel reports access of bad area during boot with DEBUG_SLAB=y
[not found] ` <20070718155940.GB29722@gate.ebshome.net>
@ 2007-07-18 16:55 ` Andrew Morton
2007-07-18 17:04 ` Eugene Surovegin
2007-07-23 20:34 ` Christoph Lameter
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Morton @ 2007-07-18 16:55 UTC (permalink / raw)
To: Eugene Surovegin, linux-mm, Christoph Lameter
Cc: Josh Boyer, bart.vanassche, netdev,
bugme-daemon@kernel-bugs.osdl.org, linuxppc-embedded
On Wed, 18 Jul 2007 08:59:40 -0700 Eugene Surovegin <ebs@ebshome.net> wrote:
> On Wed, Jul 18, 2007 at 08:41:10AM -0500, Josh Boyer wrote:
> > On Wed, 2007-07-18 at 01:34 -0700, Eugene Surovegin wrote:
> > > On Wed, Jul 18, 2007 at 12:52:53AM -0700, Andrew Morton wrote:
> > > > On Wed, 18 Jul 2007 00:07:50 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote:
> > > >
> > > > > http://bugzilla.kernel.org/show_bug.cgi?id=8778
> > > > >
> > > > > Summary: Ocotea board: kernel reports access of bad area during
> > > > > boot with DEBUG_SLAB=y
> > >
> > > Slab debugging is probably the culprit here. I had similar problem
> > > couple of years ago, not sure something has changed since then,
> > > haven't checked.
> > >
> > > When slab debugging was enabled it made memory allocations non L1
> > > cache line aligned. This is very bad for DMA on non-coherent cache
> > > arches (PPC440 is one of those archs).
> > >
> > > I have a hack for EMAC which tries to "workaround" this problem:
> > > http://kernel.ebshome.net/emac_slab_debug.diff
> > > which might help.
> >
> > Would you be opposed to including that patch in mainline?
>
> Yes. I don't think it's the right way to fix this issue. IMO, the
> right one is to fix slab allocator. You cannot change all drivers to
> do this kind of cache flushing, and yes, I saw the same problem with
> PCI based NIC I tried on Ocotea at the time.
>
hm. It should be the case that providing SLAB_HWCACHE_ALIGN at
kmem_cache_create() time will override slab-debugging's offsetting
of the returned addresses.
Or is the problem occurring with memory which is returned from kmalloc(),
rather than from kmem_cache_alloc()?
A complete description of the problem would help here, please.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bugme-new] [Bug 8778] New: Ocotea board: kernel reports access of bad area during boot with DEBUG_SLAB=y
2007-07-18 16:55 ` [Bugme-new] [Bug 8778] New: Ocotea board: kernel reports access of bad area during boot with DEBUG_SLAB=y Andrew Morton
@ 2007-07-18 17:04 ` Eugene Surovegin
2007-07-18 18:43 ` Bart Van Assche
2007-07-23 20:34 ` Christoph Lameter
1 sibling, 1 reply; 4+ messages in thread
From: Eugene Surovegin @ 2007-07-18 17:04 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-mm, Christoph Lameter, Josh Boyer, bart.vanassche, netdev,
bugme-daemon@kernel-bugs.osdl.org, linuxppc-embedded
On Wed, Jul 18, 2007 at 09:55:37AM -0700, Andrew Morton wrote:
> On Wed, 18 Jul 2007 08:59:40 -0700 Eugene Surovegin <ebs@ebshome.net> wrote:
>
> > On Wed, Jul 18, 2007 at 08:41:10AM -0500, Josh Boyer wrote:
> > > On Wed, 2007-07-18 at 01:34 -0700, Eugene Surovegin wrote:
> > > > On Wed, Jul 18, 2007 at 12:52:53AM -0700, Andrew Morton wrote:
> > > > > On Wed, 18 Jul 2007 00:07:50 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote:
> > > > >
> > > > > > http://bugzilla.kernel.org/show_bug.cgi?id=8778
> > > > > >
> > > > > > Summary: Ocotea board: kernel reports access of bad area during
> > > > > > boot with DEBUG_SLAB=y
> > > >
> > > > Slab debugging is probably the culprit here. I had similar problem
> > > > couple of years ago, not sure something has changed since then,
> > > > haven't checked.
> > > >
> > > > When slab debugging was enabled it made memory allocations non L1
> > > > cache line aligned. This is very bad for DMA on non-coherent cache
> > > > arches (PPC440 is one of those archs).
> > > >
> > > > I have a hack for EMAC which tries to "workaround" this problem:
> > > > http://kernel.ebshome.net/emac_slab_debug.diff
> > > > which might help.
> > >
> > > Would you be opposed to including that patch in mainline?
> >
> > Yes. I don't think it's the right way to fix this issue. IMO, the
> > right one is to fix slab allocator. You cannot change all drivers to
> > do this kind of cache flushing, and yes, I saw the same problem with
> > PCI based NIC I tried on Ocotea at the time.
> >
>
> hm. It should be the case that providing SLAB_HWCACHE_ALIGN at
> kmem_cache_create() time will override slab-debugging's offsetting
> of the returned addresses.
>
> Or is the problem occurring with memory which is returned from kmalloc(),
> rather than from kmem_cache_alloc()?
It's kmalloc, at least this is how I think skbs are allocated.
Andrew, I don't have access to PPC hw right now (doing MIPS
development these days), so I cannot quickly check that my theory is
still correct for the latest kernel. I'd wait for the reporter to try
my hack and then we can decide what to do. IIRC there was some
provision in slab allocator to enforce alignment, when I was debugging
this problem more then a year ago, that option didn't work.
BTW, I think slob allocator had the same issue with alignment as slab
with enabled debugging (at least at the time I looked at it).
--
Eugene
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bugme-new] [Bug 8778] New: Ocotea board: kernel reports access of bad area during boot with DEBUG_SLAB=y
2007-07-18 17:04 ` Eugene Surovegin
@ 2007-07-18 18:43 ` Bart Van Assche
0 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2007-07-18 18:43 UTC (permalink / raw)
To: Eugene Surovegin
Cc: netdev, linux-mm, bugme-daemon@kernel-bugs.osdl.org,
linuxppc-embedded, Andrew Morton, Christoph Lameter
[-- Attachment #1.1: Type: text/plain, Size: 1205 bytes --]
On 7/18/07, Eugene Surovegin <ebs@ebshome.net> wrote:
>
>
> It's kmalloc, at least this is how I think skbs are allocated.
>
> Andrew, I don't have access to PPC hw right now (doing MIPS
> development these days), so I cannot quickly check that my theory is
> still correct for the latest kernel. I'd wait for the reporter to try
> my hack and then we can decide what to do. IIRC there was some
> provision in slab allocator to enforce alignment, when I was debugging
> this problem more then a year ago, that option didn't work.
>
> BTW, I think slob allocator had the same issue with alignment as slab
> with enabled debugging (at least at the time I looked at it).
Hello Eugene,
In case you didn't notice yet, I have added the following comment to the
kernel bugzilla item:
------- *Comment #5
<http://bugzilla.kernel.org/show_bug.cgi?id=8778#c5>From Bart
Van Assche <bart.vanassche@gmail.com> 2007-07-18 07:12:49 *
[reply<http://bugzilla.kernel.org/show_bug.cgi?id=8778#add_comment>]
-------
I have downloaded the patch from
http://kernel.ebshome.net/emac_slab_debug.diff, and I have tried it. Hereby I
confirm that this patch solves the reported kernel oops.
--
Regards,
Bart Van Assche.
[-- Attachment #1.2: Type: text/html, Size: 1884 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bugme-new] [Bug 8778] New: Ocotea board: kernel reports access of bad area during boot with DEBUG_SLAB=y
2007-07-18 16:55 ` [Bugme-new] [Bug 8778] New: Ocotea board: kernel reports access of bad area during boot with DEBUG_SLAB=y Andrew Morton
2007-07-18 17:04 ` Eugene Surovegin
@ 2007-07-23 20:34 ` Christoph Lameter
1 sibling, 0 replies; 4+ messages in thread
From: Christoph Lameter @ 2007-07-23 20:34 UTC (permalink / raw)
To: Andrew Morton
Cc: Eugene Surovegin, linux-mm, Josh Boyer, bart.vanassche, netdev,
bugme-daemon@kernel-bugs.osdl.org, linuxppc-embedded
On Wed, 18 Jul 2007 09:55:37 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:
> hm. It should be the case that providing SLAB_HWCACHE_ALIGN at
> kmem_cache_create() time will override slab-debugging's offsetting
> of the returned addresses.
That is true for SLUB but not in SLAB. SLAB has always ignored
SLAB_HWCACHE_ALIGN when debugging is on because of the issues involved
in placing the redzone values etc. Could be fun to fix.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-23 20:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-8778-10286@http.bugzilla.kernel.org/>
[not found] ` <20070718005253.942f0464.akpm@linux-foundation.org>
[not found] ` <20070718083425.GA29722@gate.ebshome.net>
[not found] ` <1184766070.3699.2.camel@zod.rchland.ibm.com>
[not found] ` <20070718155940.GB29722@gate.ebshome.net>
2007-07-18 16:55 ` [Bugme-new] [Bug 8778] New: Ocotea board: kernel reports access of bad area during boot with DEBUG_SLAB=y Andrew Morton
2007-07-18 17:04 ` Eugene Surovegin
2007-07-18 18:43 ` Bart Van Assche
2007-07-23 20:34 ` Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox