Thread (3 messages) 3 messages, 2 authors, 2023-06-01

Re: [PATCH v3 03/34] s390: Use pt_frag_refcount for pagetables

From: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Date: 2023-06-01 13:19:56
Also in: kvm, linux-arch, linux-arm-kernel, linux-m68k, linux-mips, linux-riscv, linux-s390, linux-um, linuxppc-dev, loongarch, sparclinux, xen-devel

 On Wed, 31 May 2023 14:30:01 -0700
"Vishal Moola (Oracle)" [off-list ref] wrote:
s390 currently uses _refcount to identify fragmented page tables.
The page table struct already has a member pt_frag_refcount used by
powerpc, so have s390 use that instead of the _refcount field as well.
This improves the safety for _refcount and the page table tracking.

This also allows us to simplify the tracking since we can once again use
the lower byte of pt_frag_refcount instead of the upper byte of _refcount.
This would conflict with s390 impact of pte_free_defer() work from Hugh Dickins
https://lore.kernel.org/lkml/35e983f5-7ed3-b310-d949-9ae8b130cdab@google.com/ (local)
https://lore.kernel.org/lkml/6dd63b39-e71f-2e8b-7e0-83e02f3bcb39@google.com/ (local)

There he uses pt_frag_refcount, or rather pt_mm in the same union, to save
the mm_struct for deferred pte_free().

I still need to look closer into both of your patch series, but so far it
seems that you have no hard functional requirement to switch from _refcount
to pt_frag_refcount here, for s390.

If this is correct, and you do not e.g. need this to make some other use
of _refcount, I would suggest to drop this patch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help