lkml.org 
[lkml]   [2014]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/8] idr: avoid ping-pong
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
> ida_get_new*() can't result expected optimization.
>
> So we remove the unneeded layer removal in ida_get_new*().

But the as comment says, ida doesn't want to keep extra layers around
as it wants to keep its memory footprint minimal. I think the right
thing to do is implementing ida_preload() which is simliar to
idr_preload() and do away with per-ida layer cache.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2014-04-18 21:21    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog