[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH RFC v1 07/12] staging: kpc2000: Prepare transfer_complete_cb() for PG_reserved changes
- To: Matt Sickler <Matt.Sickler@xxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
- From: David Hildenbrand <david@xxxxxxxxxx>
- Date: Tue, 22 Oct 2019 23:01:23 +0200
- Cc: Kate Stewart <kstewart@xxxxxxxxxxxxxxxxxxx>, Sasha Levin <sashal@xxxxxxxxxx>, "linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Radim Krčmář <rkrcmar@xxxxxxxxxx>, "kvm@xxxxxxxxxxxxxxx" <kvm@xxxxxxxxxxxxxxx>, Pavel Tatashin <pavel.tatashin@xxxxxxxxxxxxx>, KarimAllah Ahmed <karahmed@xxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Alexander Duyck <alexander.duyck@xxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxxx>, "linux-mm@xxxxxxxxx" <linux-mm@xxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Wanpeng Li <wanpengli@xxxxxxxxxxx>, Alexander Duyck <alexander.h.duyck@xxxxxxxxxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, Fabio Estevam <festevam@xxxxxxxxx>, Ben Chan <benchan@xxxxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, "devel@xxxxxxxxxxxxxxxxxxxx" <devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>, "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, YueHaibing <yuehaibing@xxxxxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxxxxx>, Madhumitha Prabakaran <madhumithabiw@xxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>, Nishka Dasgupta <nishkadg.linux@xxxxxxxxx>, Anthony Yznaga <anthony.yznaga@xxxxxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>, Dan Carpenter <dan.carpenter@xxxxxxxxxx>, "Isaac J. Manjarres" <isaacm@xxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Anshuman Khandual <anshuman.khandual@xxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Simon Sandström <simon@xxxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, "kvm-ppc@xxxxxxxxxxxxxxx" <kvm-ppc@xxxxxxxxxxxxxxx>, Qian Cai <cai@xxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Todd Poynor <toddpoynor@xxxxxxxxxx>, Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>, Allison Randal <allison@xxxxxxxxxxx>, Jim Mattson <jmattson@xxxxxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxx>, Vandana BN <bnvandana@xxxxxxxxx>, Jeremy Sowden <jeremy@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Cornelia Huck <cohuck@xxxxxxxxxx>, Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>, Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>, Sean Christopherson <sean.j.christopherson@xxxxxxxxx>, Rob Springer <rspringer@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Johannes Weiner <hannes@xxxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, "linuxppc-dev@xxxxxxxxxxxxxxxx" <linuxppc-dev@xxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 22 Oct 2019 21:02:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 22.10.19 19:55, Matt Sickler wrote:
Right now, ZONE_DEVICE memory is always set PG_reserved. We want to change that.
The pages are obtained via get_user_pages_fast(). I assume, these could be
ZONE_DEVICE pages. Let's just exclude them as well explicitly.
I'm not sure what ZONE_DEVICE pages are, but these pages are normal system RAM,
typically HugePages (but not always).
ZONE_DEVICE, a.k.a. devmem, are pages that bypass the pagecache (e.g.,
DAX) completely and will therefore never get swapped. These pages are
not managed by any page allocator (especially not the buddy), they are
rather "directly mapped device memory".
E.g., a NVDIMM. It is mapped into the physical address space similar to
ordinary RAM (a DIMM). Any write to such a PFN will directly end up on
the target device. In contrast to a DIMM, the memory is persistent
accross reboots.
Now, if you mmap such an NVDIMM into a user space process, you will end
up with ZONE_DEVICE pages as part of the user space mapping (VMA).
get_user_pages_fast() on this memory will result in "struct pages" that
belong to ZONE_DEVICE. This is where this patch comes into play.
This patch makes sure that there is absolutely no change once we stop
setting these ZONE_DEVICE pages PG_reserved. E.g., AFAIK, setting a
ZONE_DEVICE page dirty does not make too much sense (never swapped).
Yes, it might not be a likely setup, however, it is possible. In this
series I collect all places that *could* be affected. If that change is
really needed has to be decided. I can see that the two staging drivers
I have patches for might be able to just live with the change - but then
we talked about it and are aware of the change.
Thanks!
--
Thanks,
David / dhildenb
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|