From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751850AbcF0Iru (ORCPT ); Mon, 27 Jun 2016 04:47:50 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:47455 "EHLO mx0a-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751248AbcF0Irt (ORCPT ); Mon, 27 Jun 2016 04:47:49 -0400 Date: Mon, 27 Jun 2016 16:43:21 +0800 From: Jisheng Zhang To: Peter Zijlstra CC: , , Subject: Re: [PATCH] sched/fair: avoid !CONFIG_SMP cpufreq update callbacks when go idle Message-ID: <20160627164321.34b9e933@xhacker> In-Reply-To: <20160627083721.GY30154@twins.programming.kicks-ass.net> References: <1467014163-1517-1-git-send-email-jszhang@marvell.com> <20160627083721.GY30154@twins.programming.kicks-ass.net> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-06-27_05:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606270100 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Peter, On Mon, 27 Jun 2016 10:37:21 +0200 Peter Zijlstra wrote: > On Mon, Jun 27, 2016 at 03:56:03PM +0800, Jisheng Zhang wrote: > > This is to avoid cpufreq update callbacks when we go idle on UP > > platforms. > > How so? the patch only avoids calling the update for (!root) cgroups -- > which makes sense, but I'm not seeing how that's related to going idle, > or UP at all. oops, I may mis-understand below comment at cfs_rq_util_change() * It will not get called when we go idle, because the idle * thread is a different class (!fair), I mis-read the comment as: it's the "&rq->cfs == cfs_rq" check to prevent the calling when go idle. So the patch still make sense, but I need to update the commit msg? Thanks, Jisheng > > > > > Signed-off-by: Jisheng Zhang > > --- > > kernel/sched/fair.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index bdcbeea..236ec5b 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -3121,7 +3121,8 @@ static inline void update_load_avg(struct sched_entity *se, int not_used) > > struct cfs_rq *cfs_rq = cfs_rq_of(se); > > struct rq *rq = rq_of(cfs_rq); > > > > - cpufreq_trigger_update(rq_clock(rq)); > > + if (&rq->cfs == cfs_rq) > > + cpufreq_trigger_update(rq_clock(rq)); > > } > > > > static inline void > > -- > > 2.8.1 > >