Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753583AbbFCIeM (ORCPT ); Wed, 3 Jun 2015 04:34:12 -0400 Received: from mx7.zte.com.cn ([202.103.147.169]:45563 "EHLO zte.com.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752938AbbFCIeG (ORCPT ); Wed, 3 Jun 2015 04:34:06 -0400 In-Reply-To: <20150601140839.630055365@infradead.org> References: <20150601135818.506080835@infradead.org> <20150601140839.630055365@infradead.org> To: Peter Zijlstra Cc: juri.lelli@gmail.com, ktkhai@parallels.com, linux-kernel@vger.kernel.org, mingo@elte.hu, oleg@redhat.com, pang.xunlei@linaro.org, "Peter Zijlstra" , rostedt@goodmis.org, umgwanakikbuti@gmail.com Subject: Re: [RFC][PATCH 1/7] sched: Replace post_schedule with a balance callback list MIME-Version: 1.0 X-KeepSent: 16420525:D7DCA965-48257E59:002BFF6E; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5.3 September 15, 2011 Message-ID: From: pang.xunlei@zte.com.cn Date: Wed, 3 Jun 2015 16:24:05 +0800 X-MIMETrack: Serialize by Router on notes_smtp/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2015-06-03 16:23:39, Serialize complete at 2015-06-03 16:23:39 Content-Type: text/plain; charset="US-ASCII" X-MAIL: mse01.zte.com.cn t538JkmR021485 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1769 Lines: 40 Hi Peter, This may increase the overhead of schedule() a bit, as it will have more work to do. check_class_changed(): if (prev_class->switched_from) prev_class->switched_from(rq, p); /* Possble rq->lock 'hole'. */ p->sched_class->switched_to(rq, p); For above cases, why can't we just add a judgement in switched_to_fair() as follows: if (rq != task_rq(p)) return; switched_to_rt() and switched_to_dl() already did the similar judgement. Then the following operation is usually task_rq_unlock() or the like, seems no other harm with the old rq of p. -Xunlei Peter Zijlstra wrote 2015-06-01 PM 09:58:19: > [RFC][PATCH 1/7] sched: Replace post_schedule with a balance callback list > > Generalize the post_schedule() stuff into a balance callback list. > This allows us to more easily use it outside of schedule() and cross > sched_class. > > Signed-off-by: Peter Zijlstra (Intel) -------------------------------------------------------- ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/