SLUB: Tread Hugepages as GFP_MOVABLE pages Do the same as hugetlb.c does: If the page order for a slab has been set to the same order as hugetlb pages then use GFP_MOVABLE as an allocation flag. This has the effect that slub_min_order=HUGE_ORDER will avoid creating any RECLAIMABLE sections at all. The system will only have MOVABLE and UNMOVABLE sections. Signed-off-by: Christoph Lameter --- mm/slub.c | 5 +++++ 1 file changed, 5 insertions(+) Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2008-01-09 23:56:10.511522745 -0800 +++ linux-2.6/mm/slub.c 2008-01-10 00:02:39.693136822 -0800 @@ -2372,6 +2372,11 @@ static int kmem_cache_open(struct kmem_c if (s->flags & SLAB_CACHE_DMA) s->allocflags |= SLUB_DMA; +#ifdef CONFIG_HUGETLBFS + if (s->order == HPAGE_SHIFT - PAGE_SHIFT) + s->allocflags |= __GFP_MOVABLE; + else +#endif if (s->flags & SLAB_RECLAIM_ACCOUNT) s->allocflags |= __GFP_RECLAIMABLE;