Re: [kvm-devel] [patch] my mmu notifiers

2008-02-27 Thread Christoph Lameter
On Tue, 19 Feb 2008, Nick Piggin wrote: I thought that could be used by a non-sleeping user (not intending to try supporting sleeping users). If it is useless then it should go away (BTW. I didn't see your recent patch, some of my confusion I think stems from Christoph's novel way of merging

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-27 Thread Christoph Lameter
On Wed, 20 Feb 2008, Nick Piggin wrote: But why does _anybody_ (why does Christoph's patches) need to invalidate when they are going to be more permissive? This should be done lazily by the driver, I would have thought. Correct. If you find such places then we can avoid the invalidates there.

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-20 Thread Nick Piggin
On Tue, Feb 19, 2008 at 05:40:50PM -0600, Jack Steiner wrote: On Wed, Feb 20, 2008 at 12:11:57AM +0100, Nick Piggin wrote: On Tue, Feb 19, 2008 at 02:58:51PM +0100, Andrea Arcangeli wrote: On Tue, Feb 19, 2008 at 09:43:57AM +0100, Nick Piggin wrote: anything when changing the pte to be

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-20 Thread Nick Piggin
On Wed, Feb 20, 2008 at 02:09:41AM +0100, Andrea Arcangeli wrote: On Wed, Feb 20, 2008 at 12:11:57AM +0100, Nick Piggin wrote: Sorry, I realise I still didn't get this through my head yet (and also have not seen your patch recently). So I don't know exactly what you are doing... The last

[kvm-devel] [patch] my mmu notifiers

2008-02-19 Thread Nick Piggin
Well I started reviewing the mmu notifier code, but it is kind of hard to know what you're talking about just by reading through code and not trying your suggestions for yourself... So I implemented mmu notifiers slightly differently. Andrea's mmu notifiers are rather similar. However I have

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-19 Thread Robin Holt
On Tue, Feb 19, 2008 at 09:43:57AM +0100, Nick Piggin wrote: So I implemented mmu notifiers slightly differently. Andrea's mmu notifiers are rather similar. However I have tried to make a point of minimising the impact the the core mm/. I don't see why we need to invalidate or flush anything

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-19 Thread Andrea Arcangeli
On Tue, Feb 19, 2008 at 09:43:57AM +0100, Nick Piggin wrote: are rather similar. However I have tried to make a point of minimising the impact the the core mm/. I don't see why we need to invalidate or flush I also tried hard to minimise the impact of the core mm/, I also argued with Christoph

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-19 Thread Jack Steiner
On Tue, Feb 19, 2008 at 02:58:51PM +0100, Andrea Arcangeli wrote: understand the need for invalidate_begin/invalidate_end pairs at all. The need of the pairs is crystal clear to me: range_begin is needed for GRU _but_only_if_ range_end is called after releasing the reference that the VM

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-19 Thread Nick Piggin
On Tue, Feb 19, 2008 at 02:58:51PM +0100, Andrea Arcangeli wrote: On Tue, Feb 19, 2008 at 09:43:57AM +0100, Nick Piggin wrote: anything when changing the pte to be _more_ permissive, and I don't Note that in my patch the invalidate_pages in mprotect can be trivially switched to a

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-19 Thread Nick Piggin
On Tue, Feb 19, 2008 at 08:27:25AM -0600, Jack Steiner wrote: On Tue, Feb 19, 2008 at 02:58:51PM +0100, Andrea Arcangeli wrote: understand the need for invalidate_begin/invalidate_end pairs at all. The need of the pairs is crystal clear to me: range_begin is needed for GRU

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-19 Thread Nick Piggin
On Tue, Feb 19, 2008 at 02:58:51PM +0100, Andrea Arcangeli wrote: On Tue, Feb 19, 2008 at 09:43:57AM +0100, Nick Piggin wrote: are rather similar. However I have tried to make a point of minimising the impact the the core mm/. I don't see why we need to invalidate or flush I also tried

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-19 Thread Jack Steiner
On Wed, Feb 20, 2008 at 12:11:57AM +0100, Nick Piggin wrote: On Tue, Feb 19, 2008 at 02:58:51PM +0100, Andrea Arcangeli wrote: On Tue, Feb 19, 2008 at 09:43:57AM +0100, Nick Piggin wrote: anything when changing the pte to be _more_ permissive, and I don't Note that in my patch the

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-19 Thread Andrea Arcangeli
On Tue, Feb 19, 2008 at 11:59:23PM +0100, Nick Piggin wrote: That's why I don't understand the need for the pairs: it should be done like this. Yes, except it can't be done like this for xpmem. OK, I didn't see the invalidate_pages call... See the last patch I posted to Andrew, you've

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-19 Thread Andrea Arcangeli
On Wed, Feb 20, 2008 at 12:11:57AM +0100, Nick Piggin wrote: Sorry, I realise I still didn't get this through my head yet (and also have not seen your patch recently). So I don't know exactly what you are doing... The last version was posted here:

Re: [kvm-devel] [patch] my mmu notifiers

2008-02-19 Thread Robin Holt
On Wed, Feb 20, 2008 at 01:52:06AM +0100, Andrea Arcangeli wrote: On Wed, Feb 20, 2008 at 12:04:27AM +0100, Nick Piggin wrote: OK (thanks to Robin as well). Now I understand why you are using it, but I don't understand why you don't defer new TLBs after the point where the linux pte