From: Kent Overstreet <kent.overstreet@linux.dev>
To: Suren Baghdasaryan <surenb@google.com>
Cc: Usama Arif <usamaarif642@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
hannes@cmpxchg.org, shakeel.butt@linux.dev, vlad.wing@gmail.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH 1/2] mm: slub: allocate slab object extensions non-contiguously
Date: Tue, 20 May 2025 13:25:52 -0400 [thread overview]
Message-ID: <l7sk6ga4ckxo27wfbkqrmbu6yfu3ia4sttkhki6hh2omjbxkxv@fxwjog4jmjwu> (raw)
In-Reply-To: <CAJuCfpHqGQKgU=rnJbZnbyTs3vKL-gEjLp1Yw1idWUzdkjZsLA@mail.gmail.com>
On Tue, May 20, 2025 at 10:20:23AM -0700, Suren Baghdasaryan wrote:
> On Tue, May 20, 2025 at 9:41 AM Kent Overstreet
> <kent.overstreet@linux.dev> wrote:
> I see your point. One case we would want to use vmalloc is if the
> allocation is sizable (multiple pages), so failing it does not mean
> critical memory pressure level yet. I don't think today's extension
> vectors would be large enough to span multiple pages. That would
> require a rather large obj_per_slab and in most cases I think this
> change would not affect current behavior, the allocations will be
> smaller than PAGE_SIZE and kvmalloc will fail anyway.
> I guess the question is whether we want to fail if allocation size is
> higher than PAGE_SIZE but less than PAGE_ALLOC_COSTLY_ORDER. Failing
> that I think is reasonable and I don't think any extension vector will
> be large enough to reach PAGE_ALLOC_COSTLY_ORDER. So, I'm ok with
> dropping this part of the patchset.
Johannes raisess more pertinent points, so I think vmalloc allocation is
out.
If it turns out that extension vector allocation failures do cause real
problems (not for memory allocation profiling, but maybe someone is
depending on memcg being precise), I think it would acceptable to dip
into reserves for them, since they're a small fraction of the slabs
themselves.
With the caveat that we'd need to look at how the reserves are sized, to
make sure we're not running them empty and causing new problems
elsewhere.
But just failing the allocation should probably be the default approach
here.
next prev parent reply other threads:[~2025-05-20 17:26 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 12:25 Usama Arif
2025-05-20 12:25 ` [PATCH 2/2] mm: slub: only warn once when allocating slab obj extensions fails Usama Arif
2025-05-20 13:34 ` Harry Yoo
2025-05-20 13:42 ` Usama Arif
2025-05-20 14:18 ` Shakeel Butt
2025-05-20 15:14 ` Suren Baghdasaryan
2025-05-20 15:22 ` Usama Arif
2025-05-22 0:16 ` Harry Yoo
2025-05-22 12:42 ` Usama Arif
2025-05-20 13:44 ` [PATCH 1/2] mm: slub: allocate slab object extensions non-contiguously Kent Overstreet
2025-05-20 13:46 ` Usama Arif
2025-05-20 14:01 ` Kent Overstreet
2025-05-20 14:24 ` Shakeel Butt
2025-05-20 14:28 ` Kent Overstreet
2025-05-20 17:44 ` Uladzislau Rezki
2025-05-20 17:47 ` Kent Overstreet
2025-05-20 17:57 ` Uladzislau Rezki
2025-05-20 17:58 ` Kent Overstreet
2025-05-20 18:59 ` Uladzislau Rezki
2025-05-20 14:13 ` Usama Arif
2025-05-20 15:20 ` Suren Baghdasaryan
2025-05-20 16:41 ` Kent Overstreet
2025-05-20 17:20 ` Suren Baghdasaryan
2025-05-20 17:25 ` Kent Overstreet [this message]
2025-05-20 17:18 ` Johannes Weiner
2025-05-20 14:01 ` Usama Arif
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=l7sk6ga4ckxo27wfbkqrmbu6yfu3ia4sttkhki6hh2omjbxkxv@fxwjog4jmjwu \
--to=kent.overstreet@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=usamaarif642@gmail.com \
--cc=vlad.wing@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