From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752421AbbJMJHF (ORCPT ); Tue, 13 Oct 2015 05:07:05 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:43356 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752301AbbJMJHA (ORCPT ); Tue, 13 Oct 2015 05:07:00 -0400 Date: Tue, 13 Oct 2015 11:06:54 +0200 From: Peter Zijlstra To: byungchul.park@lge.com Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, yuyang.du@intel.com, pjt@google.com, efault@gmx.de, tglx@linutronix.de Subject: Re: [PATCH 1/2] sched: make fair sched class can handle the cgroup change by other class Message-ID: <20151013090654.GR3604@twins.programming.kicks-ass.net> References: <1444036584-14079-1-git-send-email-byungchul.park@lge.com> <1444036584-14079-2-git-send-email-byungchul.park@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1444036584-14079-2-git-send-email-byungchul.park@lge.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 Mon, Oct 05, 2015 at 06:16:23PM +0900, byungchul.park@lge.com wrote: > From: Byungchul Park > > Original fair sched class can handle the cgroup change occured within its > class with task_move_group_fair(), but there is no way to know it if the > change happened outside. This patch makes the fair sched class can handle > the change of cgroup which happened even at other sched class. > > Additionally, it makes sched_move_task() more flexable so that any other > sched class can add task_move_group_xx() callback easily in future when > it is needed. I don't get the problem... when !fair, set_task_rq() will do what needs doing. The only reason we need task_move_group_fair() is the extra accounting required when we actually _are_ of the fair class, it needs to unaccount, move and reaccount. If we're not fair, the whole switched_from/to stuff should do that for us, no? So please explain the problem.