lkml.org 
[lkml]   [2011]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] make new alloc_pages_exact()
From
Date
On Wed, 2011-04-27 at 16:42 -0500, Timur Tabi wrote:
> Dave Hansen wrote:
> >> Is there an easy way to verify that alloc_pages_exact(5MB) really does allocate
> >> > only 5MB and not 8MB?
>
> > I'm not sure why you're asking. How do we know that the _normal_
> > allocator only gives us 4k when we ask for 4k? Well, that's just how it
> > works. If alloc_pages_exact() returns success, you know it's got the
> > amount of memory that you asked for, and only that plus a bit of masking
> > for page alignment.
> >
> > Have you seen alloc_pages_exact() behaving in some other way?
>
> I've never tested this part of alloc_pages_exact(), even when I wrote (the first
> version of) it. I just took it on faith that it actually did what it was
> supposed to do.

I did actually go add a bunch of printks to it at one point. It did
seem to be working just fine and freeing the right amount of memory.

-- Dave



\
 
 \ /
  Last update: 2011-04-28 18:05    [W:0.040 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site