Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1218156pxa; Thu, 20 Aug 2020 06:00:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyExZp+PHUDvb1syReVXdQu+R+n2/fMkHqQclzWhmN4IBzuP3JNXvmwdriPCL7nyIIoOIDV X-Received: by 2002:aa7:d48f:: with SMTP id b15mr2085972edr.21.1597928426261; Thu, 20 Aug 2020 06:00:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597928426; cv=none; d=google.com; s=arc-20160816; b=vmEs7GH7lH+rcSfyilO1j0pFPdBdmQdIQ6pKiHY0DEbeJI/aFFPIELlSw1BZ+CfE2/ V8+k5bxpi8U9xBr2wIUlmcdGJ4fcWMWZHyRY0/X7ZVdkcqLSDyiPGYqROz1FZUkGxtw0 zol4aEdrwMy0a2dyqFOrq6vhwLPUxrB6s/62cHWlsf/4c5OWpwxvEElf5DoZQERBmsml /l73x7GWyH6Ws+1p8CK7rYEe0mC9WtAgQd6lPONcKag0q6yyHAEVtAJiLf4eMBY9Ynaf 73l2liAFw/0yyzv6SYUA/VEYUUPH0jHoMPyidNbgC01X8rE+7tCd/AbPahJsUjPFCIpy TCPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=lQg8TlP6dR9sIvxfDK+IReywdAXhOR7V/bB3+sWI/Kw=; b=wdK7QkT8LMcmrX63EVjUMlClIgn4oeQsd3zSEcC3hr+SJahfgsxUus8jWamZ3jdK+A uco8MJc6J2mXypHyLxrg6b0HO1VPUZx/ZuKS66/mdv9JwQptUg8nf2rWQ5U8HaSlfz63 DZszzoTRgRA4fOD+hTA5RgdLoCIsBh/KFJ5XRV3CjOIaIEGmty5fmNEsXR5XVbYE/VMS BweFY8SWUkyB0V92vqqxi+GB7T4U83A73CWrzorW9A3jg/aSBLucQw6cMXxKxDPVy9fo +2pbs0hkqW6K/Uz0SIDhAM/kVDTmBKnOmyUaF7nM3KuqHAbByXWRSc5QcGsNhgo+1Jdo 86uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=WLLCZFZM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gs14si1096023ejb.615.2020.08.20.06.00.02; Thu, 20 Aug 2020 06:00:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=WLLCZFZM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729562AbgHTM7b (ORCPT + 99 others); Thu, 20 Aug 2020 08:59:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728974AbgHTM7J (ORCPT ); Thu, 20 Aug 2020 08:59:09 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B318C061386 for ; Thu, 20 Aug 2020 05:58:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=lQg8TlP6dR9sIvxfDK+IReywdAXhOR7V/bB3+sWI/Kw=; b=WLLCZFZMcyvYc2/o+1q1KH6fP5 JnSLaImmX1fpKkjBWrLVnzTFpuzdbCzdCGaiLp6qmRzjwXEzKqwDjFP98dsyjmfWugCxRH8Z5C/TV RMlTeceJ+nTws1ofbq2fAapEyyv0jsR61TjDqTUtOqPRKISE4XBerdlif2gkvsG4U7lDJbq4ylWuu DhBBy6t7TZWJDXJia12/lrBoyitTOsaBBEdI+0Fbrmiyxt3oT0yC1Nggi4ppDOcv/buzuSbwlJWKf HTeEkAxkcksD8W6dzUTQxb65O7pZRMeDYcgDKykrfD3SGltOqXjFE5yWIL9DfHPMPswBmuYs8IKZh dT5i7/UA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8k9G-0000BD-Cs; Thu, 20 Aug 2020 12:58:31 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 58629305B23; Thu, 20 Aug 2020 14:58:29 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1CD592BC7FC9E; Thu, 20 Aug 2020 14:58:29 +0200 (CEST) Date: Thu, 20 Aug 2020 14:58:29 +0200 From: peterz@infradead.org To: Vincent Guittot Cc: Jiang Biao , Ingo Molnar , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel , Jiang Biao Subject: Re: [PATCH] sched/fair: avoid vruntime compensation for SCHED_IDLE task Message-ID: <20200820125829.GT2674@hirez.programming.kicks-ass.net> References: <20200820120025.74460-1-benbjiang@tencent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 20, 2020 at 02:51:06PM +0200, Vincent Guittot wrote: > On Thu, 20 Aug 2020 at 14:00, Jiang Biao wrote: > > > > From: Jiang Biao > > > > Vruntime compensation has been down in place_entity() to > > boot the waking procedure for fair tasks. There is no need to > > s/boot/boost/ ? > > > do that for SCHED_IDLE task actually. > > > > Not compensating vruntime for SCHED_IDLE task could make > > SCHED_IDLE task more harmless for normal tasks. This is rather week. It would be much better if there's some actual data to support this claim. > > Signed-off-by: Jiang Biao > > --- > > kernel/sched/fair.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index 1a68a0536add..adff77676a0a 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -4115,7 +4115,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) > > vruntime += sched_vslice(cfs_rq, se); > > > > /* sleeps up to a single latency don't count. */ > > - if (!initial) { > > + if (!initial && likely(!task_has_idle_policy(task_of(se)))) { > > What if se is not a task ? Then we very much need it, because it might have fair tasks inside. I suppose you could do something complicated with idle_h_nr_running, but is all that really worth the effort? > > unsigned long thresh = sysctl_sched_latency; > > > > /* > > -- > > 2.21.0 > >