• Nhat Pham's avatar
    zswap: export compression failure stats · cb61dad8
    Nhat Pham authored
    During a zswap store attempt, the compression algorithm could fail (for
    e.g due to the page containing incompressible random data).  This is not
    tracked in any of existing zswap counters, making it hard to monitor for
    and investigate.  We have run into this problem several times in our
    internal investigations on zswap store failures.
    
    This patch adds a dedicated debugfs counter for compression algorithm
    failures.
    
    Link: https://lkml.kernel.org/r/20231024234509.2680539-1-nphamcs@gmail.com
    
    Signed-off-by: default avatarNhat Pham <nphamcs@gmail.com>
    Reviewed-by: default avatarSergey Senozhatsky <senozhatsky@chromium.org>
    Cc: Dan Streetman <ddstreet@ieee.org>
    Cc: Domenico Cerasuolo <cerasuolodomenico@gmail.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@kernel.org>
    Cc: Muchun Song <muchun.song@linux.dev>
    Cc: Roman Gushchin <roman.gushchin@linux.dev>
    Cc: Seth Jennings <sjenning@redhat.com>
    Cc: Shakeel Butt <shakeelb@google.com>
    Cc: Vitaly Wool <vitaly.wool@konsulko.com>
    Cc: Yosry Ahmed <yosryahmed@google.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    cb61dad8
zswap.c 43.1 KB