Johannes Weiner
867e5e1de1
mm: clean up and clarify lruvec lookup procedure
...
There is a per-memcg lruvec and a NUMA node lruvec. Which one is being
used is somewhat confusing right now, and it's easy to make mistakes -
especially when it comes to global reclaim.
How it works: when memory cgroups are enabled, we always use the
root_mem_cgroup's per-node lruvecs. When memory cgroups are not compiled
in or disabled at runtime, we use pgdat->lruvec.
Document that in a comment.
Due to the way the reclaim code is generalized, all lookups use the
mem_cgroup_lruvec() helper function, and nobody should have to find the
right lruvec manually right now. But to avoid future mistakes, rename the
pgdat->lruvec member to pgdat->__lruvec and delete the convenience wrapper
that suggests it's a commonly accessed member.
While in this area, swap the mem_cgroup_lruvec() argument order. The name
suggests a memcg operation, yet it takes a pgdat first and a memcg second.
I have to double take every time I call this. Fix that.
Link: http://lkml.kernel.org/r/20191022144803.302233-3-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org >
Acked-by: Michal Hocko <mhocko@suse.com >
Reviewed-by: Shakeel Butt <shakeelb@google.com >
Cc: Roman Gushchin <guro@fb.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2019-12-01 12:59:06 -08:00
..
2019-11-16 21:51:42 -08:00
2019-11-27 10:53:50 -08:00
2019-10-31 14:19:45 -07:00
2019-11-22 19:56:20 +00:00
2019-11-03 10:47:42 +00:00
2019-11-25 18:02:36 -08:00
2019-10-18 19:37:45 +01:00
2019-11-27 10:17:28 -08:00
2019-11-18 10:05:38 +01:00
2019-11-11 20:42:55 +02:00
2019-10-07 23:59:02 +02:00
2019-10-31 16:54:00 +05:30
2019-11-27 10:57:52 -08:00
2019-11-13 11:33:53 +01:00
2019-11-07 13:10:08 +00:00
2019-11-26 16:02:40 -08:00
2019-11-09 16:46:56 +05:30
2019-10-23 17:48:57 +01:00
2019-10-30 12:04:35 -04:00
2019-11-16 14:45:31 +01:00
2019-10-15 12:06:23 +02:00
2019-11-14 12:31:00 +08:00
2019-10-14 10:55:14 +01:00
2019-10-21 19:20:30 +01:00
2019-11-23 09:56:02 -08:00
2019-10-14 15:04:01 -07:00
2019-11-21 09:06:47 -07:00
2019-11-18 08:40:41 -07:00
2019-11-13 12:50:38 -07:00
2019-11-12 19:12:07 -07:00
2019-11-15 23:44:48 +01:00
2019-11-24 17:04:11 -08:00
2019-11-24 17:12:11 -08:00
2019-10-23 20:42:52 -07:00
2019-11-14 13:15:11 -05:00
2019-11-15 23:45:24 +01:00
2019-11-12 08:18:04 -08:00
2019-11-12 08:18:04 -08:00
2019-11-20 09:40:07 +01:00
2019-10-11 09:26:05 -07:00
2019-10-29 10:01:16 +01:00
2019-10-29 10:01:14 +01:00
2019-11-04 21:57:51 +01:00
2019-10-18 19:47:49 +01:00
2019-11-26 10:26:26 +01:00
2019-10-21 02:05:21 +02:00
2019-11-26 09:43:34 -08:00
2019-11-20 11:46:18 +01:00
2019-11-17 09:02:49 +08:00
2019-11-21 14:28:32 +01:00
2019-11-25 11:53:26 -08:00
2019-11-28 11:16:43 -08:00
2019-10-09 19:33:43 -07:00
2019-10-24 09:18:09 +02:00
2019-11-21 18:14:35 +01:00
2019-11-28 11:16:43 -08:00
2019-11-20 20:31:38 +01:00
2019-10-22 12:54:44 -07:00
2019-11-10 12:40:14 +01:00
2019-11-26 19:25:25 -08:00
2019-10-17 16:23:25 +02:00
2019-10-18 15:32:52 +02:00
2019-11-12 08:18:04 -08:00
2019-10-17 16:44:36 +02:00
2019-11-24 17:11:28 -08:00
2019-12-01 06:29:18 -08:00
2019-11-06 12:34:36 -08:00
2019-11-27 11:42:01 -08:00
2019-11-20 09:40:10 +01:00
2019-11-27 11:06:20 -08:00
2019-11-14 07:43:53 -07:00
2019-12-01 12:59:06 -08:00
2019-11-23 19:56:45 -04:00
2019-10-29 15:04:34 +01:00
2019-11-06 13:02:17 +01:00
2019-11-05 14:03:11 -08:00
2019-11-05 14:03:11 -08:00
2019-11-08 08:46:49 -08:00
2019-10-24 14:53:49 -07:00
2019-10-24 14:53:48 -07:00
2019-10-24 14:53:49 -07:00
2019-11-11 16:10:54 +01:00
2019-10-21 08:51:59 -07:00
2019-11-07 15:44:14 +01:00
2019-10-22 14:42:34 -05:00
2019-11-30 10:53:02 -08:00
2019-10-21 09:16:46 -04:00
2019-12-01 12:59:05 -08:00
2019-11-21 07:33:24 +01:00
2019-11-25 09:15:42 +01:00
2019-11-12 08:18:04 -08:00
2019-11-21 12:03:40 +01:00
2019-10-21 19:20:28 +01:00
2019-10-08 22:05:58 +02:00
2019-11-01 08:50:51 -06:00
2019-10-18 12:13:35 +02:00
2019-10-15 20:40:06 -07:00
2019-11-01 13:08:19 +01:00
2019-10-09 12:46:10 +02:00
2019-10-17 21:31:55 +02:00
2019-12-01 12:59:06 -08:00
2019-12-01 12:59:04 -08:00
2019-11-15 18:34:00 -08:00
2019-11-07 15:45:00 +01:00
2019-10-17 16:31:52 -07:00
2019-11-05 18:25:54 +01:00
2019-11-06 08:28:58 -08:00
2019-12-01 12:59:06 -08:00
2019-11-23 19:56:44 -04:00
2019-12-01 12:59:06 -08:00
2019-12-01 12:59:05 -08:00
2019-11-27 10:17:28 -08:00
2019-10-17 12:20:48 +02:00
2019-11-04 10:56:40 -07:00
2019-11-22 02:21:08 +09:00
2019-11-27 10:53:50 -08:00
2019-11-04 11:21:25 -08:00
2019-10-14 15:04:00 -07:00
2019-11-06 08:28:58 -08:00
2019-12-01 12:59:04 -08:00
2019-11-06 13:02:43 +01:00
2019-11-13 19:09:47 +08:00
2019-11-26 20:04:35 -08:00
2019-10-09 12:46:10 +02:00
2019-11-26 15:04:47 -08:00
2019-11-25 10:47:00 -08:00
2019-11-23 16:13:39 -08:00
2019-11-15 23:49:22 +01:00
2019-11-15 23:49:22 +01:00
2019-11-05 18:33:13 +01:00
2019-11-13 11:41:50 +01:00
2019-11-11 10:27:15 +05:30
2019-10-21 02:05:21 +02:00
2019-11-13 11:41:50 +01:00
2019-11-05 23:18:10 +01:00
2019-10-14 10:55:14 +01:00
2019-10-18 18:24:50 +01:00
2019-11-11 11:06:27 +01:00
2019-11-06 10:52:10 +01:00
2019-11-01 22:26:34 -04:00
2019-10-30 08:32:07 -07:00
2019-11-26 16:02:40 -08:00
2019-11-25 09:15:32 +01:00
2019-10-28 12:18:23 +01:00
2019-10-24 10:26:33 +02:00
2019-11-14 13:07:48 +08:00
2019-10-09 12:46:10 +02:00
2019-11-13 12:50:40 -07:00
2019-11-26 16:02:40 -08:00
2019-11-11 07:59:06 +01:00
2019-11-04 07:11:31 -07:00
2019-11-14 13:15:12 -05:00
2019-10-09 12:46:10 +02:00
2019-11-20 22:29:40 -08:00
2019-11-22 16:27:24 -08:00
2019-11-09 11:04:37 -08:00
2019-12-01 06:29:17 -08:00
2019-11-25 19:56:11 -07:00
2019-11-14 13:15:11 -05:00
2019-10-09 12:46:10 +02:00
2019-11-13 12:15:34 -08:00
2019-11-04 11:21:25 -08:00
2019-12-01 06:29:18 -08:00
2019-11-04 11:21:25 -08:00
2019-10-10 14:35:32 +02:00
2019-10-25 19:25:37 -07:00
2019-11-26 15:42:43 -08:00
2019-11-12 21:45:37 +02:00
2019-11-22 19:41:08 -05:00
2019-11-14 13:15:12 -05:00
2019-11-22 19:41:08 -05:00
2019-11-14 13:15:11 -05:00
2019-11-07 20:03:08 -08:00
2019-11-02 12:39:12 -07:00
2019-11-14 18:12:18 -08:00
2019-12-01 12:59:05 -08:00
2019-11-14 18:12:18 -08:00
2019-10-29 10:01:16 +01:00
2019-11-14 12:20:02 +08:00
2019-10-09 12:46:10 +02:00
2019-10-14 15:04:01 -07:00