memory page_alloc zonelist caching speedup aligncache
Subsystems (3)
PATCH 1/1 memory page_alloc zonelist caching speedup aligncache
Avoid frequent writes to the zonelist zones[] array, which are read-only after initial setup, by putting the zonelist_cache on a separate cacheline.
---
include/linux/mmzone.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-)
include/linux/mmzone.h +2 -1
@@ -396,7 +396,8 @@ struct zonelist {struct zonelist_cache *zlcache_ptr;// NULL or &zlcache struct zone *zones[MAX_ZONES_PER_ZONELIST +1 ];// NULL delimited #ifdef CONFIG_NUMA -struct zonelist_cache zlcache;// optional ... +/* Keep written zonelist_cache off read-only zones[] cache lines */ +struct zonelist_cache zlcache____cacheline_aligned ;// optional ... #endif };
Signature · 9 lines
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>Quoted 17 lines · Paul Jackson
From: Paul Jackson <[email protected]>
Avoid frequent writes to the zonelist zones[] array, which are read-only after initial setup, by putting the
zonelist_cacheon a separate cacheline.Signed-off-by Paul Jackson <[email protected]>---
include/linux/mmzone.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-)
include/linux/mmzone.h struct zonelist { · line 403
Quoted 9 lines
include/linux/mmzone.h +2
-1@@ -396,7 +396,8 @@ struct zonelist {struct zonelist_cache *zlcache_ptr;// NULL or &zlcache struct zone *zones[MAX_ZONES_PER_ZONELIST +1 ];// NULL delimited #ifdef CONFIG_NUMA -struct zonelist_cache zlcache;// optional ... +/* Keep written zonelist_cache off read-only zones[] cache lines */ +struct zonelist_cache zlcache____cacheline_aligned ;// optional ... #endif };
Wouldn't it be better to have the read mostly field z_to_n defined first in zonelist_cache (and define the BITMAP at the end).
-rohit
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>