Re: [PATCH] mm/zsmalloc: simplify zs_max_alloc_size handling

2017-06-30 Thread Jerome Marchand
On 06/30/2017 03:24 AM, Minchan Kim wrote: >> @@ -137,6 +142,8 @@ >> * (reason above) >> */ >> #define ZS_SIZE_CLASS_DELTA (PAGE_SIZE >> CLASS_BITS) >> +#define ZS_SIZE_CLASSES DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - >> ZS_MIN_ALLOC_SIZE, \ >> + ZS_SIZE_CLASS_DEL

Re: [PATCH] mm/zsmalloc: simplify zs_max_alloc_size handling

2017-06-29 Thread Minchan Kim
Hi Jerome, On Wed, Jun 28, 2017 at 10:14:20AM +0200, Jerome Marchand wrote: > Commit 40f9fb8cffc6 ("mm/zsmalloc: support allocating obj with size of > ZS_MAX_ALLOC_SIZE") fixes a size calculation error that prevented > zsmalloc to allocate an object of the maximal size > (ZS_MAX_ALLOC_SIZE). I thi

[PATCH] mm/zsmalloc: simplify zs_max_alloc_size handling

2017-06-28 Thread Jerome Marchand
Commit 40f9fb8cffc6 ("mm/zsmalloc: support allocating obj with size of ZS_MAX_ALLOC_SIZE") fixes a size calculation error that prevented zsmalloc to allocate an object of the maximal size (ZS_MAX_ALLOC_SIZE). I think however the fix is unneededly complicated. This patch replaces the dynamic calcul