Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2457098ybt; Tue, 16 Jun 2020 06:41:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnaqVvaFuzfBkTH7OCliRKqz35szSXIgr48yoMEw4gEljGUUYS20wimnkeMFnSCqmqwC6B X-Received: by 2002:aa7:c450:: with SMTP id n16mr2698595edr.6.1592314900847; Tue, 16 Jun 2020 06:41:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592314900; cv=none; d=google.com; s=arc-20160816; b=d1zo1yIkBFXSJa+JzCvkaNmBbCY9MHKP/g/SGZdJZr6heVZ1G6hODTmpDW7trpQzu0 7H5ekQpvimQusEiaZVXyANdGqLFoXoYS7kJjEU9H3aCcDwGGMZ3rRlHW1P4O3a9svEKo G8q/VuNkXA0GUm3rra7ZxmysZNqAiL81EZsVcWe7oDmO7xibDgus4zVs+pvv0dKzfZTC zTAAS+pgYAXItWIiPe1YlUUJtMiK5yqYByXRwvThauIkPAekfFu+5KJ+YprihKgFtrL2 fsNxeBURO1A9z8E6yv+Hb+DHEDIu2Hc9M+12z/HCHK78kU38X0gFUnX1of8Q7ij7B/Wx BEsw== 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=NX4/RAif7Qv0NRDyEqVkKAgLJrAgF0MHnstuThWnuPY=; b=migcOsFRXGbmRGXUThCSR9RAq0ULGisFyR3x+WvR4ctjTG+hFrmjssnHkYhg33xAq0 TldFD3Pg/ywCMo/ldGDQPWKhh9moZD0CthO7dabsUFasOq/JbmlrygDYwJ51QWW/igZS 6r0k+J3QNS/vKwxANiGywwaxZapdqfxWEWbi8U1wRVVP1Ko32a65xs2u56IHUPoFbabJ XiFPxwdBbWAc6Qt+KN7XmzXY+sD31lOwoCAv+LHUzqh5j2V/N6678UqVUH62Rx3zk96E Rj4U0Y7sMy4Jp+QXQjaNQy5JilWN3gfSZ/vd+OOrRo35AlaAoIe3p8UaXVNof4GyBZiv xiWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PaYdmCv5; 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 r18si7670087eja.41.2020.06.16.06.41.18; Tue, 16 Jun 2020 06:41:40 -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=bombadil.20170209 header.b=PaYdmCv5; 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 S1728861AbgFPNje (ORCPT + 99 others); Tue, 16 Jun 2020 09:39:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726261AbgFPNjc (ORCPT ); Tue, 16 Jun 2020 09:39:32 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30F4AC061573 for ; Tue, 16 Jun 2020 06:39:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=NX4/RAif7Qv0NRDyEqVkKAgLJrAgF0MHnstuThWnuPY=; b=PaYdmCv5e2DLub+pdwJuwWlhXs l5usGFGbtrNW3QP4yazJjyBd6Xmf/AEkTxw/f851ece9hv8JoW7/6WWM/LNR39uDv7gvW1Lth8GKi r11P/57AsXTc7aeGYH2AzdPK2jzvERd5CVoMimq3T0pRvC3Rkmy2rU9ldb2C8MSSYeQdEYslL5Iab QAxKcCeOj8gVUw5ykaumJRMe6iTbxwEah2nuSUVJxVn3uxtpXfB4eK3SiEPU4VUgt2MZtwRTjDknl /WXSVLXoAYsWm/9jjC3trjbV9PVXTQ5SIIDEN03fBVt9K+RR3LyY8QeHUfJyOGgK7nNZI5WdMar/V o0riZMHQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jlBnl-0000Zb-Vh; Tue, 16 Jun 2020 13:38:59 +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 E332D30018A; Tue, 16 Jun 2020 15:38:55 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9D74C20244311; Tue, 16 Jun 2020 15:38:55 +0200 (CEST) Date: Tue, 16 Jun 2020 15:38:55 +0200 From: Peter Zijlstra To: Vincent Guittot Cc: Peng Wang , Ingo Molnar , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel Subject: Re: [PATCH v2] sched/fair: Optimize dequeue_task_fair() Message-ID: <20200616133855.GX2531@hirez.programming.kicks-ass.net> References: <6f2f195aea48bc50187dfb064aa530ba132be01b.1592230286.git.rocking@linux.alibaba.com> <701eef9a40de93dcf5fe7063fd607bca5db38e05.1592287263.git.rocking@linux.alibaba.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 Tue, Jun 16, 2020 at 02:31:15PM +0200, Vincent Guittot wrote: > On Tue, 16 Jun 2020 at 08:05, Peng Wang wrote: > > > > While looking at enqueue_task_fair and dequeue_task_fair, it occurred > > to me that dequeue_task_fair can also be optimized as Vincent described > > in commit 7d148be69e3a ("sched/fair: Optimize enqueue_task_fair()"). > > > > When encountering throttled cfs_rq, dequeue_throttle label can ensure > > se not to be NULL, and rq->nr_running remains unchanged, so we can also > > skip the early balance check. > > > > Signed-off-by: Peng Wang > > Reviewed-by: Vincent Guittot Thanks!