Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-24 Thread Peter Zijlstra
On Thu, Apr 24, 2014 at 05:41:20PM +, Luck, Tony wrote: > >>The BIOS always sends CPU hot-addition events before memory > >> hot-addition events, so it's hard to change the order. > >>And we couldn't completely solve this performance penalty because the > >> affected code tries to alloc

RE: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-24 Thread Luck, Tony
>> The BIOS always sends CPU hot-addition events before memory >> hot-addition events, so it's hard to change the order. >> And we couldn't completely solve this performance penalty because the >> affected code tries to allocate memory for all possible >> CPUs instead of onlined CPUs. > >

Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-24 Thread Peter Zijlstra
On Thu, Apr 24, 2014 at 10:59:45AM +0800, Jiang Liu wrote: > On 2014/4/24 1:46, Luck, Tony wrote: > 1) Handle CPU hot-addition event > 1.a) gather platform specific information > 1.b) associate hot-added CPU with a node > 1.c) create CPU device > 2) User online hot-added CP

Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-23 Thread Jiang Liu
On 2014/4/24 1:46, Luck, Tony wrote: 1) Handle CPU hot-addition event 1.a) gather platform specific information 1.b) associate hot-added CPU with a node 1.c) create CPU device 2) User online hot-added CPUs through sysfs: 2.a) cpu_up() 2.b) ->tr

RE: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-23 Thread Luck, Tony
> > > 1) Handle CPU hot-addition event > > > 1.a) gather platform specific information > > > 1.b) associate hot-added CPU with a node > > > 1.c) create CPU device > > > 2) User online hot-added CPUs through sysfs: > > > 2.a) cpu_up() > > > 2.b) ->try_online_node() > > > 2.c)

Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-22 Thread Peter Zijlstra
On Wed, Apr 23, 2014 at 07:32:13AM +0200, Peter Zijlstra wrote: > On Wed, Apr 23, 2014 at 10:45:13AM +0800, Jiang Liu wrote: > > Hi Peter, > > It's not for memoryless node, but to solve a race window > > in CPU hot-addition. The related CPU hot-addition flow is: > > 1) Handle CPU hot-addition e

Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-22 Thread Jiang Liu
On 2014/4/23 13:32, Peter Zijlstra wrote: > On Wed, Apr 23, 2014 at 10:45:13AM +0800, Jiang Liu wrote: >> Hi Peter, >> It's not for memoryless node, but to solve a race window >> in CPU hot-addition. The related CPU hot-addition flow is: >> 1) Handle CPU hot-addition event >> 1.a) gather platf

Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-22 Thread Peter Zijlstra
On Wed, Apr 23, 2014 at 10:45:13AM +0800, Jiang Liu wrote: > Hi Peter, > It's not for memoryless node, but to solve a race window > in CPU hot-addition. The related CPU hot-addition flow is: > 1) Handle CPU hot-addition event > 1.a) gather platform specific information > 1.b) associate hot-ad

Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-22 Thread Jiang Liu
On 2014/4/23 9:59, David Rientjes wrote: > On Tue, 22 Apr 2014, Peter Zijlstra wrote: > >> On Tue, Apr 22, 2014 at 01:01:51PM -0700, Andrew Morton wrote: >>> On Tue, 22 Apr 2014 10:15:15 +0200 Peter Zijlstra >>> wrote: >>> On Tue, Apr 22, 2014 at 01:27:15PM +0800, Jiang Liu wrote: > W

Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-22 Thread Jiang Liu
Hi Peter, It's not for memoryless node, but to solve a race window in CPU hot-addition. The related CPU hot-addition flow is: 1) Handle CPU hot-addition event 1.a) gather platform specific information 1.b) associate hot-added CPU with a node 1.c) create CPU device 2) User online hot-added C

Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-22 Thread Mike Galbraith
On Tue, 2014-04-22 at 22:04 +0200, Peter Zijlstra wrote: > On Tue, Apr 22, 2014 at 01:01:51PM -0700, Andrew Morton wrote: > > On Tue, 22 Apr 2014 10:15:15 +0200 Peter Zijlstra > > wrote: > > > > > On Tue, Apr 22, 2014 at 01:27:15PM +0800, Jiang Liu wrote: > > > > When calling kzalloc_node(size,

Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-22 Thread David Rientjes
On Tue, 22 Apr 2014, Peter Zijlstra wrote: > On Tue, Apr 22, 2014 at 01:01:51PM -0700, Andrew Morton wrote: > > On Tue, 22 Apr 2014 10:15:15 +0200 Peter Zijlstra > > wrote: > > > > > On Tue, Apr 22, 2014 at 01:27:15PM +0800, Jiang Liu wrote: > > > > When calling kzalloc_node(size, flags, node),

Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-22 Thread Peter Zijlstra
On Tue, Apr 22, 2014 at 01:01:51PM -0700, Andrew Morton wrote: > On Tue, 22 Apr 2014 10:15:15 +0200 Peter Zijlstra > wrote: > > > On Tue, Apr 22, 2014 at 01:27:15PM +0800, Jiang Liu wrote: > > > When calling kzalloc_node(size, flags, node), we should first check > > > whether node is onlined, ot

Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-22 Thread Andrew Morton
On Tue, 22 Apr 2014 10:15:15 +0200 Peter Zijlstra wrote: > On Tue, Apr 22, 2014 at 01:27:15PM +0800, Jiang Liu wrote: > > When calling kzalloc_node(size, flags, node), we should first check > > whether node is onlined, otherwise it may cause invalid memory access > > as below. > > But this is on

Re: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition

2014-04-22 Thread Peter Zijlstra
On Tue, Apr 22, 2014 at 01:27:15PM +0800, Jiang Liu wrote: > When calling kzalloc_node(size, flags, node), we should first check > whether node is onlined, otherwise it may cause invalid memory access > as below. But this is only for memory less node crap, right? -- To unsubscribe from this list: