lkml.org 
[lkml]   [2017]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 00/23] KAISER: unmap most of the kernel from userspace page tables
Inconveniently, the people you cc'd on the actual patches did *not*
get cc'd with this 00/23 cover letter email.

Also, the documentation was then hidden in patch 07/23, which wasn't
exactly obvious.

So I'd like this to be presented a bit differently.

That said, a couple of comments/questions on this version of the patch series..

(a) is this on top of Andy's entry cleanups?

If not, that probably needs to be sorted out.

(b) the TLB global bit really is nastily done. You basically disable
_PAGE_GLOBAL entirely.

I can see how/why that would make things simpler, but it's almost
certainly the wrong approach. The small subset of kernel pages that
are always mapped should definitely retain the global bit, so that you
don't always take a TLB miss on those! Those are probably some of the
most latency-critical pages, since there's generally no prefetching
for the kernel entry code or for things like IDT/GDT accesses..

So even if you don't want to have global pages for normal kernel
entries, you don't want to just make _PAGE_GLOBAL be defined as zero.
You'd want to just use _PAGE_GLOBAL conditionally.

Hmm?

(c) am I reading the code correctly, and the shadow page tables are
*completely* duplicated?

That seems insane. Why isn't only tyhe top level shadowed, and
then lower levels are shared between the shadowed and the "kernel"
page tables?

But I may be mis-reading the code completely.

Apart from those three questions, I don't see any huge downside to the
patch series, apart from the obvious performance/complexity issues.

Linus

\
 
 \ /
  Last update: 2017-11-01 00:27    [W:0.130 / U:9.212 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site