[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v1 3/6] mm: Avoid calling page allocator from apply_to_page_range()
- To: Ryan Roberts <ryan.roberts@xxxxxxx>
- From: "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>
- Date: Fri, 30 May 2025 15:08:59 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=I+DxlQAbrpaOCVfQVyLgrK9X1SNPjzSzIGLlfFmHbLc=; b=QWh4UjgstVjzu6qvtWYkgrFHzt8Qp7B4JQ02a4nX8jxzyyuK3XhFFMc1X+HIGnUmREP1jZiRQcklth4jpBuCT+4CGI9UnpY5Zpjq60w7vH4isKxyrJuj5mnvRC/AuzYgiYzRKZLTF7xL9ZGnRRNYbA3Wsc/U2cLcoDy163s3XaKkm28+zElgxA6BV5UdX2KQerRu7QJP9SnQt5oTql+FUI0Xxhk1BmCV3SPMcz9hbxVgYJo3DNdsDD5IAtw38vY8WSCNhNGSSzLlW80HLjCSsxT0SBiAAiedstaRlzrDbEyLfC2ZEM2thLBhqBYkA5RCtAPPPBbgNdqZ4FJDr8SbbQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fV83HSaVXL0nwGdOC7JLeoNVWKvDHT8TulziKNYJRcEwT67HYlN/96q0r75Pj/f+Kz2gEabRRXz6MDrJlowy0L22Qv0VQi/ep9nus/ctQ2M0/ZRb67FIZUdKo7Sa2/7IKv6toPu9UEGxBsUAAcZopTKBdwlZI1+ddFFncm3lMSipSfuDu7uSrPanTOy5xg2SYK+c/PUBaPS7Vz16Hz1Pp5w/+k1HejxV3b2Kc1YFhdYCSupzy26iUbmpIMj9pz4YvTS+MIEknrVAgILM6dL9+C2+Jq6pw9P7KZtGQnAHsv9S+o8u24HgdfBtGcpfAYaCaK8RGnUN2U0Dzva0waWziw==
- Cc: Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Andreas Larsson <andreas@xxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Ajay Kaher <ajay.kaher@xxxxxxxxxxxx>, Alexey Makhalov <alexey.makhalov@xxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>, Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>, Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Alexei Starovoitov <ast@xxxxxxxxxx>, Andrey Ryabinin <ryabinin.a.a@xxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
- Delivery-date: Fri, 30 May 2025 19:10:31 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Mail-followup-to: "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>, Ryan Roberts <ryan.roberts@xxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Andreas Larsson <andreas@xxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Ajay Kaher <ajay.kaher@xxxxxxxxxxxx>, Alexey Makhalov <alexey.makhalov@xxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>, Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>, Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Alexei Starovoitov <ast@xxxxxxxxxx>, Andrey Ryabinin <ryabinin.a.a@xxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
* Ryan Roberts <ryan.roberts@xxxxxxx> [250530 12:50]:
...
> >
> >
> > These wrappers are terrible for readability and annoying for argument
> > lists too.
>
> Agreed.
>
> >
> > Could we do something like the pgtbl_mod_mask or zap_details and pass
> > through a struct or one unsigned int for create and lazy_mmu?
>
> Or just create some enum flags?
>
> >
> > At least we'd have better self-documenting code in the wrappers.. and if
> > we ever need a third boolean, we could avoid multiplying the wrappers
> > again.
> >
> > WDYT?
>
> I'm happy with either approach. I was expecting more constination about the
> idea
> of being able to disable lazy mode though, so perhaps I'll wait and see if any
> arrives. If it doesn't... flags?
Yes, that works as well. Please use pmd_flags or anything more
descriptive than just 'flags' :)
I wonder which approach is best in asm instructions and self-documenting
code.
Regards,
Liam
|