[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5mgpezzqrr6xzmp6w27ggmv4f2gydyeuhejwmnxsvcw43mcf5x@rxw2zcnjqfuc>
Date: Wed, 12 Mar 2025 13:52:18 -0700
From: Shakeel Butt <shakeel.butt@...ux.dev>
To: SeongJae Park <sj@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
"Liam R. Howlett" <howlett@...il.com>, David Hildenbrand <david@...hat.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Vlastimil Babka <vbabka@...e.cz>, kernel-team@...a.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 1/4] mm/madvise: use is_memory_failure() from
madvise_do_behavior()
On Wed, Mar 12, 2025 at 09:47:47AM -0700, SeongJae Park wrote:
> To reduce redundant open-coded checks of CONFIG_MEMORY_FAILURE and
> MADV_{HWPOISON,SOFT_OFFLINE} in madvise_[un]lock(), is_memory_failure()
> is introduced. madvise_do_behavior() is still doing the same open-coded
> check, though. Use is_memory_failure() instead.
>
> To avoid build failure on !CONFIG_MEMORY_FAILURE case, implement an
> empty madvise_inject_error() under the config. Also move the definition
> of is_memory_failure() inside #ifdef CONFIG_MEMORY_FAILURE clause for
> madvise_inject_error() definition, to reduce duplicated ifdef clauses.
>
> Signed-off-by: SeongJae Park <sj@...nel.org>
> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Reviewed-by: Shakeel Butt <shakeel.butt@...ux.dev>
Powered by blists - more mailing lists