Tejun Heo
b4ff1b44bc
cgroup, rstat: Don't flush subtree root unless necessary
...
cgroup_rstat_cpu_pop_updated() is used to traverse the updated cgroups
on flush. While it was only visiting updated ones in the subtree, it
was visiting @root unconditionally. We can easily check whether @root
is updated or not by looking at its ->updated_next just as with the
cgroups in the subtree.
* Remove the unnecessary cgroup_parent() test. The system root cgroup
is never updated and thus its ->updated_next is always NULL. No
need to test whether cgroup_parent() exists in addition to
->updated_next.
* Terminate traverse if ->updated_next is NULL. This can only happen
for subtree @root and there's no reason to visit it if it's not
marked updated.
This reduces cpu consumption when reading a lot of rstat backed files.
In a micro benchmark reading stat from ~1600 cgroups, the sys time was
lowered by >40%.
Signed-off-by: Tejun Heo <tj@kernel.org >
2019-02-15 11:01:31 -08:00
..
2019-01-18 15:19:56 -08:00
2019-02-15 11:01:31 -08:00
2018-10-24 20:55:56 -04:00
2018-12-30 08:31:52 +00:00
2019-01-16 09:59:17 -05:00
2019-01-03 18:57:57 -08:00
2018-06-08 18:56:02 +09:00
2019-01-18 00:43:09 +01:00
2018-12-01 12:38:50 -08:00
2019-01-21 11:15:39 +01:00
2018-12-28 12:11:47 -08:00
2019-01-03 18:57:57 -08:00
2018-12-01 12:45:42 -08:00
2019-01-21 11:15:37 +01:00
2019-01-15 16:34:37 +01:00
2019-01-15 11:33:45 -05:00
2018-01-04 16:45:09 -08:00
2018-02-06 18:32:44 -08:00
2018-11-26 18:40:00 -05:00
2018-11-26 18:40:00 -05:00
2018-11-26 18:40:00 -05:00
2018-12-14 12:09:30 -05:00
2018-11-26 18:41:21 -05:00
2018-06-19 10:39:54 -04:00
2018-11-26 18:41:21 -05:00
2018-10-31 08:54:14 -07:00
2017-11-02 11:10:55 +01:00
2019-01-04 12:56:09 -08:00
2018-11-28 11:57:07 +01:00
2018-08-22 10:52:47 -07:00
2018-12-19 13:52:44 -05:00
2018-10-26 16:26:32 -07:00
2018-05-16 07:23:35 +02:00
2017-11-02 11:10:55 +01:00
2018-05-16 07:23:35 +02:00
2019-01-31 06:55:57 -08:00
2018-02-21 16:54:06 +01:00
2018-10-31 08:54:12 -07:00
2019-01-08 18:58:29 -08:00
2018-08-06 12:35:20 +02:00
2019-01-21 11:15:38 +01:00
2017-12-14 16:00:49 -08:00
2019-01-04 13:13:45 -08:00
2018-05-15 23:08:33 -07:00
2018-01-08 19:43:15 +01:00
2019-01-06 09:46:51 +09:00
2018-09-10 22:54:33 +09:00
2017-11-02 11:10:55 +01:00
2018-12-15 17:44:35 +09:00
2019-01-04 13:13:47 -08:00
2018-12-28 12:11:47 -08:00
2018-12-06 14:38:50 +00:00
2017-11-02 11:10:55 +01:00
2018-07-16 12:31:57 -07:00
2018-12-26 14:45:18 -08:00
2018-08-13 11:25:07 -07:00
2019-01-06 09:46:51 +09:00
2018-12-28 12:11:52 -08:00
2018-11-07 14:41:41 +01:00
2018-07-02 11:36:17 +02:00
2019-01-06 09:46:51 +09:00
2018-11-16 14:11:04 +08:00
2019-01-04 13:13:47 -08:00
2018-04-11 10:28:37 -07:00
2018-09-16 16:08:25 +02:00
2018-12-28 12:42:30 -08:00
2018-10-31 08:54:16 -07:00
2019-01-03 18:57:57 -08:00
2017-11-02 11:10:55 +01:00
2018-09-11 16:13:24 +01:00
2018-06-15 07:55:24 +09:00
2018-12-28 12:11:49 -08:00
2019-01-03 18:57:57 -08:00
2019-01-15 09:43:12 -08:00
2019-01-03 18:57:57 -08:00
2018-10-09 16:51:11 +02:00
2018-07-03 09:20:44 +02:00
2017-11-02 11:10:55 +01:00
2018-10-25 11:43:47 -07:00
2018-12-05 19:31:44 -08:00
2018-08-13 11:25:07 -07:00
2018-12-18 16:13:04 +01:00
2019-01-14 10:38:03 +12:00
2019-01-04 13:13:47 -08:00
2019-01-04 13:13:47 -08:00
2017-12-17 13:57:15 +01:00
2018-02-06 18:32:46 -08:00
2018-06-21 12:33:05 +02:00
2018-12-01 12:45:35 -08:00
2018-11-27 09:21:41 -08:00
2018-04-05 21:36:27 -07:00
2018-04-02 20:15:59 +02:00
2018-04-02 20:15:30 +02:00
2019-01-11 18:05:40 -08:00
2018-10-09 16:51:11 +02:00
2018-11-07 23:51:16 -06:00
2018-08-22 10:52:47 -07:00
2018-08-11 02:05:53 -05:00
2018-04-11 10:28:35 -07:00
2018-08-30 12:56:40 +02:00
2018-08-30 12:56:40 +02:00
2018-05-18 08:47:13 -07:00
2018-11-27 09:21:44 -08:00