[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 8/9] mm: introduce and use vm_normal_page_pud()
- To: David Hildenbrand <david@xxxxxxxxxx>
- From: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
- Date: Fri, 18 Jul 2025 13:44:25 +0100
- 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=mRbte1Ja8g0hfJ+fj89iBw9tCWBmZa+qTohmOd0Lmvs=; b=xLPkzvP9eS7ki47/OpSCaFa7sda4dYFcVCpzcY4J2hG+jkQOivVri2d3WhZNM2qOYfhVDkhAzjG+h+pvq3XELjGNSjy/AHpad2AzfR3Ya3AeoVye/8h9nwa3+baCvdzKHKu6qBB82UBcdS9c2kDqqNocwyGuPAphHoTinOZsoUlf+xmv6xLg/C8xW/tSCxnPhfBJOu3BiMlurFebr4xCizRDvKB85Bz/f1xpImFEARzr02UhyfQfgBAfVl6jwE2Ma7iM1COWQ+Vb0mVuhrkXbX8zyRqTJMQSYr0TqrAlbx7AtJfF5idwdbHevBK0MESgqK/bb6lf4jdUpurHu95q0g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=prDwcb3yjkvYN2IfYS/YRjCzzr5KBdGOKDy4WexbGR20DAHpsp1hlKnciFFbnIZJ+CpW0GK00XGLsoddXhcwFcs+nnNDy+YPZZ8mL4NrJZdvvM2RiKzVVxMW310qlJY5JkfvEr5AKnTPMhS6oy3VRUrP1zKUVgSko8dHhEkiVbRzVz+1MBpctqAe0sJtIDMlxuuLNDC/LN8Dc6CKAJWYSd4Py7lyATlRcg1977Er/ljTmza+OowP65BnouMr8wYZPPlo8ZnxeoVbuD14/QLiQAJVfQaK1kM1tG0cksFhpG6O6VxZHSwxKNvG70+9+rMLInjWTDc1B/FY9XbqOidEXw==
- Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, nvdimm@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Christian Brauner <brauner@xxxxxxxxxx>, "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>, Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Zi Yan <ziy@xxxxxxxxxx>, Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>, Nico Pache <npache@xxxxxxxxxx>, Ryan Roberts <ryan.roberts@xxxxxxx>, Dev Jain <dev.jain@xxxxxxx>, Barry Song <baohua@xxxxxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>, Pedro Falcato <pfalcato@xxxxxxx>, Hugh Dickins <hughd@xxxxxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>, Lance Yang <lance.yang@xxxxxxxxx>
- Delivery-date: Fri, 18 Jul 2025 12:45:58 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Jul 18, 2025 at 01:06:30PM +0200, David Hildenbrand wrote:
> On 18.07.25 12:47, Lorenzo Stoakes wrote:
> > On Thu, Jul 17, 2025 at 10:14:33PM +0200, David Hildenbrand wrote:
> > > On 17.07.25 22:03, Lorenzo Stoakes wrote:
> > > > On Thu, Jul 17, 2025 at 01:52:11PM +0200, David Hildenbrand wrote:
> > > > > Let's introduce vm_normal_page_pud(), which ends up being fairly
> > > > > simple
> > > > > because of our new common helpers and there not being a PUD-sized zero
> > > > > folio.
> > > > >
> > > > > Use vm_normal_page_pud() in folio_walk_start() to resolve a TODO,
> > > > > structuring the code like the other (pmd/pte) cases. Defer
> > > > > introducing vm_normal_folio_pud() until really used.
> > > >
> > > > I mean fine :P but does anybody really use this?
> > >
> > > This is a unified PFN walker (!hugetlb + hugetlb), so you can easily run
> > > into hugetlb PUDs, DAX PUDs and huge pfnmap (vfio) PUDs :)
> >
> > Ahhh ok. I hate hugetlb so very very much.
> >
> > Oscar is doing the Lord's work improving things but the trauma is still
> > there... :P
> >
> > Also yeah DAX ahem.
> >
> > I'm not familiar with huge pfnmap PUDs, could you give me a hint on this?
> > :>)
>
> vmf_insert_pfn_pmd(), called from drivers/vfio/pci/vfio_pci_core.c
>
> Essentially, we create huge PUDs when mapping device BARs to user space.
Ah makes sense. Thanks!
|