• N
    [PATCH] hugepage allocator cleanup · a482289d
    Nick Piggin 提交于
    Insert "fresh" huge pages into the hugepage allocator by the same means as
    they are freed back into it.  This reduces code size and allows
    enqueue_huge_page to be inlined into the hugepage free fastpath.
    
    Eliminate occurances of hugepages on the free list with non-zero refcount.
    This can allow stricter refcount checks in future.  Also required for
    lockless pagecache.
    Signed-off-by: NNick Piggin <npiggin@suse.de>
    
    "This patch also eliminates a leak "cleaned up" by re-clobbering the
    refcount on every allocation from the hugepage freelists.  With respect to
    the lockless pagecache, the crucial aspect is to eliminate unconditional
    set_page_count() to 0 on pages with potentially nonzero refcounts, though
    closer inspection suggests the assignments removed are entirely spurious."
    Acked-by: NWilliam Irwin <wli@holomorphy.com>
    Signed-off-by: NAndrew Morton <akpm@osdl.org>
    Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
    a482289d
hugetlb.c 13.0 KB