[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250224091036.Y9fHrKr-@linutronix.de>
Date: Mon, 24 Feb 2025 10:10:36 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Yosry Ahmed <yosry.ahmed@...ux.dev>,
Hillf Danton <hdanton@...a.com>, Kairui Song <ryncsn@...il.com>,
Minchan Kim <minchan@...nel.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 14/17] zram: permit reclaim in zstd custom allocator
On 2025-02-22 07:25:45 [+0900], Sergey Senozhatsky wrote:
> static void *zstd_custom_alloc(void *opaque, size_t size)
> {
> - if (!preemptible())
> + /* Technically this should not happen */
> + if (WARN_ON_ONCE(!preemptible()))
> return kvzalloc(size, GFP_ATOMIC);
This check works only on preemptible kernels.
If you run this on !PREEMPTIBLE kernels, preemptible() reports always 0
so that WARNING will always trigger there.
> - return kvzalloc(size, __GFP_KSWAPD_RECLAIM | __GFP_NOWARN);
> + return kvzalloc(size, GFP_NOIO | __GFP_NOWARN);
> }
>
> static void zstd_custom_free(void *opaque, void *address)
> --
> 2.48.1.601.g30ceb7b040-goog
>
Sebastian
Powered by blists - more mailing lists