lkml.org 
[lkml]   [2017]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm/zsmalloc: simplify zs_max_alloc_size handling
From
Date
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_DELTA)
>
> #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \
> ZS_SIZE_CLASS_DELTA) + 1)
>
>
> I think it should add +1 to cover ZS_MIN_ALLOC_SIZE.

Yes, obviously. Sorry about that.

> Otherwise, looks good to me.
>
> Thanks.
>


[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-06-30 23:11    [W:0.056 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site