Re: question on NUMA page migration

2012-10-21 Thread Ingo Molnar
* Rik van Riel wrote: > On 10/20/2012 10:39 PM, Ni zhan Chen wrote: > >On 10/19/2012 11:53 PM, Rik van Riel wrote: > >>Hi Andrea, Peter, > >> > >>I have a question on page refcounting in your NUMA > >>page migration code. > >> > >>In Peter's case, I wonder why you introduce a new >

Re: question on NUMA page migration

2012-10-21 Thread Ingo Molnar
* Rik van Riel wrote: > On 10/19/2012 09:23 PM, Ingo Molnar wrote: > > > >* Rik van Riel wrote: > > > >>On 10/19/2012 01:53 PM, Peter Zijlstra wrote: > >>>On Fri, 2012-10-19 at 13:13 -0400, Rik van Riel wrote: > >> > Another alternative might be to do the put_page inside >

Re: question on NUMA page migration

2012-10-21 Thread Ingo Molnar
* Rik van Riel r...@redhat.com wrote: On 10/19/2012 09:23 PM, Ingo Molnar wrote: * Rik van Riel r...@redhat.com wrote: On 10/19/2012 01:53 PM, Peter Zijlstra wrote: On Fri, 2012-10-19 at 13:13 -0400, Rik van Riel wrote: Another alternative might be to do the put_page inside

Re: question on NUMA page migration

2012-10-21 Thread Ingo Molnar
* Rik van Riel r...@redhat.com wrote: On 10/20/2012 10:39 PM, Ni zhan Chen wrote: On 10/19/2012 11:53 PM, Rik van Riel wrote: Hi Andrea, Peter, I have a question on page refcounting in your NUMA page migration code. In Peter's case, I wonder why you introduce a new MIGRATE_FAULT

Re: question on NUMA page migration

2012-10-20 Thread Rik van Riel
On 10/20/2012 10:39 PM, Ni zhan Chen wrote: On 10/19/2012 11:53 PM, Rik van Riel wrote: Hi Andrea, Peter, I have a question on page refcounting in your NUMA page migration code. In Peter's case, I wonder why you introduce a new MIGRATE_FAULT migration mode. If the normal page migration /

Re: question on NUMA page migration

2012-10-20 Thread Ni zhan Chen
On 10/19/2012 11:53 PM, Rik van Riel wrote: Hi Andrea, Peter, I have a question on page refcounting in your NUMA page migration code. In Peter's case, I wonder why you introduce a new MIGRATE_FAULT migration mode. If the normal page migration / compaction logic can do without taking an extra

Re: question on NUMA page migration

2012-10-20 Thread Rik van Riel
On 10/19/2012 09:23 PM, Ingo Molnar wrote: * Rik van Riel wrote: On 10/19/2012 01:53 PM, Peter Zijlstra wrote: On Fri, 2012-10-19 at 13:13 -0400, Rik van Riel wrote: Another alternative might be to do the put_page inside do_prot_none_numa(). That would be analogous to do_wp_page

Re: question on NUMA page migration

2012-10-20 Thread Rik van Riel
On 10/19/2012 09:23 PM, Ingo Molnar wrote: * Rik van Riel r...@redhat.com wrote: On 10/19/2012 01:53 PM, Peter Zijlstra wrote: On Fri, 2012-10-19 at 13:13 -0400, Rik van Riel wrote: Another alternative might be to do the put_page inside do_prot_none_numa(). That would be analogous to

Re: question on NUMA page migration

2012-10-20 Thread Ni zhan Chen
On 10/19/2012 11:53 PM, Rik van Riel wrote: Hi Andrea, Peter, I have a question on page refcounting in your NUMA page migration code. In Peter's case, I wonder why you introduce a new MIGRATE_FAULT migration mode. If the normal page migration / compaction logic can do without taking an extra

Re: question on NUMA page migration

2012-10-20 Thread Rik van Riel
On 10/20/2012 10:39 PM, Ni zhan Chen wrote: On 10/19/2012 11:53 PM, Rik van Riel wrote: Hi Andrea, Peter, I have a question on page refcounting in your NUMA page migration code. In Peter's case, I wonder why you introduce a new MIGRATE_FAULT migration mode. If the normal page migration /

Re: question on NUMA page migration

2012-10-19 Thread Ingo Molnar
* Rik van Riel wrote: > On 10/19/2012 01:53 PM, Peter Zijlstra wrote: > >On Fri, 2012-10-19 at 13:13 -0400, Rik van Riel wrote: > > >>Another alternative might be to do the put_page inside > >>do_prot_none_numa(). That would be analogous to do_wp_page > >>disposing of the old page for the

Re: question on NUMA page migration

2012-10-19 Thread Rik van Riel
On 10/19/2012 01:53 PM, Peter Zijlstra wrote: On Fri, 2012-10-19 at 13:13 -0400, Rik van Riel wrote: Another alternative might be to do the put_page inside do_prot_none_numa(). That would be analogous to do_wp_page disposing of the old page for the caller. It'd have to be inside

Re: question on NUMA page migration

2012-10-19 Thread Peter Zijlstra
On Fri, 2012-10-19 at 13:13 -0400, Rik van Riel wrote: > Would it make sense to have the normal page migration code always > work with the extra refcount, so we do not have to introduce a new > MIGRATE_FAULT migration mode? > > On the other hand, compaction does not take the extra reference...

Re: question on NUMA page migration

2012-10-19 Thread Rik van Riel
On 10/19/2012 12:39 PM, Peter Zijlstra wrote: On Fri, 2012-10-19 at 11:53 -0400, Rik van Riel wrote: If we do need the extra refcount, why is normal page migration safe? :) Its mostly a matter of how convoluted you make the code, regular page migration is about as bad as you can get Normal

Re: question on NUMA page migration

2012-10-19 Thread Peter Zijlstra
On Fri, 2012-10-19 at 11:53 -0400, Rik van Riel wrote: > > If we do need the extra refcount, why is normal > page migration safe? :) Its mostly a matter of how convoluted you make the code, regular page migration is about as bad as you can get Normal does: follow_page(FOLL_GET) +1

question on NUMA page migration

2012-10-19 Thread Rik van Riel
Hi Andrea, Peter, I have a question on page refcounting in your NUMA page migration code. In Peter's case, I wonder why you introduce a new MIGRATE_FAULT migration mode. If the normal page migration / compaction logic can do without taking an extra reference count, why does your code need it?

question on NUMA page migration

2012-10-19 Thread Rik van Riel
Hi Andrea, Peter, I have a question on page refcounting in your NUMA page migration code. In Peter's case, I wonder why you introduce a new MIGRATE_FAULT migration mode. If the normal page migration / compaction logic can do without taking an extra reference count, why does your code need it?

Re: question on NUMA page migration

2012-10-19 Thread Peter Zijlstra
On Fri, 2012-10-19 at 11:53 -0400, Rik van Riel wrote: If we do need the extra refcount, why is normal page migration safe? :) Its mostly a matter of how convoluted you make the code, regular page migration is about as bad as you can get Normal does: follow_page(FOLL_GET) +1

Re: question on NUMA page migration

2012-10-19 Thread Rik van Riel
On 10/19/2012 12:39 PM, Peter Zijlstra wrote: On Fri, 2012-10-19 at 11:53 -0400, Rik van Riel wrote: If we do need the extra refcount, why is normal page migration safe? :) Its mostly a matter of how convoluted you make the code, regular page migration is about as bad as you can get Normal

Re: question on NUMA page migration

2012-10-19 Thread Peter Zijlstra
On Fri, 2012-10-19 at 13:13 -0400, Rik van Riel wrote: Would it make sense to have the normal page migration code always work with the extra refcount, so we do not have to introduce a new MIGRATE_FAULT migration mode? On the other hand, compaction does not take the extra reference...

Re: question on NUMA page migration

2012-10-19 Thread Rik van Riel
On 10/19/2012 01:53 PM, Peter Zijlstra wrote: On Fri, 2012-10-19 at 13:13 -0400, Rik van Riel wrote: Another alternative might be to do the put_page inside do_prot_none_numa(). That would be analogous to do_wp_page disposing of the old page for the caller. It'd have to be inside

Re: question on NUMA page migration

2012-10-19 Thread Ingo Molnar
* Rik van Riel r...@redhat.com wrote: On 10/19/2012 01:53 PM, Peter Zijlstra wrote: On Fri, 2012-10-19 at 13:13 -0400, Rik van Riel wrote: Another alternative might be to do the put_page inside do_prot_none_numa(). That would be analogous to do_wp_page disposing of the old page for the