From: Mikulas Patocka <mpatocka@redhat.com>
To: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Christoph Hellwig <hch@infradead.org>,
Michal Hocko <mhocko@suse.com>,
Uladzislau Rezki <urezki@gmail.com>,
"Vishal Moola (Oracle)" <vishal.moola@gmail.com>,
SeongJae Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
zkabelac@redhat.com, Matthew Sakai <msakai@redhat.com>,
linux-mm@kvack.org, dm-devel@lists.linux.dev
Subject: Re: [PATCH] mm: allow __GFP_RETRY_MAYFAIL in vmalloc
Date: Mon, 2 Mar 2026 18:33:53 +0100 (CET) [thread overview]
Message-ID: <5382696e-25e0-cd41-0a63-a79f019cb6ae@redhat.com> (raw)
In-Reply-To: <aZ2zPzyoFUUNWdJ7@linux.dev>
On Tue, 24 Feb 2026, Shakeel Butt wrote:
> On Tue, Feb 24, 2026 at 06:03:13AM -0800, Christoph Hellwig wrote:
> > On Tue, Feb 24, 2026 at 01:22:36PM +0100, Michal Hocko wrote:
> > > One thing that we could do to improve __GFP_RETRY_MAYFAIL resp.
> > > __GFP_NORETRY is to use NOWAIT allocation semantic for page table
> > > allocations as those could be achieved by scoped allocation context.
> > > This could cause pre-mature failure after the whole bunch of memory has
> > > already been allocated for the backing pages but considering that page
> > > table allocations should be more and more rare over system runtime it
> > > might be just a reasonable workaround. WDYT?
> >
> > Why bother? __GFP_RETRY_MAYFAIL has pretty lose semantics. Trying
> > too hard to allocate PTEs is not breaking the overall concept.
> >
>
> One thing __GFP_RETRY_MAYFAIL is very clear about is to not trigger the
> oom-killer which is not the case for GFP_KERNEL. There are users who explicitly
> use __GFP_RETRY_MAYFAIL to avoid oom-killer.
>
> Mikulas, is that the reason you are using __GFP_RETRY_MAYFAIL in your use-case?
The VDO is deduplication storage driver - it needs to allocate large
amounts of memory - for each disk block, it needs to store hash of the
data in memory to be able to detect blocks with duplicate data.
If the VDO driver attempts to allocate more memory than what is available,
we want the allocation to fail; we don't want to kill user processes.
Mikulas
next prev parent reply other threads:[~2026-03-02 17:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 16:33 Mikulas Patocka
2026-02-21 1:19 ` SeongJae Park
2026-02-23 5:48 ` Anshuman Khandual
2026-02-23 19:02 ` Vishal Moola (Oracle)
2026-02-23 19:25 ` Mikulas Patocka
2026-02-23 20:07 ` Uladzislau Rezki
2026-02-23 22:08 ` Michal Hocko
2026-02-24 11:39 ` Uladzislau Rezki
2026-02-24 12:22 ` Michal Hocko
2026-02-24 14:03 ` Christoph Hellwig
2026-02-24 14:22 ` Shakeel Butt
2026-02-24 14:26 ` Christoph Hellwig
2026-02-24 14:34 ` Michal Hocko
2026-03-02 17:33 ` Mikulas Patocka [this message]
2026-02-24 15:38 ` Uladzislau Rezki
2026-02-24 15:44 ` Michal Hocko
2026-02-24 15:51 ` Michal Hocko
2026-02-24 16:07 ` Uladzislau Rezki
2026-02-25 8:33 ` Uladzislau Rezki
2026-02-25 11:46 ` Michal Hocko
2026-03-02 9:50 ` Uladzislau Rezki
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=5382696e-25e0-cd41-0a63-a79f019cb6ae@redhat.com \
--to=mpatocka@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dm-devel@lists.linux.dev \
--cc=hch@infradead.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=msakai@redhat.com \
--cc=shakeel.butt@linux.dev \
--cc=sj@kernel.org \
--cc=urezki@gmail.com \
--cc=vishal.moola@gmail.com \
--cc=zkabelac@redhat.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