[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240504060211.GG14947@google.com>
Date: Sat, 4 May 2024 15:02:11 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Minchan Kim <minchan@...nel.org>, linux-kernel@...r.kernel.org,
linux-block@...r.kernel.org
Subject: Re: [PATCH 13/14] zram: add dictionary support to zstd backend
On (24/05/03 18:17), Sergey Senozhatsky wrote:
> This adds support for pre-trained zstd dictionaries [1]
> Dictionary is loaded once (per-config) and then loaded to Cctx
> and Dctx by reference, so we don't allocate extra memory.
>
> The patch is a little non-trivial, as it seems that noone
> ever attempted to use dictionaries in the linux kernel
> port of zstd.
>
> It also uses GFP_KERNEL gfp in Cctx customAlloc(). We probably
> would want to do something about it. Either make sure that we
> always (somehow) fully setup all Cctx contexts from non-atomic
> context before we attempt to use them, come up with some sort
> of custom allocator or stop calling zcomp_compress() from atomic
> context.
>
> [1] https://github.com/facebook/zstd/blob/dev/programs/zstd.1.md#dictionary-builder
JFI
I reworked this patch quite significantly in v2 of the series.
I guess I'll post it soon.
Powered by blists - more mailing lists