Re: [PATCHv4 7/9] zram: add pages_per_pool_page device attribute

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

 



On (22/10/31 14:41), Sergey Senozhatsky wrote:
[..]
>  	zram->mem_pool = zs_create_pool(zram->disk->disk_name,
> -					ZS_DEFAULT_PAGES_PER_ZSPAGE);
> +					zram->pages_per_pool_page);
>  	if (!zram->mem_pool) {
>  		vfree(zram->table);
>  		return false;
> @@ -2174,6 +2213,7 @@ static DEVICE_ATTR_RW(writeback_limit_enable);
>  static DEVICE_ATTR_RW(recomp_algorithm);
>  static DEVICE_ATTR_WO(recompress);
>  #endif
> +static DEVICE_ATTR_RW(pages_per_pool_page);

May be we can have a more generic "allocator_tunables" device attribute,
which will support named parameters instead. E.g.

	pool_page_len_limit=INT

And more in the future.

Having hard times coming up with good names here. max_pages_per_zspage
is too low level and exposes zsmalloc internals, while in theory zram
can use different allocators at some point, and those allocators can
have different tunables.




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

  Powered by Linux