Re: [thisops uV2 02/10] vmstat: Optimize zone counter modificationsthrough the use of this cpu operations

From: Christoph Lameter
Date: Mon Nov 29 2010 - 15:59:32 EST


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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/