Re: Improvement on memory subsystem

From: yunfeng zhang
Date: Tue Jul 18 2006 - 23:43:43 EST

2006/7/19, Pekka Enberg <penberg@xxxxxxxxxxxxxx>:
On 7/18/06, yunfeng zhang <zyf.zeroos@xxxxxxxxx> wrote:
> 3. All slabs are all off-slab type. Store slab instance in page structure.

Not sure what you mean. We need much more than sizeof(struct page) for
slab management. Hmm?

Current page struct is just like this
struct page {
unsigned long flags;
atomic_t _count;
atomic_t _mapcount;
union {
struct {
unsigned long private;
struct address_space *mapping;
spinlock_t ptl;
pgoff_t index;
struct list_head lru;
#if defined(WANT_PAGE_VIRTUAL)
void *virtual;
#endif /* WANT_PAGE_VIRTUAL */
Most fields in the page structure is used for user page, to a core
slab page, these aren't touched at all.
So I think we should define a union
struct page {
unsigned long flags;
struct slab {
struct list_head list;
unsigned long colouroff;
void *s_mem;
unsigned int inuse;
kmem_bufctl_t free;
unsigned short nodeid;
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at