lkml.org 
[lkml]   [2010]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [RFC][PATCH 1/3] contigous big page allocator
    Date
    > 
    > No big change since the previous version but divided into 3 patches.
    > This patch is based onto mmotm-1008 and just works, IOW, mot tested in
    > very-bad-situation.
    >
    > What this wants to do:
    > allocates a contiguous chunk of pages larger than MAX_ORDER.
    > for device drivers (camera? etc..)
    > My intention is not for allocating HUGEPAGE(> MAX_ORDER).
    >
    > What this does:
    > allocates a contiguous chunk of page with page migration,
    > based on memory hotplug codes. (memory unplug is for isolating
    > a chunk of page from buddy allocator.)
    >
    > Consideration:
    > Maybe more codes can be shared with other functions
    > (memory hotplug, compaction..)
    >
    > Status:
    > Maybe still needs more updates, works on small test.
    > [1/3] ... move some codes from memory hotplug. (no functional changes)
    > [2/3] ... a code for searching contiguous pages.
    > [3/3] ... a code for allocating contig memory.
    >
    > Thanks,
    > -Kame
    > ==
    >
    > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    >
    > Memory hotplug is a logic for making pages unused in the specified range
    > of pfn. So, some of core logics can be used for other purpose as
    > allocating a very large contigous memory block.
    >
    > This patch moves some functions from mm/memory_hotplug.c to
    > mm/page_isolation.c. This helps adding a function for large-alloc in
    > page_isolation.c with memory-unplug technique.
    >
    >
    > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    > ---
    > include/linux/page-isolation.h | 7 ++
    > mm/memory_hotplug.c | 109 ---------------------------------------
    > mm/page_isolation.c | 114 +++++++++++++++++++++++++++++++++++++++++
    > 3 files changed, 121 insertions(+), 109 deletions(-)
    >
    > Index: mmotm-1008/include/linux/page-isolation.h
    > ===================================================================
    > --- mmotm-1008.orig/include/linux/page-isolation.h
    > +++ mmotm-1008/include/linux/page-isolation.h
    > @@ -33,5 +33,12 @@ test_pages_isolated(unsigned long start_
    > extern int set_migratetype_isolate(struct page *page);
    > extern void unset_migratetype_isolate(struct page *page);
    >
    > +/*
    > + * For migration.
    > + */
    > +
    > +int test_pages_in_a_zone(unsigned long start_pfn, unsigned long end_pfn);
    > +int scan_lru_pages(unsigned long start, unsigned long end);

    offtopic: scan_lru_pages() return type should be unsined long. it return
    pfn.






    \
     
     \ /
      Last update: 2010-10-13 07:09    [from the cache]
    ©2003-2014 Jasper Spaans. hosted at Digital Ocean