Michal Hocko
33398cf2f3
memcg: export struct mem_cgroup
...
mem_cgroup structure is defined in mm/memcontrol.c currently which means
that the code outside of this file has to use external API even for
trivial access stuff.
This patch exports mm_struct with its dependencies and makes some of the
exported functions inlines. This even helps to reduce the code size a bit
(make defconfig + CONFIG_MEMCG=y)
text data bss dec hex filename
12355346 1823792 1089536 15268674 e8fb42 vmlinux.before
12354970 1823792 1089536 15268298 e8f9ca vmlinux.after
This is not much (370B) but better than nothing.
We also save a function call in some hot paths like callers of
mem_cgroup_count_vm_event which is used for accounting.
The patch doesn't introduce any functional changes.
[vdavykov@parallels.com: inline memcg_kmem_is_active]
[vdavykov@parallels.com: do not expose type outside of CONFIG_MEMCG]
[akpm@linux-foundation.org: memcontrol.h needs eventfd.h for eventfd_ctx]
[akpm@linux-foundation.org: export mem_cgroup_from_task() to modules]
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Reviewed-by: Vladimir Davydov <vdavydov@parallels.com>
Suggested-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-09-08 15:35:28 -07:00
..
2015-08-04 22:07:26 -07:00
2015-08-18 09:08:47 +03:00
2015-07-12 21:13:22 +02:00
2015-07-09 20:30:34 +03:00
2015-09-01 13:00:04 -07:00
2015-06-25 11:49:31 +03:00
2015-09-04 15:49:32 -07:00
2015-08-04 17:03:52 -07:00
2015-08-08 12:50:40 +01:00
2015-07-11 17:27:36 -07:00
2015-09-03 16:55:55 -07:00
2015-09-04 11:46:02 -07:00
2015-07-27 15:00:37 -07:00
2015-08-17 15:51:36 -07:00
2015-06-18 09:20:48 +02:00
2015-07-07 13:03:25 -07:00
2015-09-02 16:32:56 -07:00
2015-06-23 14:08:54 -07:00
2015-07-31 15:01:14 +01:00
2015-06-03 14:13:41 +09:00
2015-06-01 15:48:12 +02:00
2015-09-04 12:02:11 -07:00
2015-08-30 14:40:11 +01:00
2015-06-10 15:10:26 +08:00
2015-06-19 15:18:28 +02:00
2015-09-01 13:00:04 -07:00
2015-07-07 13:33:23 +01:00
2015-06-21 21:52:24 +02:00
2015-09-07 14:02:24 -07:00
2015-08-18 09:58:45 -07:00
2015-09-01 03:41:19 +02:00
2015-08-03 12:01:54 -04:00
2015-07-23 18:00:42 -07:00
2015-08-12 11:58:59 +02:00
2015-08-20 14:10:23 -07:00
2015-07-02 08:46:00 -06:00
2015-07-02 08:46:00 -06:00
2015-06-23 15:47:35 +01:00
2015-07-27 15:01:05 +02:00
2015-06-21 21:55:33 +02:00
2015-08-19 14:26:02 -07:00
2015-08-05 09:38:08 +02:00
2015-08-05 09:38:08 +02:00
2015-09-03 12:28:30 -07:00
2015-08-13 10:45:09 -06:00
2015-06-01 14:35:56 -06:00
2015-08-19 14:26:02 -07:00
2015-06-24 17:49:41 -07:00
2015-08-09 22:50:06 -07:00
2015-06-10 23:33:58 -07:00
2015-07-02 01:32:44 -04:00
2015-07-14 17:29:23 -04:00
2015-08-25 14:19:29 -04:00
2015-08-25 14:19:29 -04:00
2015-08-24 16:49:11 -07:00
2015-07-17 16:39:53 -07:00
2015-07-20 11:37:46 +02:00
2015-07-17 16:39:53 -07:00
2015-06-25 17:00:38 -07:00
2015-06-25 17:00:38 -07:00
2015-08-12 11:58:58 +02:00
2015-07-17 16:39:53 -07:00
2015-06-25 17:00:38 -07:00
2015-07-07 10:59:04 +02:00
2015-07-07 10:59:04 +02:00
2015-08-05 13:30:16 -07:00
2015-07-15 13:30:38 +01:00
2015-07-17 16:39:53 -07:00
2015-07-22 09:58:02 +02:00
2015-09-01 15:52:41 +02:00
2015-08-28 15:14:54 +02:00
2015-05-28 11:05:20 +09:30
2015-05-30 22:42:24 -07:00
2015-09-04 16:54:41 -07:00
2015-08-17 16:53:53 +08:00
2015-09-08 15:35:28 -07:00
2015-07-17 16:39:53 -07:00
2015-08-13 12:31:57 -06:00
2015-09-01 19:45:46 -07:00
2015-08-20 12:01:03 +05:30
2015-06-12 11:33:52 +02:00
2015-06-25 09:06:57 +02:00
2015-06-29 10:34:42 -07:00
2015-06-10 08:01:20 -06:00
2015-08-17 12:14:53 -07:00
2015-08-10 11:48:55 +09:00
2015-08-21 22:45:13 -07:00
2015-07-22 15:27:32 -07:00
2015-07-30 11:13:21 -07:00
2015-06-24 17:49:45 -07:00
2015-09-08 15:35:28 -07:00
2015-08-14 16:50:36 -07:00
2015-08-07 22:59:34 -05:00
2015-09-05 20:34:28 -07:00
2015-07-24 13:58:14 -04:00
2015-09-04 16:54:41 -07:00
2015-07-17 08:41:53 -06:00
2015-09-08 15:35:28 -07:00
2015-05-31 11:40:14 +09:00
2015-07-13 14:18:07 -07:00
2015-06-01 14:33:35 +02:00
2015-06-19 15:18:28 +02:00
2015-09-08 15:35:28 -07:00
2015-07-17 16:39:52 -07:00
2015-08-05 11:44:28 -07:00
2015-08-14 17:49:53 +02:00
2015-05-31 13:40:53 +02:00
2015-06-15 17:23:03 -07:00
2015-06-23 06:14:04 -07:00
2015-06-01 16:50:52 -07:00
2015-08-28 13:28:47 -07:00
2015-06-15 19:49:22 -07:00
2015-06-24 02:15:54 -07:00
2015-08-03 12:21:21 +02:00
2015-07-05 23:59:14 -04:00
2015-06-23 18:27:19 -07:00
2015-06-03 12:02:00 +02:00
2015-07-17 16:39:53 -07:00
2015-08-13 21:27:19 -07:00
2015-09-01 14:33:35 -07:00
2015-07-02 22:34:38 +02:00
2015-08-06 00:14:59 +02:00
2015-07-30 00:14:38 +02:00
2015-06-25 12:06:45 +02:00
2015-09-03 12:52:19 -07:00
2015-09-01 14:04:50 -07:00
2015-08-03 11:51:14 +02:00
2015-08-22 14:54:55 +02:00
2015-07-17 16:39:53 -07:00
2015-07-03 15:20:57 -07:00
2015-08-04 22:25:28 -07:00
2015-07-28 08:50:42 +01:00
2015-06-24 17:49:46 -07:00
2015-07-17 16:39:53 -07:00
2015-08-04 10:16:54 +02:00
2015-09-04 16:54:41 -07:00
2015-07-30 16:02:54 +02:00
2015-06-19 10:03:12 +02:00
2015-07-15 11:47:24 -04:00
2015-06-26 11:23:38 -04:00
2015-08-17 18:39:45 -04:00
2015-08-12 11:59:08 +02:00
2015-06-24 15:09:40 -07:00
2015-06-27 13:26:03 -07:00
2015-06-11 22:19:45 +05:30
2015-08-10 14:29:27 +05:30
2015-05-28 12:21:08 +02:00
2015-08-03 17:30:00 -07:00
2015-06-30 19:44:55 -07:00
2015-09-08 15:35:28 -07:00
2015-08-05 10:35:49 -07:00
2015-09-04 16:54:41 -07:00
2015-06-24 17:49:41 -07:00
2015-09-08 15:35:28 -07:00
2015-07-17 16:39:53 -07:00
2015-06-24 17:49:44 -07:00
2015-09-04 16:54:41 -07:00
2015-08-07 15:03:42 +02:00
2015-07-05 23:59:14 -04:00
2015-07-01 10:49:25 -07:00
2015-06-16 14:35:06 +08:00
2015-07-21 10:39:05 -07:00
2015-07-30 00:14:39 +02:00
2015-06-25 04:20:04 -04:00
2015-08-06 23:51:30 -07:00
2015-08-27 16:28:35 -07:00
2015-07-30 13:37:42 +02:00
2015-06-18 21:14:31 +02:00
2015-08-27 16:35:51 -07:00
2015-09-02 16:32:56 -07:00
2015-08-17 13:22:49 -05:00
2015-08-27 19:45:27 -04:00
2015-08-17 13:32:56 -05:00
2015-06-10 18:32:40 -04:00
2015-09-07 12:36:13 -04:00
2015-09-04 16:54:41 -07:00
2015-07-04 14:05:49 -04:00
2015-07-04 14:04:44 -04:00
2015-08-18 11:56:13 -06:00
2015-08-05 13:43:44 -07:00
2015-08-05 13:43:12 -07:00
2015-07-27 08:23:27 -05:00
2015-07-01 19:40:18 -07:00
2015-07-28 13:55:36 +02:00
2015-06-24 11:18:48 +10:00
2015-07-30 00:14:37 +02:00
2015-08-25 11:29:55 -05:00
2015-08-26 01:46:39 +02:00
2015-09-08 15:35:28 -07:00
2015-07-17 16:39:54 -07:00
2015-08-07 04:39:42 +03:00
2015-07-04 19:36:06 -07:00
2015-06-01 07:08:18 +09:00
2015-07-17 16:39:53 -07:00
2015-08-16 13:26:01 -03:00
2015-08-13 15:59:58 -05:00
2015-09-01 14:33:35 -07:00
2015-05-29 07:39:34 +10:00
2015-07-14 17:43:56 -04:00
2015-08-15 13:52:10 +02:00
2015-08-09 22:50:05 -07:00
2015-08-31 14:48:02 -07:00
2015-08-31 14:48:01 -07:00
2015-06-16 14:12:37 -04:00
2015-08-29 01:54:43 +02:00
2015-08-07 03:17:06 +02:00
2015-07-28 08:50:41 +01:00
2015-07-21 23:14:22 +02:00
2015-05-30 02:17:15 +02:00
2015-06-19 01:18:14 +02:00
2015-06-29 10:34:42 -07:00
2015-06-10 16:15:54 +02:00
2015-08-03 12:21:24 +02:00
2015-07-17 16:39:53 -07:00
2015-08-13 16:58:29 -07:00
2015-08-07 14:37:04 +02:00
2015-08-03 12:33:39 +01:00
2015-06-12 11:36:30 +02:00
2015-07-31 19:13:33 +01:00
2015-05-28 10:47:45 -05:00
2015-07-23 20:59:10 +02:00
2015-06-10 19:14:04 +08:00
2015-05-28 11:32:04 +09:30
2015-05-28 11:32:06 +09:30
2015-05-28 11:32:04 +09:30
2015-05-27 12:58:04 -07:00
2015-07-22 15:27:32 -07:00
2015-07-22 15:26:58 -07:00
2015-07-22 15:26:58 -07:00
2015-08-30 15:55:54 +01:00
2015-06-17 09:57:12 +03:00
2015-09-04 16:54:41 -07:00
2015-06-25 01:13:43 +02:00
2015-06-23 06:56:18 -07:00
2015-08-24 14:28:01 -06:00
2015-09-04 16:54:41 -07:00
2015-06-27 13:26:03 -07:00
2015-09-04 16:54:41 -07:00
2015-07-01 10:49:25 -07:00
2015-07-23 17:43:30 -07:00
2015-07-16 10:30:55 -07:00
2015-08-05 08:48:00 +05:30
2015-09-01 21:19:17 -07:00
2015-09-04 16:54:41 -07:00
2015-09-04 16:54:41 -07:00
2015-06-15 19:49:22 -07:00
2015-09-01 08:40:25 -07:00
2015-06-25 17:00:38 -07:00
2015-07-29 00:13:25 -07:00
2015-08-03 12:21:27 +02:00
2015-06-25 17:00:40 -07:00
2015-09-08 15:35:28 -07:00
2015-09-04 16:54:41 -07:00
2015-07-01 10:36:39 -05:00
2015-07-01 10:36:45 -05:00
2015-06-25 17:00:39 -07:00
2015-08-05 13:24:12 -07:00
2015-07-29 15:45:01 +02:00
2015-08-17 11:25:28 -07:00
2015-06-12 11:15:49 +02:00
2015-08-20 21:13:22 +02:00
2015-06-19 15:18:28 +02:00
2015-05-27 15:22:15 +02:00
2015-08-06 15:29:14 -03:00
2015-08-03 15:24:43 -07:00
2015-07-23 18:37:31 -07:00
2015-07-22 15:27:29 -07:00
2015-06-15 16:02:52 -07:00
2015-08-28 16:27:27 -07:00
2015-07-31 10:38:06 +02:00
2015-08-18 09:59:12 -07:00
2015-09-04 16:54:41 -07:00
2015-06-01 15:48:54 +02:00
2015-06-01 15:48:54 +02:00
2015-06-12 17:26:57 -07:00
2015-06-01 15:48:54 +02:00
2015-09-04 16:54:41 -07:00
2015-09-04 16:54:41 -07:00
2015-08-17 15:48:24 -04:00
2015-06-02 08:40:20 -06:00
2015-06-25 17:00:37 -07:00