Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1289974
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/6] mm: Add vm_insert_pfn_prot |
| Date | 2015-12-11 23:50 +0100 |
| Message-ID | <qEEFH-29G-1@gated-at.bofh.it> (permalink) |
| References | <qEmz7-6ZR-3@gated-at.bofh.it> <qEmz8-6ZR-23@gated-at.bofh.it> <qEEw1-261-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Dec 11, 2015 at 2:33 PM, Andrew Morton <akpm@linux-foundation.org> wrote: > On Thu, 10 Dec 2015 19:21:43 -0800 Andy Lutomirski <luto@kernel.org> wrote: > >> The x86 vvar mapping contains pages with differing cacheability >> flags. This is currently only supported using (io_)remap_pfn_range, >> but those functions can't be used inside page faults. > > Foggy. What does "support" mean here? We currently have a hack in which every x86 mm has a "vvar" vma that has a .fault handler that always fails (it's the vm_special_mapping fault handler backed by an empty pages array). To make everything work, at mm startup, the vdso code uses remap_pfn_range and io_remap_pfn_range to poke the pfns into the page tables. I'd much rather implement this using the new .fault mechanism, and the canonical way to implement .fault seems to be vm_insert_pfn, and vm_insert_pfn doesn't allow setting per-page cacheability. Unfortunately, one of the three x86 vvar pages needs to be uncacheable because it's a genuine IO page, so I can't use vm_insert_pfn. I suppose I could just call io_remap_pfn_range from .fault, but I think that's frowned upon. Admittedly, I wasn't really sure *why* that's frowned upon. This goes way back to 2007 (e0dc0d8f4a327d033bfb63d43f113d5f31d11b3c) when .fault got fancier. > >> Add vm_insert_pfn_prot to support varying cacheability within the >> same non-COW VMA in a more sane manner. > > Here, "support" presumably means "insertion of pfns". Can we spell all > this out more completely please? Yes, will fix. > >> x86 needs this to avoid a CRIU-breaking and memory-wasting explosion >> of VMAs when supporting userspace access to the HPET. >> > > OtherwiseAck. --Andy -- Andy Lutomirski AMA Capital Management, LLC -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] mm, x86/vdso: Special IO mapping improvements Andy Lutomirski <luto@kernel.org> - 2015-12-11 04:30 +0100
[PATCH 4/6] x86,vdso: Use .fault for the vdso text mapping Andy Lutomirski <luto@kernel.org> - 2015-12-11 04:30 +0100
[PATCH 5/6] x86,vdso: Use .fault instead of remap_pfn_range for the vvar mapping Andy Lutomirski <luto@kernel.org> - 2015-12-11 04:30 +0100
[PATCH 6/6] x86/vdso: Disallow vvar access to vclock IO for never-used vclocks Andy Lutomirski <luto@kernel.org> - 2015-12-11 04:30 +0100
[PATCH 2/6] mm: Add vm_insert_pfn_prot Andy Lutomirski <luto@kernel.org> - 2015-12-11 04:30 +0100
Re: [PATCH 2/6] mm: Add vm_insert_pfn_prot Andrew Morton <akpm@linux-foundation.org> - 2015-12-11 23:40 +0100
Re: [PATCH 2/6] mm: Add vm_insert_pfn_prot Andy Lutomirski <luto@amacapital.net> - 2015-12-11 23:50 +0100
[PATCH 1/6] mm: Add a vm_special_mapping .fault method Andy Lutomirski <luto@kernel.org> - 2015-12-11 04:30 +0100
Re: [PATCH 1/6] mm: Add a vm_special_mapping .fault method Andrew Morton <akpm@linux-foundation.org> - 2015-12-11 23:30 +0100
Re: [PATCH 1/6] mm: Add a vm_special_mapping .fault method Ingo Molnar <mingo@kernel.org> - 2015-12-14 10:20 +0100
csiph-web