linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: Muchun Song <songmuchun@bytedance.com>
Cc: gregkh@linuxfoundation.org, rafael@kernel.org,
	akpm@linux-foundation.org, osalvador@suse.de, david@redhat.com,
	andi@firstfloor.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, muchun.song@linux.dev
Subject: Re: [PATCH RESEND] mm: hugetlb: simplify per-node sysfs creation and removal
Date: Fri, 19 Aug 2022 16:41:23 -0700	[thread overview]
Message-ID: <YwAfo/y/4WqVeBZ1@monkey> (raw)
In-Reply-To: <20220819080029.12241-1-songmuchun@bytedance.com>

On 08/19/22 16:00, Muchun Song wrote:
> The following commit offload per-node sysfs creation and removal to a kworker and
> did not say why it is needed.  And it also said "I don't know that this is
> absolutely required".  It seems like the author was not sure as well.  Since it
> only complicates the code, this patch will revert the changes to simplify the code.
> 
>   39da08cb074c ("hugetlb: offload per node attribute registrations")
> 
> We could use memory hotplug notifier to do per-node sysfs creation and removal
> instead of inserting those operations to node registration and unregistration.
> Then, it can reduce the code coupling between node.c and hugetlb.c.  Also, it can
> simplify the code.
> 
> Signed-off-by: Muchun Song <songmuchun@bytedance.com>
> ---

Looking at commit 39da08cb074c, it mentions that other memory register/unregister
handlers use work queues.  That seemed to be true at the time, but those handlers
have been rewritten or no longer exist.  With a quick look, I did not find any
memory notifiers doing so today.

I certainly like decoupling node driver and hugetlb code.  By no means am I an
expert in the hotplug interfaces.  I could not find any issues in moving the
functionality to memory hotplug notification.  FWICT, functionality should be

> 
> Cc Andi per Greg.
> 
>  drivers/base/node.c  | 139 ++-------------------------------------------------
>  include/linux/node.h |  24 ++-------
>  mm/hugetlb.c         |  45 +++++++++++------
>  3 files changed, 36 insertions(+), 172 deletions(-)

Acked-by: Mike Kravetz <mike.kravetz@oracle.com>
-- 
Mike Kravetz


  reply	other threads:[~2022-08-19 23:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  8:00 Muchun Song
2022-08-19 23:41 ` Mike Kravetz [this message]
2022-08-23 10:21 ` David Hildenbrand
2022-08-24  3:23   ` Muchun Song
2022-09-01  6:35     ` Muchun Song
2022-09-01  6:57       ` David Hildenbrand
2022-09-01  7:57         ` Muchun Song

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=YwAfo/y/4WqVeBZ1@monkey \
    --to=mike.kravetz@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=david@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=osalvador@suse.de \
    --cc=rafael@kernel.org \
    --cc=songmuchun@bytedance.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