Re: [PATCHv12 2/4] zbud: add to mm/

From: Bob Liu
Date: Thu May 30 2013 - 21:50:33 EST


Hi Seth,

On 05/31/2013 05:20 AM, Seth Jennings wrote:
> Andrew, Mel,
>
> This struct page stuffing is taking a lot of time to work out and _might_ be
> fraught with peril when memmap peekers are considered.
>
> What do you think about just storing the zbud page metadata inline in the
> memory page in the first zbud page chunk?

How about making zswap based on SLAB? Create a PAGE_SIZE slab and when
zswap need to alloc_page() using kmem_cache_alloc() instead.

So that leave SLAB layer to handler the NUMA problem and do the
dynamical pool size for us.

In this way, an extra struct need to manage the zbud page metadate
instead of using struct page.
But I think it's easy and won't occupy many memory.

>
> Mel, this kinda hurts you plans for making NCHUNKS = 2, since there would
> only be one chunk available for storage and would make zbud useless.
>
> Just a way to sidestep this whole issue. What do you think?
>
> Seth
>

--
Regards,
-Bob
--
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/