From: "tip-bot for leilei.lin" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: torvalds@linux-foundation.org, peterz@infradead.org,
leilei.lin@alibaba-inc.com, linux-kernel@vger.kernel.org,
jolsa@redhat.com, mingo@kernel.org, tglx@linutronix.de,
jolsa@kernel.org, eranian@gmail.com, hpa@zytor.com
Subject: [tip:perf/urgent] perf/core: Fix cgroup time when scheduling descendants
Date: Tue, 10 Oct 2017 03:53:22 -0700 [thread overview]
Message-ID: <tip-e6a5203399d19871021c1fa0eb2a08fc63b67e91@git.kernel.org> (raw)
In-Reply-To: <CALPjY3mkHiekRkRECzMi9G-bjUQOvOjVBAqxmWkTzc-g+0LwMg@mail.gmail.com>
Commit-ID: e6a5203399d19871021c1fa0eb2a08fc63b67e91
Gitweb: https://git.kernel.org/tip/e6a5203399d19871021c1fa0eb2a08fc63b67e91
Author: leilei.lin <leilei.lin@alibaba-inc.com>
AuthorDate: Fri, 29 Sep 2017 13:54:44 +0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 10 Oct 2017 10:06:55 +0200
perf/core: Fix cgroup time when scheduling descendants
Update cgroup time when an event is scheduled in by descendants.
Reviewed-and-tested-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: leilei.lin <leilei.lin@alibaba-inc.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: acme@kernel.org
Cc: alexander.shishkin@linux.intel.com
Cc: brendan.d.gregg@gmail.com
Cc: yang_oliver@hotmail.com
Link: http://lkml.kernel.org/r/CALPjY3mkHiekRkRECzMi9G-bjUQOvOjVBAqxmWkTzc-g+0LwMg@mail.gmail.com
Signed-off-by: Ingo Molnar <mingo@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 243bfc6..9d93db8 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);
}
prev parent reply other threads:[~2017-10-10 10:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 5:54 [PATCH v2] perf/core: Fix updating cgroup time with descendants Lin Xiulei
2017-09-29 9:25 ` Peter Zijlstra
2017-10-10 10:53 ` tip-bot for leilei.lin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-e6a5203399d19871021c1fa0eb2a08fc63b67e91@git.kernel.org \
--to=tipbot@zytor.com \
--cc=eranian@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=leilei.lin@alibaba-inc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox