Re: [PATCH] mmu notifiers #v6

2008-02-21 Thread Jack Steiner
> I really want suggestions on Jack's concern about issuing an > invalidate per pte entry or per-pte instead of per-range. I'll answer > that in a separate email. For KVM my patch is already close to optimal > because each single spte invalidate requires a fixed amount of work, > but for GRU a

Re: [PATCH] mmu notifiers #v6

2008-02-21 Thread Andrea Arcangeli
On Thu, Feb 21, 2008 at 05:54:30AM +0100, Nick Piggin wrote: > will send you incremental changes that can be discussed more easily > that way (nothing major, mainly style and minor things). I don't need to say you're very welcome ;). > I agree: your coherent, non-sleeping mmu notifiers are

Re: [PATCH] mmu notifiers #v6

2008-02-21 Thread Andrea Arcangeli
On Thu, Feb 21, 2008 at 05:54:30AM +0100, Nick Piggin wrote: will send you incremental changes that can be discussed more easily that way (nothing major, mainly style and minor things). I don't need to say you're very welcome ;). I agree: your coherent, non-sleeping mmu notifiers are pretty

Re: [PATCH] mmu notifiers #v6

2008-02-21 Thread Jack Steiner
I really want suggestions on Jack's concern about issuing an invalidate per pte entry or per-pte instead of per-range. I'll answer that in a separate email. For KVM my patch is already close to optimal because each single spte invalidate requires a fixed amount of work, but for GRU a large

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Nick Piggin
On Wed, Feb 20, 2008 at 01:03:24PM +0100, Andrea Arcangeli wrote: > If there's agreement that the VM should alter its locking from > spinlock to mutex for its own good, then Christoph's > one-config-option-fits-all becomes a lot more appealing (replacing RCU > with a mutex in the mmu notifier list

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Nick Piggin
On Wed, Feb 20, 2008 at 11:39:42AM +0100, Andrea Arcangeli wrote: > Given Nick's comments I ported my version of the mmu notifiers to > latest mainline. There are no known bugs AFIK and it's obviously safe > (nothing is allowed to schedule inside rcu_read_lock taken by > mmu_notifier() with my

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Jack Steiner
On Wed, Feb 20, 2008 at 11:39:42AM +0100, Andrea Arcangeli wrote: > Given Nick's comments I ported my version of the mmu notifiers to > latest mainline. There are no known bugs AFIK and it's obviously safe > (nothing is allowed to schedule inside rcu_read_lock taken by > mmu_notifier() with my

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Andrea Arcangeli
On Wed, Feb 20, 2008 at 08:41:55AM -0600, Robin Holt wrote: > On Wed, Feb 20, 2008 at 11:39:42AM +0100, Andrea Arcangeli wrote: > > XPMEM simply can't use RCU for the registration locking if it wants to > > schedule inside the mmu notifier calls. So I guess it's better to add > > Whoa there. In

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Robin Holt
On Wed, Feb 20, 2008 at 11:39:42AM +0100, Andrea Arcangeli wrote: > XPMEM simply can't use RCU for the registration locking if it wants to > schedule inside the mmu notifier calls. So I guess it's better to add Whoa there. In Christoph's patch, we did not use rcu for the list. It was a simple

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Robin Holt
On Wed, Feb 20, 2008 at 01:32:36PM +0100, Andrea Arcangeli wrote: > On Wed, Feb 20, 2008 at 06:24:24AM -0600, Robin Holt wrote: > > We do not need to do any allocation in the messaging layer, all > > structures used for messaging are allocated at module load time. > > The allocation discussions we

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Andrea Arcangeli
On Wed, Feb 20, 2008 at 06:24:24AM -0600, Robin Holt wrote: > We do not need to do any allocation in the messaging layer, all > structures used for messaging are allocated at module load time. > The allocation discussions we had early on were about trying to > rearrange you notifiers to allow a

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Robin Holt
On Wed, Feb 20, 2008 at 01:03:24PM +0100, Andrea Arcangeli wrote: > I'm unconvinced both the main linux VM and the mmu notifier should be > changed like this just to support xpmem. All non-sleeping users don't > need that. Nevertheless I'm fully welcome to support xpmem (and it's > not my call nor

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Andrea Arcangeli
On Wed, Feb 20, 2008 at 05:33:13AM -0600, Robin Holt wrote: > But won't that other "subsystem" cause us to have two seperate callouts > that do equivalent things and therefore force a removal of this and go > back to what Christoph has currently proposed? The point is that a new kind of notifier

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Robin Holt
On Wed, Feb 20, 2008 at 11:39:42AM +0100, Andrea Arcangeli wrote: > Given Nick's comments I ported my version of the mmu notifiers to > latest mainline. There are no known bugs AFIK and it's obviously safe > (nothing is allowed to schedule inside rcu_read_lock taken by > mmu_notifier() with my

[PATCH] mmu notifiers #v6

2008-02-20 Thread Andrea Arcangeli
Given Nick's comments I ported my version of the mmu notifiers to latest mainline. There are no known bugs AFIK and it's obviously safe (nothing is allowed to schedule inside rcu_read_lock taken by mmu_notifier() with my patch). XPMEM simply can't use RCU for the registration locking if it wants

[PATCH] mmu notifiers #v6

2008-02-20 Thread Andrea Arcangeli
Given Nick's comments I ported my version of the mmu notifiers to latest mainline. There are no known bugs AFIK and it's obviously safe (nothing is allowed to schedule inside rcu_read_lock taken by mmu_notifier() with my patch). XPMEM simply can't use RCU for the registration locking if it wants

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Robin Holt
On Wed, Feb 20, 2008 at 11:39:42AM +0100, Andrea Arcangeli wrote: Given Nick's comments I ported my version of the mmu notifiers to latest mainline. There are no known bugs AFIK and it's obviously safe (nothing is allowed to schedule inside rcu_read_lock taken by mmu_notifier() with my patch).

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Andrea Arcangeli
On Wed, Feb 20, 2008 at 05:33:13AM -0600, Robin Holt wrote: But won't that other subsystem cause us to have two seperate callouts that do equivalent things and therefore force a removal of this and go back to what Christoph has currently proposed? The point is that a new kind of notifier that

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Andrea Arcangeli
On Wed, Feb 20, 2008 at 06:24:24AM -0600, Robin Holt wrote: We do not need to do any allocation in the messaging layer, all structures used for messaging are allocated at module load time. The allocation discussions we had early on were about trying to rearrange you notifiers to allow a

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Robin Holt
On Wed, Feb 20, 2008 at 01:32:36PM +0100, Andrea Arcangeli wrote: On Wed, Feb 20, 2008 at 06:24:24AM -0600, Robin Holt wrote: We do not need to do any allocation in the messaging layer, all structures used for messaging are allocated at module load time. The allocation discussions we had

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Robin Holt
On Wed, Feb 20, 2008 at 01:03:24PM +0100, Andrea Arcangeli wrote: I'm unconvinced both the main linux VM and the mmu notifier should be changed like this just to support xpmem. All non-sleeping users don't need that. Nevertheless I'm fully welcome to support xpmem (and it's not my call nor my

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Robin Holt
On Wed, Feb 20, 2008 at 11:39:42AM +0100, Andrea Arcangeli wrote: XPMEM simply can't use RCU for the registration locking if it wants to schedule inside the mmu notifier calls. So I guess it's better to add Whoa there. In Christoph's patch, we did not use rcu for the list. It was a simple

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Andrea Arcangeli
On Wed, Feb 20, 2008 at 08:41:55AM -0600, Robin Holt wrote: On Wed, Feb 20, 2008 at 11:39:42AM +0100, Andrea Arcangeli wrote: XPMEM simply can't use RCU for the registration locking if it wants to schedule inside the mmu notifier calls. So I guess it's better to add Whoa there. In

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Jack Steiner
On Wed, Feb 20, 2008 at 11:39:42AM +0100, Andrea Arcangeli wrote: Given Nick's comments I ported my version of the mmu notifiers to latest mainline. There are no known bugs AFIK and it's obviously safe (nothing is allowed to schedule inside rcu_read_lock taken by mmu_notifier() with my patch).

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Nick Piggin
On Wed, Feb 20, 2008 at 11:39:42AM +0100, Andrea Arcangeli wrote: Given Nick's comments I ported my version of the mmu notifiers to latest mainline. There are no known bugs AFIK and it's obviously safe (nothing is allowed to schedule inside rcu_read_lock taken by mmu_notifier() with my patch).

Re: [PATCH] mmu notifiers #v6

2008-02-20 Thread Nick Piggin
On Wed, Feb 20, 2008 at 01:03:24PM +0100, Andrea Arcangeli wrote: If there's agreement that the VM should alter its locking from spinlock to mutex for its own good, then Christoph's one-config-option-fits-all becomes a lot more appealing (replacing RCU with a mutex in the mmu notifier list