linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Miaohe Lin <linmiaohe@huawei.com>
Cc: akpm@linux-foundation.org, nao.horiguchi@gmail.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm/hwpoison: reset hwpoison filter parameters in pfn_inject_exit()
Date: Wed, 17 Jul 2024 08:18:32 +0200	[thread overview]
Message-ID: <ZpdiOAjdSJfkpbr7@tiehlicka> (raw)
In-Reply-To: <c81031da-2722-dea4-0118-9f4911035cae@huawei.com>

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?
-- 
Michal Hocko
SUSE Labs


  reply	other threads:[~2024-07-17  6:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16  3:35 Miaohe Lin
2024-07-16  8:38 ` Michal Hocko
2024-07-17  2:23   ` Miaohe Lin
2024-07-17  6:18     ` Michal Hocko [this message]
2024-07-17  6:59       ` Miaohe Lin
2024-07-17  7:25         ` Michal Hocko
2024-07-17  7:48           ` Miaohe Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZpdiOAjdSJfkpbr7@tiehlicka \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nao.horiguchi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox