lkml.org 
[lkml]   [2010]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] Tight check of pfn_valid on sparsemem - v4
From
On Tue, Jul 27, 2010 at 11:34 PM, Christoph Lameter
<cl@linux-foundation.org> wrote:
> On Tue, 27 Jul 2010, Minchan Kim wrote:
>
>> But in fact I have a concern to use PG_reserved since it can be used
>> afterward pfn_valid normally to check hole in non-hole system. So I
>> think it's redundant.

Ignore me. I got confused.

>
> PG_reserved is already used to mark pages not handled by the page
> allocator (see mmap_init_zone).


I will resend below approach.

static inline int memmap_valid(unsigned long pfn)
{
struct page *page = pfn_to_page(pfn);
struct page *__pg = virt_to_page(page);
return page_private(__pg) == MAGIC_MEMMAP && PageReserved(__pg);
}
Thanks, all.


--
Kind regards,
Minchan Kim


\
 
 \ /
  Last update: 2010-07-28 00:35    [W:0.280 / U:0.064 seconds]
©2003-2014 Jasper Spaans. Advertise on this site