From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751378AbbFYHs2 (ORCPT ); Thu, 25 Jun 2015 03:48:28 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:34657 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751197AbbFYHsZ (ORCPT ); Thu, 25 Jun 2015 03:48:25 -0400 Date: Thu, 25 Jun 2015 09:48:17 +0200 From: Peter Zijlstra To: Cong Wang Cc: linux-kernel@vger.kernel.org, Steven Rostedt , Ingo Molnar , Cong Wang Subject: Re: [PATCH] sched: split sched_switch trace event into two Message-ID: <20150625074817.GV3644@twins.programming.kicks-ass.net> References: <1435187973-23931-1-git-send-email-xiyou.wangcong@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435187973-23931-1-git-send-email-xiyou.wangcong@gmail.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2015 at 04:19:33PM -0700, Cong Wang wrote: > Currently we only have one sched_switch trace event > for task switching, which is generated very early during > task switch. When we try to monitor per-container events, > this is not what we expect. Adjust your expectations? > For example, we have a process A which is in the cgroup > we monitor, and process B which isn't, when kernel switches > from B to A, the sched_switch event is not recorded for this > cgroup since it belongs to B (current process is still B > util we finish the switch), but we require this event to > signal that process A in this cgroup gets scheduled. This is > crucial for calculating schedule latency. I don't get it. This is global data in the root pid-space. The switch data includes both the previous and the next task. Just look up their corresponding cgroups and be done with it. If you cannot get what you want from it, you're doing it wrong.