Re: crazy idea: big percpu lock (Re: task isolation)

2015-11-10 Thread Rik van Riel
On 10/28/2015 02:45 PM, Andy Lutomirski wrote: >> The model I chose is to have a per-cpu state that indicates whether >> the core is in kernel space, in user space, or in user space with >> a TLB flush pending. On entry to user space with task isolation >> in effect we just set the state to

Re: crazy idea: big percpu lock (Re: task isolation)

2015-11-10 Thread Rik van Riel
On 10/28/2015 02:45 PM, Andy Lutomirski wrote: >> The model I chose is to have a per-cpu state that indicates whether >> the core is in kernel space, in user space, or in user space with >> a TLB flush pending. On entry to user space with task isolation >> in effect we just set the state to

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-28 Thread Andy Lutomirski
On Wed, Oct 28, 2015 at 11:42 AM, Chris Metcalf wrote: > On 10/08/2015 05:25 PM, Andy Lutomirski wrote: >> >> This whole isolation vs vmstat, etc thing made me think: >> >> It seems to me that a big part of the problem is that there's all >> kinds of per-cpu deferred housekeeping work that can be

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-28 Thread Chris Metcalf
On 10/08/2015 05:25 PM, Andy Lutomirski wrote: This whole isolation vs vmstat, etc thing made me think: It seems to me that a big part of the problem is that there's all kinds of per-cpu deferred housekeeping work that can be done on the CPU in question without any complicated or heavyweight

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-28 Thread Andy Lutomirski
On Wed, Oct 28, 2015 at 11:42 AM, Chris Metcalf wrote: > On 10/08/2015 05:25 PM, Andy Lutomirski wrote: >> >> This whole isolation vs vmstat, etc thing made me think: >> >> It seems to me that a big part of the problem is that there's all >> kinds of per-cpu deferred

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-28 Thread Chris Metcalf
On 10/08/2015 05:25 PM, Andy Lutomirski wrote: This whole isolation vs vmstat, etc thing made me think: It seems to me that a big part of the problem is that there's all kinds of per-cpu deferred housekeeping work that can be done on the CPU in question without any complicated or heavyweight

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-09 Thread Andy Lutomirski
On Fri, Oct 9, 2015 at 2:27 AM, Thomas Gleixner wrote: > On Thu, 8 Oct 2015, Andy Lutomirski wrote: >> I want to propose a new primitive that might go a long way toward >> solving this issue. The new primitive would be called the "big percpu >> lock". > > It took us 15+ years to get rid of the

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-09 Thread Christoph Lameter
On Thu, 8 Oct 2015, Andy Lutomirski wrote: > Will this really end up working? I can see two problems: > > 1. It's rather expensive. For processes that still make syscalls but > just not many, it means that you're forcibly quiescing every time. A process that does a lot of syscalls to

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-09 Thread Thomas Gleixner
On Thu, 8 Oct 2015, Andy Lutomirski wrote: > I want to propose a new primitive that might go a long way toward > solving this issue. The new primitive would be called the "big percpu > lock". It took us 15+ years to get rid of the "Big Kernel Lock", so we really don't want to add a new "Big XXX

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-09 Thread Peter Zijlstra
On Thu, Oct 08, 2015 at 02:25:23PM -0700, Andy Lutomirski wrote: > I want to propose a new primitive that might go a long way toward > solving this issue. The new primitive would be called the "big percpu > lock". Never, ever, combine big and lock :-) You want small granular locks, big locks

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-09 Thread Peter Zijlstra
On Thu, Oct 08, 2015 at 02:25:23PM -0700, Andy Lutomirski wrote: > I want to propose a new primitive that might go a long way toward > solving this issue. The new primitive would be called the "big percpu > lock". Never, ever, combine big and lock :-) You want small granular locks, big locks

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-09 Thread Thomas Gleixner
On Thu, 8 Oct 2015, Andy Lutomirski wrote: > I want to propose a new primitive that might go a long way toward > solving this issue. The new primitive would be called the "big percpu > lock". It took us 15+ years to get rid of the "Big Kernel Lock", so we really don't want to add a new "Big XXX

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-09 Thread Christoph Lameter
On Thu, 8 Oct 2015, Andy Lutomirski wrote: > Will this really end up working? I can see two problems: > > 1. It's rather expensive. For processes that still make syscalls but > just not many, it means that you're forcibly quiescing every time. A process that does a lot of syscalls to

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-09 Thread Andy Lutomirski
On Fri, Oct 9, 2015 at 2:27 AM, Thomas Gleixner wrote: > On Thu, 8 Oct 2015, Andy Lutomirski wrote: >> I want to propose a new primitive that might go a long way toward >> solving this issue. The new primitive would be called the "big percpu >> lock". > > It took us 15+ years

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-08 Thread Andy Lutomirski
On Thu, Oct 8, 2015 at 3:01 PM, Christoph Lameter wrote: > On Thu, 8 Oct 2015, Andy Lutomirski wrote: > >> It seems to me that a big part of the problem is that there's all >> kinds of per-cpu deferred housekeeping work that can be done on the >> CPU in question without any complicated or

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-08 Thread Christoph Lameter
On Thu, 8 Oct 2015, Andy Lutomirski wrote: > It seems to me that a big part of the problem is that there's all > kinds of per-cpu deferred housekeeping work that can be done on the > CPU in question without any complicated or heavyweight locking but > that can't be done remotely without a mess.

crazy idea: big percpu lock (Re: task isolation)

2015-10-08 Thread Andy Lutomirski
This whole isolation vs vmstat, etc thing made me think: It seems to me that a big part of the problem is that there's all kinds of per-cpu deferred housekeeping work that can be done on the CPU in question without any complicated or heavyweight locking but that can't be done remotely without a

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-08 Thread Christoph Lameter
On Thu, 8 Oct 2015, Andy Lutomirski wrote: > It seems to me that a big part of the problem is that there's all > kinds of per-cpu deferred housekeeping work that can be done on the > CPU in question without any complicated or heavyweight locking but > that can't be done remotely without a mess.

Re: crazy idea: big percpu lock (Re: task isolation)

2015-10-08 Thread Andy Lutomirski
On Thu, Oct 8, 2015 at 3:01 PM, Christoph Lameter wrote: > On Thu, 8 Oct 2015, Andy Lutomirski wrote: > >> It seems to me that a big part of the problem is that there's all >> kinds of per-cpu deferred housekeeping work that can be done on the >> CPU in question without any

crazy idea: big percpu lock (Re: task isolation)

2015-10-08 Thread Andy Lutomirski
This whole isolation vs vmstat, etc thing made me think: It seems to me that a big part of the problem is that there's all kinds of per-cpu deferred housekeeping work that can be done on the CPU in question without any complicated or heavyweight locking but that can't be done remotely without a