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


Groups > linux.kernel > #1741930 > unrolled thread

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

Started byLin Xiulei <linxiulei@gmail.com>
First post2017-09-29 08:00 +0200
Last post2017-09-29 11:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] perf/core: Fix updating cgroup time with descendants Lin Xiulei <linxiulei@gmail.com> - 2017-09-29 08:00 +0200
    Re: [PATCH v2] perf/core: Fix updating cgroup time with descendants Peter Zijlstra <peterz@infradead.org> - 2017-09-29 11:30 +0200

#1741930 — [PATCH v2] perf/core: Fix updating cgroup time with descendants

FromLin Xiulei <linxiulei@gmail.com>
Date2017-09-29 08:00 +0200
Subject[PATCH v2] perf/core: Fix updating cgroup time with descendants
Message-ID<uuWv8-2aF-1@gated-at.bofh.it>
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);
 }

[toc] | [next] | [standalone]


#1742008

FromPeter Zijlstra <peterz@infradead.org>
Date2017-09-29 11:30 +0200
Message-ID<uuZMm-4l7-19@gated-at.bofh.it>
In reply to#1741930
On Fri, Sep 29, 2017 at 01:54:44PM +0800, Lin Xiulei wrote:
> 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>

Thanks!

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web