Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1734779

[PATCH v2] perf/core: Update cgroup time with descendants

From linxiulei@gmail.com
Newsgroups linux.kernel
Subject [PATCH v2] perf/core: Update cgroup time with descendants
Date 2017-09-19 12:00 +0200
Message-ID <urntU-3th-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: "leilei.lin" <leilei.lin@alibaba-inc.com>

This fix updating cgroup time when event is being scheduled in
by descendants

Signed-off-by: leilei.lin <leilei.lin@alibaba-inc.com>
Reviewed-and-tested-by: Jiri Olsa <jolsa@kernel.org>
---
 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 3e691b7..e3a5e32 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -662,7 +662,7 @@ static inline void update_cgrp_time_from_event(struct perf_event *event)
 	/*
 	 * Do not update time when cgroup is not active
 	 */
-	if (cgrp == event->cgrp)
+	if (cgroup_is_descendant(cgrp->css.cgroup, event->cgrp->css.cgroup))
 		__update_cgrp_time(event->cgrp);
 }
 
-- 
2.8.4.31.g9ed660f

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v2] perf/core: Update cgroup time with descendants linxiulei@gmail.com - 2017-09-19 12:00 +0200

csiph-web