lkml.org 
[lkml]   [2008]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.25-rc7-git2: Reported regressions from 2.6.24
Hi Linus,

On Fri, 28 Mar 2008, Pekka Enberg wrote:
> > We clear GFP_ZERO in new_slab() so the normal kmalloc()/kzalloc() path
> > should be fine but don't do it for kmalloc_large() nor
> > kmalloc_large_node(). Is that the bug here?

On Fri, Mar 28, 2008 at 7:27 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> Dammit, NO.
>
> The bug was that the commit I made (which was correct and robust) was then
> partially reverted by Christoph for no good reason. At that point,
> kmalloc_large() didn't even exist, so at that point the change was
> "technically correct" (since the only user of gfpflags really did end up
> clearing it somewhere deep in its callchain).

I was not implying that we should clear GFP_ZERO in kmalloc_large()
but that we can hit the page allocator with GFP_ZERO via kmalloc() and
kzalloc() for size > PAGE_SIZE allocations. And asking Christoph if
that's the bug we're seeing here.

On Fri, Mar 28, 2008 at 7:27 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> So the *last* thing we want to do is to clear GFP_ZERO in multiple subtle
> places based on new random code being added. We want to clear it at the
> top level, so that no other code never ever even has to _think_ about it!

We are clearing it in one place, just before calling alloc_pages.
[Yes, it's hard to spot, it's in new_slab() where we call
allocate_slab().] I'm okay with moving it to top level but I don't see
how that fixes any of the bugs mentioned here.

Pekka


\
 
 \ /
  Last update: 2008-03-28 19:19    [W:0.428 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site