[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wh9BdH5DLjfv72LOWSb6P1jMwO0TYraS1gnYZDdTCi+rQ@mail.gmail.com>
Date: Wed, 13 Nov 2019 13:19:42 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
"the arch/x86 maintainers" <x86@...nel.org>,
Andy Lutomirski <luto@...nel.org>,
Stephen Hemminger <stephen@...workplumber.org>,
Willy Tarreau <w@....eu>, Juergen Gross <jgross@...e.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [patch V3 12/20] x86/ioperm: Move TSS bitmap update to exit to
user work
On Wed, Nov 13, 2019 at 1:02 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> From: Thomas Gleixner <tglx@...utronix.de>
>
> There is no point to update the TSS bitmap for tasks which use I/O bitmaps
> on every context switch. It's enough to update it right before exiting to
> user space.
Hmm.
I wonder if it might make sense to delay it even more: just always
invalidate the bitmap on task switch, and leave it at that.
And then on GP fault, just add trivial logic like
if (I_have_an_io_bitmap && it_isnt_installed) {
install_io_bitmap();
return;
}
and now you do get that extra GP fault if you actually use IO
accesses, but the normal case has zero overhead.
Even processes that do ioperm may not be *using* it all the time.
Linus
Powered by blists - more mailing lists