On Fri, Jan 03, 2025 at 07:58:13AM +0100, Jürgen Groß wrote:
> On 03.01.25 03:06, Andrew Cooper wrote:
> > > Hi Mike,
> > >
> > > This commit is making my intel box not boot in mm-unstable :>) I bisected
> > > it to
> > > this commit.
> >
> > For what it's worth, we've found the same under Xen t
Generic implementations of __pgd_alloc and __pgd_free are about to
be introduced. Rename the macros in arch/arm/mm/pgd.c to avoid
clashes. While we're at it, also pass down the mm as argument to
those helpers, as it will be needed to call the generic
__pgd_{alloc,free}.
Acked-by: Dave Hansen
Sign
Following on from the introduction of P4D-level ctor/dtor, let's
finish the job and introduce ctor/dtor at PGD level. The incurred
improvement in page accounting is minimal - the main motivation is
to create a single, generic place where construction/destruction
hooks can be added for all page tabl
We already have a generic implementation of alloc/free up to P4D
level, as well as pgd_free(). Let's finish the work and add a
generic PGD-level alloc helper as well.
Unlike at lower levels, almost all architectures need some specific
magic at PGD level (typically initialising PGD entries), so
int
get_pointer_table() and free_pointer_table() already special-case
TABLE_PTE to call pagetable_pte_[cd]tor. Let's do the same at PMD
level to improve accounting further. TABLE_PGD and TABLE_PMD are
currently defined to the same value, so we first need to separate
them. That also implies separating p
The implementation of pmd_{alloc_one,free} on parisc requires a
non-zero allocation order, but is completely standard aside from
that. Let's reuse the generic implementation of pmd_alloc_one().
Explicit zeroing is not needed as GFP_PGTABLE_KERNEL includes
__GFP_ZERO. The generic pmd_free() can hand
pagetable_*_ctor all have the same basic implementation. Move the
common part to a helper to reduce duplication.
Acked-by: Dave Hansen
Signed-off-by: Kevin Brodsky
---
include/linux/mm.h | 28
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/include/l
v1:
https://lore.kernel.org/linux-mm/20241219164425.2277022-1-kevin.brod...@arm.com/
This series should be considered in conjunction with Qi's series [1].
Together, they ensure that page table ctor/dtor are called at all levels
(PTE to PGD) and all architectures, where page tables are regular pag
On 03/01/2025 10:35, Qi Zheng wrote:
> On 2025/1/3 17:13, Qi Zheng wrote:
>> On 2025/1/3 16:02, Kevin Brodsky wrote:
>>> On 03/01/2025 04:48, Qi Zheng wrote:
[...]
In __tlb_batch_free_encoded_pages(), we can indeed detect PageTable()
and call pagetable_dtor() to dtor the page ta
On Fri, Dec 27, 2024 at 09:28:18AM +0200, Mike Rapoport wrote:
> From: "Mike Rapoport (Microsoft)"
>
> The CPA_ARRAY test always uses len[1] as numpages argument to
> change_page_attr_set() although the addresses array is different each
> iteration of the test loop.
>
> Replace len[1] with len[i
On Sat, Dec 28, 2024 at 11:26:22AM +0200, Mike Rapoport wrote:
> On Mon, Dec 23, 2024 at 05:41:01PM +0800, Qi Zheng wrote:
> > Here we are explicitly dealing with struct page, and the following logic
> > semms strange:
> >
> > tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte)));
> >
> > tlb_remove_
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
On Thu, Jan 02, 2025 at 09:57:14PM -0800, Andrew Morton wrote:
> On Fri, 3 Jan 2025 02:06:10 + Andrew Cooper
> wrote:
>
> > > Hi Mike,
> > >
> > > This commit is making my intel box not boot in mm-unstable :>) I bisected
> > > it to
> > > thi
+Qi
On 03/01/2025 11:31, Alexandre Ghiti wrote:
> Hi Kevin,
>
> On 19/12/2024 17:44, Kevin Brodsky wrote:
>> {pmd,pud,p4d}_alloc_one() is never called if the corresponding page
>> table level is folded, as {pmd,pud,p4d}_alloc() already does the
>> required check. We can therefore remove the runtim
Hi Kevin,
On 19/12/2024 17:44, Kevin Brodsky wrote:
{pmd,pud,p4d}_alloc_one() is never called if the corresponding page
table level is folded, as {pmd,pud,p4d}_alloc() already does the
required check. We can therefore remove the runtime page table level
checks in {pud,p4d}_alloc_one. The PUD hel
On 2025/1/3 17:13, Qi Zheng wrote:
On 2025/1/3 16:02, Kevin Brodsky wrote:
On 03/01/2025 04:48, Qi Zheng wrote:
Hi Kevin,
On 2025/1/3 00:53, Kevin Brodsky wrote:
On 30/12/2024 10:07, Qi Zheng wrote:
static inline void riscv_tlb_remove_ptdesc(struct mmu_gather *tlb,
void *pt)
{
-
On 20/12/2024 20:31, Dave Hansen wrote:
> On 12/20/24 02:58, Kevin Brodsky wrote:
>>> One super tiny nit is that the PAE pgd _can_ be allocated using
>>> __get_free_pages(). It was originally there for Xen, but I think it's
>>> being used for PTI only at this point and the comments are wrong-ish.
>
On 2025/1/3 16:02, Kevin Brodsky wrote:
On 03/01/2025 04:48, Qi Zheng wrote:
Hi Kevin,
On 2025/1/3 00:53, Kevin Brodsky wrote:
On 30/12/2024 10:07, Qi Zheng wrote:
static inline void riscv_tlb_remove_ptdesc(struct mmu_gather *tlb,
void *pt)
{
- if (riscv_use_sbi_for_rfence())
+
On 03/01/2025 04:48, Qi Zheng wrote:
> Hi Kevin,
>
> On 2025/1/3 00:53, Kevin Brodsky wrote:
>> On 30/12/2024 10:07, Qi Zheng wrote:
>>> static inline void riscv_tlb_remove_ptdesc(struct mmu_gather *tlb,
>>> void *pt)
>>> {
>>> - if (riscv_use_sbi_for_rfence())
>>> + if (riscv_use_sbi_for
18 matches
Mail list logo