Re: [PATCH 2/3] mm, slub: count freed pages via rcu as this task'sreclaimed_slab
From: Christoph Lameter
Date: Wed Apr 10 2013 - 10:01:53 EST
On Wed, 10 Apr 2013, Simon Jeons wrote:
> It seems that you misunderstand my question. I don't doubt slab/slub can use
> high order pages. However, what I focus on is why slab/slub can use compound
> page, PageCompound() just on behalf of hugetlbfs pages or thp pages which
> should used by apps, isn't it?
I am not entirely clear on what you are asking for. The following gives a
couple of answers to what I guess the question was.
THP pages and user pages are on the lru and are managed differently.
The slab allocators cannot work with those pages.
Slab allocators *can* allocate higher order pages therefore they could
allocate a page of the same order as huge pages and manage it that way.
However there is no way that these pages could be handled like THP pages
since they cannot be broken up (unless we add the capability to move slab
objects which I wanted to do for a long time).
You can boot a Linux system that uses huge pages for slab allocation
by specifying the following parameter on the kernel command line.
The slub allocator will start using huge pages for all its storage
needs. You need a large number of huge pages to do this. Lots of memory
is going to be lost due to fragmentation but its going to be fast since
the slowpaths are rarely used. OOMs due to reclaim failure become much
more likely ;-).
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/