From: Michal Hocko <mhocko@suse.com>
To: Baolin Wang <baolin.wang@linux.alibaba.com>, muchun.song@linux.dev
Cc: akpm@linux-foundation.org, osalvador@suse.de, david@redhat.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mm: hugetlb: remove __GFP_THISNODE flag when dissolving the old hugetlb
Date: Tue, 6 Feb 2024 14:19:54 +0100 [thread overview]
Message-ID: <ZcIx-uQm5MUzzyL1@tiehlicka> (raw)
In-Reply-To: <67e0d81f-7125-455c-b02f-a9e675d55c6c@linux.alibaba.com>
On Tue 06-02-24 16:18:22, Baolin Wang wrote:
>
>
> On 2024/2/5 22:23, Michal Hocko wrote:
> > On Mon 05-02-24 21:06:17, Baolin Wang wrote:
> > [...]
> > > > It is quite possible that traditional users (like large DBs) do not use
> > > > CMA heavily so such a problem was not observed so far. That doesn't mean
> > > > those problems do not really matter.
> > >
> > > CMA is just one case, as I mentioned before, other situations can also break
> > > the per-node hugetlb pool now.
> >
> > Is there any other case than memory hotplug which is arguably different
> > as it is a disruptive operation already.
>
> Yes, like I said before the longterm pinning, memory failure and the users
> of alloc_contig_pages() may also break the per-node hugetlb pool.
memory failure is similar to the memory hotplug in the sense that it is
a disruptive operation and fallback to a different node might be the
only option to handle it. On the other hand longterm pinning is similar to
a_c_p and it should fail if it cannot be migrated within the node.
It seems that hugetlb is quite behind with many other features and I am
not really sure how to deal with that. What is your take Munchun Song?
> > > Let's focus on the main point, why we should still keep inconsistency
> > > behavior to handle free and in-use hugetlb for alloc_contig_range()? That's
> > > really confused.
> >
> > yes, this should behave consistently. And the least surprising way to
> > handle that from the user configuration POV is to not move outside of
> > the original NUMA node.
>
> So you mean we should also add __GFP_THISNODE flag in
> alloc_migration_target() when allocating a new hugetlb as the target for
> migration, that can unify the behavior and avoid breaking the per-node pool?
Not as simple as that, because alloc_migration_target is used also from
an user driven migration.
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2024-02-06 13:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 13:31 [RFC PATCH] mm: hugetlb: remove __GFP_THISNODE flag when dissolving the old hugetlb Baolin Wang
2024-02-01 15:27 ` Michal Hocko
2024-02-02 1:35 ` Baolin Wang
2024-02-02 8:17 ` Michal Hocko
2024-02-02 9:29 ` Baolin Wang
2024-02-02 9:55 ` Michal Hocko
2024-02-05 2:50 ` Baolin Wang
2024-02-05 9:15 ` Michal Hocko
2024-02-05 13:06 ` Baolin Wang
2024-02-05 14:23 ` Michal Hocko
2024-02-06 8:18 ` Baolin Wang
2024-02-06 13:19 ` Michal Hocko [this message]
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=ZcIx-uQm5MUzzyL1@tiehlicka \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.