[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251130233718.GY3538@ZenIV>
Date: Sun, 30 Nov 2025 23:37:18 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, x86@...nel.org
Subject: Re: [RFC][alpha] saner vmalloc handling (was Re: [Bug report]
hash_name() may cross page boundary and trigger sleep in RCU context)
On Sun, Nov 30, 2025 at 02:16:13PM -0800, Linus Torvalds wrote:
> On Sat, 29 Nov 2025 at 19:01, Al Viro <viro@...iv.linux.org.uk> wrote:
> >
> > + Default is 8Gb total and under normal circumstances, this is so
> > + far and above what is needed as to be laughable. However, there are
> > + certain applications (such as benchmark-grade in-kernel web serving)
> > + that can make use of as much vmalloc space as is available.
>
> I wonder if we even need the config variable?
>
> Because this reads like the whole feature exists due to the old 'tux'
> web server thing (from the early 2000's - long long gone, never merged
> upstream).
>
> So I'm not sure there are any actual real use-cases for tons of
> vmalloc space on alpha.
>
> Anyway, I see no real objections to the patch, only a "maybe it could
> be cut down even more".
FWIW, I'm trying to figure out what's going on with amd64 in that area;
we used to do allocate-on-demand until 2020, when Joerg went for "let's
preallocate them" and killed arch_sync_kernel_mappings(), which got
reverted soon after, only to be brought back when Joerg had fixed the
bug in preallocation. It stayed that way until this August, when
commit 6659d027998083fbb6d42a165b0c90dc2e8ba989
Author: Harry Yoo <harry.yoo@...cle.com>
Date: Mon Aug 18 11:02:06 2025 +0900
x86/mm/64: define ARCH_PAGE_TABLE_SYNC_MASK and arch_sync_kernel_mappings()
happened, with reference to this
commit 8d400913c231bd1da74067255816453f96cd35b0
Author: Oscar Salvador <osalvador@...e.de>
Date: Thu Apr 29 22:57:19 2021 -0700
x86/vmemmap: handle unpopulated sub-pmd ranges
What I don't understand is how does that manage to avoid the same race -
on #PF amd64 does not bother with vmalloc_fault logics. Exact same
scenario with two vmalloc() on different CPUs would seem to apply here
as well...
Which callers of arch_sync_kernel_mappings() are involved? If it's
anything in mm/vmalloc.c, I really don't see how that could be correct;
if it's about apply_to_page_range() and calls never hit vmalloc space,
we might be OK, but it would be nice to have described somewhere...
Am I missing something obvious here?
Powered by blists - more mailing lists