lkml.org 
[lkml]   [2008]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: bootmem allocator
On Tue, Apr 8, 2008 at 1:45 AM, Yinghai Lu <yhlu.kernel@gmail.com> wrote:
>
> On Mon, Apr 7, 2008 at 12:44 PM, Andi Kleen <andi@firstfloor.org> wrote:
> >
> > Ingo Molnar <mingo@elte.hu> writes:
> >
> > > * Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> > >
> > >> Hi Ingo, Peter,
> > >>
> > >> small question. It was a patch recently posted which removes memset(x,
> > >> 0, x) after __alloc_bootmem call. There are a few another code
> > >> snippets who still call memset(x, 0, x). And who is responsible for
> > >> memory clearing? bootmem allocator or caller?
> > >
> > > hm, bootmem allocator is supposed to clear memory. We have a couple of
> > > places that rely on that.
> >
> > I was actually considering to change that for the GB pages hugetlbfs
> > patchkit, because memset for 1G is a little slow and not needed (will be cleared later
> > anyways) and it might be a problem for very large systems with a lot of such
> > pages at boot.
>
> add another zalloc_bootmem?
>
> YH
>

I think it would be a good idea ;) Btw maybe would be better to call
memset on the code witch relies on "clear" memory explicitly? So we will
clear memory allocated *only* if we really need this.

Cyrill


\
 
 \ /
  Last update: 2008-04-08 06:17    [W:0.082 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site