Messages in this thread | | | Date | Mon, 29 Nov 2010 14:59:20 -0600 (CST) | From | Christoph Lameter <> | Subject | Re: [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.
| |