aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/event_analyzing_sample.py
diff options
context:
space:
mode:
authorJoonsoo Kim <[email protected]>2013-01-21 17:01:25 +0900
committerPekka Enberg <[email protected]>2013-04-02 09:42:10 +0300
commit633b076464da52b3c7bf0f62932fbfc0ea23d8b3 (patch)
tree546927d08f30ea3049051b89a55b7c7a56937f7f /tools/perf/scripts/python/event_analyzing_sample.py
parent7d557b3cb69398d83ceabad9cf147c93a3aa97fd (diff)
slub: correct to calculate num of acquired objects in get_partial_node()
There is a subtle bug when calculating a number of acquired objects. Currently, we calculate "available = page->objects - page->inuse", after acquire_slab() is called in get_partial_node(). In acquire_slab() with mode = 1, we always set new.inuse = page->objects. So, acquire_slab(s, n, page, object == NULL); if (!object) { c->page = page; stat(s, ALLOC_FROM_PARTIAL); object = t; available = page->objects - page->inuse; !!! availabe is always 0 !!! ... Therfore, "available > s->cpu_partial / 2" is always false and we always go to second iteration. This patch correct this problem. After that, we don't need return value of put_cpu_partial(). So remove it. Reviewed-by: Wanpeng Li <[email protected]> Acked-by: Christoph Lameter <[email protected]> Signed-off-by: Joonsoo Kim <[email protected]> Signed-off-by: Pekka Enberg <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions