[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d04b9e4f-fc43-f93b-c1a2-2ed9479ffc71@huawei.com>
Date: Wed, 17 Jul 2024 14:59:40 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: Michal Hocko <mhocko@...e.com>
CC: <akpm@...ux-foundation.org>, <nao.horiguchi@...il.com>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] mm/hwpoison: reset hwpoison filter parameters in
pfn_inject_exit()
On 2024/7/17 14:18, Michal Hocko wrote:
> On Wed 17-07-24 10:23:06, Miaohe Lin wrote:
>> On 2024/7/16 16:38, Michal Hocko wrote:
>>> On Tue 16-07-24 11:35:16, Miaohe Lin wrote:
>>>> When hwpoison_inject module is removed, hwpoison_filter_* parameters
>>>> should be reset. Otherwise these parameters will have non-default values
>>>> at next insmod time.
>>>
>>> There is a clear layering broken here. We have mm/memory-failure.c using
>>> values and mm/hwpoison-inject.c defining the values. Both with a
>>> potentially different life time. Shouldn't that be fix instead?
>>
>> In fact, we have mm/memory-failure.c defining and using these values while they can
>> only be modified through mm/hwpoison-inject.c from userspace.
>
> Yes, this is exactly what I mean by broken layering that should be
> fixed.
>
>> The common usecase should be:
>>
>> 1. User set hwpoison filter parameters first through mm/hwpoison-inject.c.
>> 2. Then doing memory hwpoison test through mm/hwpoison-inject.c.
>
> Why does this need to be done through different modules? Why it cannot
> be part of the memory-filure.c?
This is a bold idea for me. :) I think it can be part of the memory-filure.c.
So CONFIG_HWPOISON_INJECT should be removed from the world and then make
hwpoison-inject default on when MEMORY_FAILURE is configured?
Thanks.
.
Powered by blists - more mailing lists