From: Michal Hocko <mhocko@suse.com>
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
mike.kravetz@oracle.com, muchun.song@linux.dev,
rientjes@google.com, souravpanda@google.com
Subject: Re: [PATCH v2] mm: hugetlb_vmemmap: provide stronger vmemmap allocation guarantees
Date: Thu, 13 Apr 2023 20:12:16 +0200 [thread overview]
Message-ID: <ZDhGADdnbIAqdlrg@dhcp22.suse.cz> (raw)
In-Reply-To: <CA+CK2bDCKUDJu+Vx1PF9hsBGzbrN05fkyw7AHAKd0YYfTkhp5g@mail.gmail.com>
On Thu 13-04-23 13:11:39, Pavel Tatashin wrote:
> On Thu, Apr 13, 2023 at 11:25 AM Michal Hocko <mhocko@suse.com> wrote:
> >
> > On Thu 13-04-23 11:05:20, Pavel Tatashin wrote:
[...]
> > > This is a theoretical concern. Freeing a 1G page requires 16M of free
> > > memory. A machine might need to be reconfigured from one task to
> > > another, and release a large number of 1G pages back to the system if
> > > allocating 16M fails, the release won't work.
> >
> > This is really an important "detail" changelog should mention. While I
> > am not really against that change I would much rather see that as a
> > result of a real world fix rather than a theoretical concern. Mostly
> > because a real life scenario would allow us to test the
> > __GFP_RETRY_MAYFAIL effectivness. As that request might fail as well we
> > just end up with a theoretical fix for a theoretical problem. Something
> > that is easy to introduce but much harder to get rid of should we ever
> > need to change __GFP_RETRY_MAYFAIL implementation for example.
>
> I will add this to changelog in v3. If __GFP_RETRY_MAYFAIL is
> ineffective we will receive feedback once someone hits this problem.
I do not remember anybody hitting this with the current __GFP_NORETRY.
So arguably there is nothing to be fixed ATM.
> Otherwise, we will never hear about it. I think overall it is safer to
> keep this code with __GFP_RETRY_MAYFAIL flag.
>
> >
> > > In an ideal scenario we should guarantee that this never fails: that
> > > we always can free HugeTLB pages back to the system. At the very least
> > > we could steal the memory for vmemmap from the page that is being
> > > released.
> >
> > Yes, this really bothered me when the concept was introduced initially.
> > I am always concerned when you need to allocate in order to free memory.
> > Practically speaking we haven't heard about bug reports so maybe this is
> > not such a big deal as I thought.
>
> I suspect this is because at the moment it is not that frequent when a
> machine is reconfigured from having a lot of HugeTLB based workload to
> non-HugeTLB workload.
Yes, hugetlb workloads tend to be pretty static from my experience.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2023-04-13 18:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 19:59 Pasha Tatashin
2023-04-12 20:13 ` Andrew Morton
2023-04-12 20:18 ` Michal Hocko
2023-04-13 15:05 ` Pasha Tatashin
2023-04-13 15:25 ` Michal Hocko
2023-04-13 17:11 ` Pasha Tatashin
2023-04-13 18:12 ` Michal Hocko [this message]
2023-04-15 0:47 ` David Rientjes
2023-04-17 8:33 ` Michal Hocko
2023-04-17 18:51 ` Mike Kravetz
2023-04-13 14:59 ` Pasha Tatashin
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=ZDhGADdnbIAqdlrg@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=muchun.song@linux.dev \
--cc=pasha.tatashin@soleen.com \
--cc=rientjes@google.com \
--cc=souravpanda@google.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