lkml.org 
[lkml]   [2010]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [thisops uV2 02/10] vmstat: Optimize zone counter modifications through the use of this cpu operations
Some numbers for the cmpxchg implementation (cycles)

Function Orig Cmpxchg Fallback
--------------------------------------------------
inc_zone_page_state 170 32 196
__inc_zone_page_s 23 31 26
inc/dec pairs 347 69 379
So the fallback is always worse. cmpxchg is only better for the versions
of zone counters where we need to disable and enable interrupts.

This would suggest to only use the cmpxchg for arches that have cmpxchg
local and only in the case of the full versions.

There are 12 cases of inc_zone_page_state and 13 of dec_zone_page_state
as well as 7 cases of mod_zone_page_state.




\
 
 \ /
  Last update: 2010-11-29 22:01    [from the cache]
©2003-2011 Jasper Spaans