Re: [TECH TOPIC] Reaching consensus on CONFIG_HIGHMEM phaseout

Arnd Bergmann
2025-09-11T07:55:49Z

On Thu, Sep 11, 2025, at 07:38, Andreas Larsson wrote:
>
> We have a upcoming SoC with support for up to 16 GiB of DRAM. When that is
> used in LEON sparc32 configuration (using 36-bit physical addressing), a
> removed CONFIG_HIGHMEM would be a considerable limitation, even after an
> introduction of different CONFIG_VMSPLIT_* options for sparc32.

I agree that without highmem that chip is going to be unusable from Linux,
but I wonder if there is a chance to actually use it even with highmem,
for a combination of reasons:

- sparc32 has 36-bit addressing in the MMU, but Linux apparently never
supported a 64-bit phys_addr_t here, which would be required.
This is probably the easiest part and I assume you already have patches
for it.

- As far as I can tell, the current lowmem area is 192MB, which would
be ok(-ish) on a 512MB maxed-out SPARCstation, but for anything bigger
you likely run out of lowmem long before being able to touch the
all highmem pages. This obviously depends a lot on the workload.

- If you come up with patches to extend lowmem to 2GB at the expense
of a lower TASK_SIZE, you're still looking at a ration of 7:1 with
14GB of highmem on the maxed-out configuration, so many workloads
would still struggle to actually use that memory for page cache.

- If we remove HIGHPTE (as discussed in this thread) but keep HIGHMEM,
you probably still lose on the 16GB configuration. On 4GB configurations,
HIGHPTE is not really a requirement, but for workloads with many
concurrent tasks using a lot of virtual address space, you would
likely want to /add/ HIGHPTE support on sparc32 first.

When you say "used in LEON sparc32 configuration", does that mean
you can also run Linux in some other confuration like an rv64
kernel on a NOEL-V core on that chip?

Aside from the upcoming SoC and whatever happens to that, what is
the largest LEON Linux memory configuration that you know is used
in production today and still requires kernel updates beyond ~2029?

Arnd