Re: [PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-15 Thread Ingo Molnar
* Paul E. McKenney wrote: > On Sun, Jun 14, 2015 at 09:38:25PM +0200, Oleg Nesterov wrote: > > On 06/14, Oleg Nesterov wrote: > > > > > > On 06/14, Ingo Molnar wrote: > > > > > > > > * Oleg Nesterov wrote: > > > > > > > > > > + spin_lock(&pgd_lock); /* Implies rcu_read_lock() for > >

Re: [PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-14 Thread Paul E. McKenney
On Sun, Jun 14, 2015 at 09:38:25PM +0200, Oleg Nesterov wrote: > On 06/14, Oleg Nesterov wrote: > > > > On 06/14, Ingo Molnar wrote: > > > > > > * Oleg Nesterov wrote: > > > > > > > > + spin_lock(&pgd_lock); /* Implies rcu_read_lock() for > > > > > the task list iteration: */ > > > >

Re: [PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-14 Thread Oleg Nesterov
On 06/14, Oleg Nesterov wrote: > > On 06/14, Ingo Molnar wrote: > > > > * Oleg Nesterov wrote: > > > > > > + spin_lock(&pgd_lock); /* Implies rcu_read_lock() for > > > > the task list iteration: */ > > > ^^^ > > > > > > Hm

Re: [PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-14 Thread Oleg Nesterov
On 06/14, Ingo Molnar wrote: > > * Oleg Nesterov wrote: > > > > + spin_lock(&pgd_lock); /* Implies rcu_read_lock() for the task > > > list iteration: */ > > ^^^ > > > > Hmm, but it doesn't if PREEMPT_RCU? No, no, I do not preten

Re: [PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-14 Thread Ingo Molnar
* Oleg Nesterov wrote: > On 06/13, Ingo Molnar wrote: > > > > @@ -169,29 +169,40 @@ void sync_global_pgds(unsigned long start, unsigned > > long end, int removed) > > > > for (address = start; address <= end; address += PGDIR_SIZE) { > > const pgd_t *pgd_ref = pgd_offset_k(addre

Re: [PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-13 Thread Oleg Nesterov
On 06/13, Ingo Molnar wrote: > > @@ -169,29 +169,40 @@ void sync_global_pgds(unsigned long start, unsigned > long end, int removed) > > for (address = start; address <= end; address += PGDIR_SIZE) { > const pgd_t *pgd_ref = pgd_offset_k(address); > - struct page *pa

[PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-13 Thread Ingo Molnar
The memory hotplug code uses sync_global_pgds() to synchronize updates to the global (&init_mm) kernel PGD and the task PGDs. It does this by iterating over the pgd_list - which list closely tracks task creation/destruction via fork/clone. But we want to remove this list, so that it does not have

Re: [PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-13 Thread Ingo Molnar
* Oleg Nesterov wrote: > On 06/11, Ingo Molnar wrote: > > > > void sync_global_pgds(unsigned long start, unsigned long end, int removed) > > { > > @@ -169,29 +169,33 @@ void sync_global_pgds(unsigned long start, unsigned > > long end, int removed) > > > > for (address = start; address <=

Re: [PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-13 Thread Ingo Molnar
* Waiman Long wrote: > >@@ -169,29 +169,33 @@ void sync_global_pgds(unsigned long start, unsigned > >long end, int removed) > > > > for (address = start; address<= end; address += PGDIR_SIZE) { > > const pgd_t *pgd_ref = pgd_offset_k(address); > >-struct page *page;

Re: [PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-12 Thread Oleg Nesterov
On 06/11, Ingo Molnar wrote: > > void sync_global_pgds(unsigned long start, unsigned long end, int removed) > { > @@ -169,29 +169,33 @@ void sync_global_pgds(unsigned long start, unsigned > long end, int removed) > > for (address = start; address <= end; address += PGDIR_SIZE) { >

Re: [PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-12 Thread Waiman Long
On 06/11/2015 10:07 AM, Ingo Molnar wrote: The memory hotplug code uses sync_global_pgds() to synchronize updates to the global (&init_mm) kernel PGD and the task PGDs. It does this by iterating over the pgd_list - which list closely tracks task creation/destruction via fork/clone. But we want t

Re: [PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-12 Thread Oleg Nesterov
On 06/11, Ingo Molnar wrote: > > void sync_global_pgds(unsigned long start, unsigned long end, int removed) > { > @@ -169,29 +169,33 @@ void sync_global_pgds(unsigned long start, unsigned > long end, int removed) > > for (address = start; address <= end; address += PGDIR_SIZE) { >

[PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-11 Thread Ingo Molnar
The memory hotplug code uses sync_global_pgds() to synchronize updates to the global (&init_mm) kernel PGD and the task PGDs. It does this by iterating over the pgd_list - which list closely tracks task creation/destruction via fork/clone. But we want to remove this list, so that it does not have