Re: [RFC zsmalloc 1/4] zsmalloc: keep max_object in size_class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On (08/10/15 16:12), Minchan Kim wrote:
> Every zspage in a size_class has same max_objects so we could
> move it to a size_class.
> 
> Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
> ---
>  mm/zsmalloc.c | 22 ++++++++++------------
>  1 file changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index f135b1b..491491a 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -33,8 +33,6 @@
>   *	page->freelist: points to the first free object in zspage.
>   *		Free objects are linked together using in-place
>   *		metadata.
> - *	page->objects: maximum number of objects we can store in this
> - *		zspage (class->zspage_order * PAGE_SIZE / class->size)
>   *	page->lru: links together first pages of various zspages.
>   *		Basically forming list of zspages in a fullness group.
>   *	page->mapping: class index and fullness group of the zspage
> @@ -206,6 +204,7 @@ struct size_class {
>  	 * of ZS_ALIGN.
>  	 */
>  	int size;
> +	int max_objects;

may be change it to objs_per_zspage or something similar? we have
class->pages_per_zspage, so class->objs_per_zspage sounds ok.
otherwise, it's class->max_objects, which gives a false feeling
that there is class's limit on objects, not zspages's.

	-ss

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]