Re: [PATCH 6/8] idr: avoid ping-pong

2014-04-19 Thread Lai Jiangshan
On Sat, Apr 19, 2014 at 9:01 PM, Tejun Heo wrote: > Hello, > > On Sat, Apr 19, 2014 at 06:43:41PM +0800, Lai Jiangshan wrote: >> On 04/19/2014 01:17 AM, Tejun Heo wrote: >> It only frees one layer. And the ida_pre_get() for the next ida_get_new*() >> will allocation it back again. The aim "Throw

Re: [PATCH 6/8] idr: avoid ping-pong

2014-04-19 Thread Tejun Heo
Hello, On Sat, Apr 19, 2014 at 06:43:41PM +0800, Lai Jiangshan wrote: > On 04/19/2014 01:17 AM, Tejun Heo wrote: > It only frees one layer. And the ida_pre_get() for the next ida_get_new*() > will allocation it back again. The aim "Throw away extra resources one by one" > can't be achieved. It

Re: [PATCH 6/8] idr: avoid ping-pong

2014-04-19 Thread Lai Jiangshan
On 04/19/2014 01:17 AM, Tejun Heo wrote: > On Fri, Apr 18, 2014 at 08:49:53PM +0800, Lai Jiangshan wrote: >> The ida callers always calls ida_pre_get() before ida_get_new*(). >> ida_pre_get() will do layer allocation, and ida_get_new*() will do layer >> removal. >> >> It causes an unneeded

Re: [PATCH 6/8] idr: avoid ping-pong

2014-04-19 Thread Lai Jiangshan
On 04/19/2014 01:17 AM, Tejun Heo wrote: On Fri, Apr 18, 2014 at 08:49:53PM +0800, Lai Jiangshan wrote: The ida callers always calls ida_pre_get() before ida_get_new*(). ida_pre_get() will do layer allocation, and ida_get_new*() will do layer removal. It causes an unneeded ping-pong. The

Re: [PATCH 6/8] idr: avoid ping-pong

2014-04-19 Thread Tejun Heo
Hello, On Sat, Apr 19, 2014 at 06:43:41PM +0800, Lai Jiangshan wrote: On 04/19/2014 01:17 AM, Tejun Heo wrote: It only frees one layer. And the ida_pre_get() for the next ida_get_new*() will allocation it back again. The aim Throw away extra resources one by one can't be achieved. It can't

Re: [PATCH 6/8] idr: avoid ping-pong

2014-04-19 Thread Lai Jiangshan
On Sat, Apr 19, 2014 at 9:01 PM, Tejun Heo t...@kernel.org wrote: Hello, On Sat, Apr 19, 2014 at 06:43:41PM +0800, Lai Jiangshan wrote: On 04/19/2014 01:17 AM, Tejun Heo wrote: It only frees one layer. And the ida_pre_get() for the next ida_get_new*() will allocation it back again. The aim

Re: [PATCH 6/8] idr: avoid ping-pong

2014-04-18 Thread Tejun Heo
On Fri, Apr 18, 2014 at 08:49:53PM +0800, Lai Jiangshan wrote: > The ida callers always calls ida_pre_get() before ida_get_new*(). > ida_pre_get() will do layer allocation, and ida_get_new*() will do layer > removal. > > It causes an unneeded ping-pong. The speculative layer removal in >

[PATCH 6/8] idr: avoid ping-pong

2014-04-18 Thread Lai Jiangshan
The ida callers always calls ida_pre_get() before ida_get_new*(). ida_pre_get() will do layer allocation, and ida_get_new*() will do layer removal. It causes an unneeded ping-pong. The speculative layer removal in ida_get_new*() can't result expected optimization. So we remove the unneeded

[PATCH 6/8] idr: avoid ping-pong

2014-04-18 Thread Lai Jiangshan
The ida callers always calls ida_pre_get() before ida_get_new*(). ida_pre_get() will do layer allocation, and ida_get_new*() will do layer removal. It causes an unneeded ping-pong. The speculative layer removal in ida_get_new*() can't result expected optimization. So we remove the unneeded

Re: [PATCH 6/8] idr: avoid ping-pong

2014-04-18 Thread Tejun Heo
On Fri, Apr 18, 2014 at 08:49:53PM +0800, Lai Jiangshan wrote: The ida callers always calls ida_pre_get() before ida_get_new*(). ida_pre_get() will do layer allocation, and ida_get_new*() will do layer removal. It causes an unneeded ping-pong. The speculative layer removal in