[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251130113213.40c8e7a0@pumpkin>
Date: Sun, 30 Nov 2025 11:32:13 +0000
From: david laight <david.laight@...box.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-alpha@...r.kernel.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, 30 Nov 2025 03:01:46 +0000
Al Viro <viro@...iv.linux.org.uk> wrote:
> On Sat, Nov 29, 2025 at 03:37:28AM +0000, Al Viro wrote:
>
> > AFAICS, 32bit arm is similar to 32bit x86 in that respect; propagation
> > is lazier, though - there arch_sync_kernel_mappings() bumps a counter
> > in init_mm and context switches use that to check if propagation needs
> > to be done. No idea how well does that work on vfree() side of things -
> > hadn't looked into that rabbit hole...
>
> BTW, speaking of vmalloc space - does anybody object against sorting
> CONFIG_ALPHA_LARGE_VMALLOC out, so that we wouldn't need to mess
> with that in alpha page fault handler?
>
> Basically, do what amd64 does - something along the lines of (untested)
> patch below. Comments?
How difficult would it be to allocate the pte for the next 8GB on demand
inside vmalloc(), and then propagate it to the per-task page tables.
That is a path than can sleep, so being slow if it needs to synchronise
with other cpu shouldn't matter - especially since it won't happen often.
That should be moderately generic code and would let the vmalloc limit
be 'soft'; perhaps based on physical memory size, and even be raisable
from a sysctl.
Likely more use for very large x86-64 and arm-64 systems than alpha.
David
Powered by blists - more mailing lists