Feng Tang
4df910620b
mm: memcg: relayout structure mem_cgroup to avoid cache interference
...
0day reported one -22.7% regression for will-it-scale page_fault2
case [1] on a 4 sockets 144 CPU platform, and bisected to it to be
caused by Waiman's optimization (commit bd0b230fe1 ) of saving one
'struct page_counter' space for 'struct mem_cgroup'.
Initially we thought it was due to the cache alignment change introduced
by the patch, but further debug shows that it is due to some hot data
members ('vmstats_local', 'vmstats_percpu', 'vmstats') sit in 2 adjacent
cacheline (2N and 2N+1 cacheline), and when adjacent cache line prefetch
is enabled, it triggers an "extended level" of cache false sharing for
2 adjacent cache lines.
So exchange the 2 member blocks, while keeping mostly the original
cache alignment, which can restore and even enhance the performance,
and save 64 bytes of space for 'struct mem_cgroup' (from 2880 to 2816,
with 0day's default RHEL-8.3 kernel config)
[1]. https://lore.kernel.org/lkml/20201102091543.GM31092@shao2-debian/
Fixes: bd0b230fe1 ("mm/memcg: unify swap and memsw page counters")
Reported-by: kernel test robot <rong.a.chen@intel.com >
Signed-off-by: Feng Tang <feng.tang@intel.com >
Acked-by: Waiman Long <longman@redhat.com >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2020-11-26 09:35:49 -08:00
..
2020-11-03 22:30:31 +01:00
2020-10-12 15:29:27 +02:00
2020-10-12 15:29:26 +02:00
2020-10-29 17:22:59 -05:00
2020-10-15 18:42:13 -07:00
2020-10-15 09:46:23 -07:00
2020-10-15 07:57:55 +02:00
2020-10-29 17:22:59 -05:00
2020-10-21 11:22:08 -07:00
2020-10-31 14:31:28 -07:00
2020-10-25 14:51:49 -07:00
2020-10-30 12:57:39 +01:00
2020-10-29 17:22:59 -05:00
2020-10-17 11:18:18 -07:00
2020-10-25 14:51:49 -07:00
2020-10-24 10:39:22 -07:00
2020-11-12 15:05:34 +00:00
2020-10-22 09:44:27 -07:00
2020-10-28 13:18:56 +01:00
2020-10-25 14:51:49 -07:00
2020-10-28 11:13:36 +00:00
2020-10-13 11:37:11 +02:00
2020-10-16 11:11:20 -07:00
2020-10-13 15:05:05 -06:00
2020-10-28 11:26:10 -06:00
2020-10-16 11:11:19 -07:00
2020-10-22 09:59:21 -07:00
2020-10-11 10:21:04 -07:00
2020-10-16 11:11:19 -07:00
2020-10-25 14:51:49 -07:00
2020-10-13 18:38:34 -07:00
2020-10-12 16:44:57 -07:00
2020-10-25 14:51:49 -07:00
2020-10-29 20:01:46 -07:00
2020-11-22 10:48:22 -08:00
2020-11-14 11:26:03 -08:00
2020-11-14 11:26:03 -08:00
2020-10-16 11:11:21 -07:00
2020-10-25 14:51:49 -07:00
2020-11-10 18:31:17 +01:00
2020-10-16 12:21:15 -07:00
2020-10-16 17:21:51 +02:00
2020-10-13 15:58:10 -07:00
2020-10-19 14:28:30 -07:00
2020-10-30 08:37:39 +01:00
2020-10-16 07:28:20 +02:00
2020-10-15 14:43:29 -07:00
2020-10-20 10:41:07 +02:00
2020-10-20 10:41:07 +02:00
2020-10-25 14:51:49 -07:00
2020-10-12 13:38:31 +02:00
2020-10-12 10:51:02 -07:00
2020-10-25 14:51:49 -07:00
2020-10-16 11:11:22 -07:00
2020-10-27 16:22:43 +01:00
2020-10-25 14:51:49 -07:00
2020-10-15 10:46:16 -07:00
2020-11-13 16:07:53 -08:00
2020-11-12 13:59:04 -07:00
2020-10-15 14:43:29 -07:00
2020-10-22 22:44:35 +02:00
2020-10-13 18:38:32 -07:00
2020-10-12 12:08:35 +02:00
2020-10-16 11:11:20 -07:00
2020-10-25 14:51:49 -07:00
2020-10-25 14:51:49 -07:00
2020-10-16 17:35:36 +02:00
2020-11-18 13:09:07 +00:00
2020-10-25 14:51:49 -07:00
2020-11-04 10:22:56 -07:00
2020-10-20 07:10:14 -06:00
2020-11-04 08:52:46 -08:00
2020-10-14 12:08:34 -07:00
2020-10-16 11:11:18 -07:00
2020-10-12 11:40:41 -07:00
2020-11-19 22:38:29 -05:00
2020-10-29 13:17:58 -05:00
2020-10-16 11:11:19 -07:00
2020-10-13 18:38:32 -07:00
2020-10-25 14:51:49 -07:00
2020-10-11 10:31:11 -07:00
2020-10-12 14:21:15 -07:00
2020-10-23 03:42:13 -04:00
2020-10-25 14:51:49 -07:00
2020-10-16 11:11:20 -07:00
2020-10-25 14:51:49 -07:00
2020-10-15 07:49:46 +02:00
2020-10-13 18:38:35 -07:00
2020-11-26 09:35:49 -08:00
2020-11-22 10:48:22 -08:00
2020-10-13 18:38:28 -07:00
2020-10-16 11:11:19 -07:00
2020-10-12 10:40:34 -07:00
2020-11-02 12:14:19 -08:00
2020-10-13 18:38:31 -07:00
2020-10-16 11:11:19 -07:00
2020-10-28 14:08:54 +00:00
2020-10-25 14:51:49 -07:00
2020-10-13 17:33:48 -07:00
2020-10-30 12:57:39 +01:00
2020-10-30 12:57:39 +01:00
2020-10-21 18:24:08 -07:00
2020-10-21 10:31:20 -04:00
2020-10-16 11:11:18 -07:00
2020-10-16 11:11:19 -07:00
2020-11-22 10:48:22 -08:00
2020-10-25 14:51:49 -07:00
2020-10-25 14:51:49 -07:00
2020-10-13 18:38:35 -07:00
2020-10-17 11:18:18 -07:00
2020-10-16 11:11:15 -07:00
2020-10-16 11:11:16 -07:00
2020-11-22 10:48:22 -08:00
2020-10-22 13:00:44 -07:00
2020-10-25 14:51:49 -07:00
2020-11-09 18:12:34 +01:00
2020-11-09 18:12:34 +01:00
2020-11-02 12:14:19 -08:00
2020-10-28 11:41:15 -06:00
2020-10-18 09:27:10 -07:00
2020-10-16 17:53:22 +02:00
2020-11-16 09:37:01 -08:00
2020-10-24 20:21:57 +02:00
2020-10-25 14:51:49 -07:00
2020-10-14 16:09:32 -07:00
2020-10-24 10:39:22 -07:00
2020-10-13 08:41:26 -04:00
2020-10-13 18:38:28 -07:00
2020-10-25 14:51:49 -07:00
2020-10-28 11:41:15 -06:00
2020-10-13 19:20:54 -05:00
2020-11-22 13:26:07 -08:00
2020-11-06 10:05:18 -08:00
2020-10-14 18:07:50 +02:00
2020-10-25 14:51:49 -07:00
2020-10-29 13:17:58 -05:00
2020-10-15 18:42:13 -07:00
2020-10-11 18:09:44 -07:00
2020-10-25 11:39:02 -07:00
2020-10-25 14:51:49 -07:00
2020-10-22 14:15:51 -06:00
2020-10-13 18:38:30 -07:00
2020-10-13 18:38:30 -07:00
2020-11-16 14:58:23 -08:00
2020-10-25 14:51:49 -07:00
2020-10-17 15:05:30 -06:00
2020-10-12 12:08:36 +02:00
2020-10-26 11:48:11 +01:00
2020-10-25 14:51:49 -07:00
2020-10-17 15:04:36 -06:00
2020-10-15 15:51:28 -07:00
2020-10-25 14:51:49 -07:00
2020-10-24 10:57:57 -07:00
2020-10-12 16:35:51 -07:00
2020-10-23 11:55:27 -04:00
2020-10-23 11:00:57 -07:00
2020-10-18 09:27:10 -07:00
2020-10-16 11:11:19 -07:00
2020-10-20 14:39:37 -07:00