[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <vh3uzody42dfcfduwrhnha3wrjm6wi7awwferzed35zuodn4zu@txo4zpftf2uq>
Date: Tue, 25 Feb 2025 13:42:55 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
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 (25/02/24 10:10), Sebastian Andrzej Siewior wrote:
> 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.
I'm not sure this is true.
> If you run this on !PREEMPTIBLE kernels, preemptible() reports always 0
> so that WARNING will always trigger there.
I thought that preemptible() depends on PREEMPT_COUNT, not on
PREEMPTIBLE, because even on !PREEMPTIBLE preempt-count still
holds hard/soft irq counts, etc.
I ran CONFIG_PREEMPT_NONE=y zram-zstd tests and didn't see any
warnings.
Powered by blists - more mailing lists