lkml.org 
[lkml]   [2023]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCHv2 1/4] zsmalloc: rework zspage chain size selection
    On Mon, Jan 09, 2023 at 12:38:35PM +0900, Sergey Senozhatsky wrote:
    > Computers are bad at division. We currently decide the best
    > zspage chain size (max number of physical pages per-zspage)
    > by looking at a `used percentage` value. This is not enough
    > as we lose precision during usage percentage calculations
    > For example, let's look at size class 208:
    >
    > pages per zspage wasted bytes used%
    > 1 144 96
    > 2 80 99
    > 3 16 99
    > 4 160 99
    >
    > Current algorithm will select 2 page per zspage configuration,
    > as it's the first one to reach 99%. However, 3 pages per zspage
    > waste less memory.
    >
    > Change algorithm and select zspage configuration that has
    > lowest wasted value.
    >
    > Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
    Acked-by: Minchan Kim <minchan@kernel.org>

    \
     
     \ /
      Last update: 2023-03-26 23:41    [W:14.810 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site