From 8918861861bc650f17d110b2e721bc6b8d406e08 Mon Sep 17 00:00:00 2001 From: Liam Mark Date: Tue, 25 Nov 2014 09:51:29 -0800 Subject: mm: vmscan: support setting of kswapd cpu affinity Allow the kswapd cpu affinity to be configured. There can be power benefits on certain targets when limiting kswapd to run only on certain cores. CRs-fixed: 752344 Change-Id: I8a83337ff313a7e0324361140398226a09f8be0f Signed-off-by: Liam Mark [imaund@codeaurora.org: Resolved trivial context conflicts.] Signed-off-by: Ian Maund --- mm/Kconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mm/Kconfig') diff --git a/mm/Kconfig b/mm/Kconfig index 3ca6a255de03..7b7eae150c4e 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -628,6 +628,19 @@ config BALANCE_ANON_FILE_RECLAIM Swapping anonymous pages out to memory can be efficient enough to justify treating anonymous and file backed pages equally. +config KSWAPD_CPU_AFFINITY_MASK + string "kswapd cpu affinity mask" + depends on SMP + help + Set the cpu affinity for the kswapd task. + There can be power benefits on certain targets when limiting kswapd + to run only on certain cores. + The cpu affinity bitmask is represented by a hex string where commas + group hex digits into chunks. Each chunk defines exactly 32 bits of + the resultant bitmask. + For example to limit kswapd to the first 4 cores use the following: + CONFIG_KSWAPD_CPU_AFFINITY_MASK="f" + # For architectures that support deferred memory initialisation config ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT bool -- cgit v1.2.3