Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp294678pxu; Fri, 4 Dec 2020 03:34:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGRktnOtFYCik4+50wC5rOFAleKi09r3kGRksTaq+R8Br5Ck8jAkNcHPxWDhFdtgRVGw3n X-Received: by 2002:a17:906:85cd:: with SMTP id i13mr6683196ejy.553.1607081662156; Fri, 04 Dec 2020 03:34:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607081662; cv=none; d=google.com; s=arc-20160816; b=CEmC2L4XADu9Mo6YSrxpn7MZEo5TX8IjWRzlrPw1Ogfl66FPfOQ32FoErGDBbVxlGm sQb0q8BUTyH+urhWIEmYRsPCNZX9ILZEXoOP6WjM0Qe9pLfZ3XTpuT+HQoD0M4omygQM 75Y0P0gMi6HPeKxA85L0fK9VUaF4tCHPWumLoZNiKcH/0UoyeF2a3s3zLtlzNkFqGjWq WV/gfxGoRIaxu0JRiPdDBE2hoqQbHxCLxu7cmIADfF8Db1clUcDDC5eGQqpSlgTuUDVB S8Tomw2VMWZnQPYziVXePb75qY1l2ldJ2UjM98crWaZjupECVgnuDQXlTmRvYR7GqXXh wg+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=QlLRDHNaX3wbyest/5xubbcrP886TjcjeztlDV9ssVE=; b=LRNax8c5JWdD6xSQO07t0toC98ryg8RcU0078gMZDje3wdiDDbsTELd1qRq8S7Tg+8 iiq76QAZLx5ihpYcql/1ZWLplFISRMZro8hORD3H6ND3a/CItnCE9SQ7HdKNOSkPZ+wt 0pLNOslv94xqDQEJYQRjlHuDoLb1h9ZVjJLahgjhQmorl1Jy09DQmRQDoS8OTkqvz0hZ XsuHVKC1oBAwovqXYEMR6MEgr3Yrj3xpIrxtV4B77TkgxNFdk5J/0g6wc2ghdRT0YLtA NKMB5x1R8PDAFgHYoZQu3IhgDDa0b0JgU1Slt8REBLQtsGNBze7gPt6HbbsG4Zaolusn W0Vw== ARC-Authentication-Results: i=1; mx.google.com; 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 hj15si1170725ejb.734.2020.12.04.03.33.57; Fri, 04 Dec 2020 03:34:22 -0800 (PST) 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; 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 S1728701AbgLDLbZ (ORCPT + 99 others); Fri, 4 Dec 2020 06:31:25 -0500 Received: from outbound-smtp49.blacknight.com ([46.22.136.233]:36317 "EHLO outbound-smtp49.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbgLDLbY (ORCPT ); Fri, 4 Dec 2020 06:31:24 -0500 Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp49.blacknight.com (Postfix) with ESMTPS id 0596CFB9C2 for ; Fri, 4 Dec 2020 11:30:33 +0000 (GMT) Received: (qmail 20093 invoked from network); 4 Dec 2020 11:30:32 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 4 Dec 2020 11:30:32 -0000 Date: Fri, 4 Dec 2020 11:30:30 +0000 From: Mel Gorman To: Vincent Guittot Cc: LKML , Aubrey Li , Barry Song , Ingo Molnar , Peter Ziljstra , Juri Lelli , Valentin Schneider , Linux-ARM Subject: Re: [PATCH 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched Message-ID: <20201204113030.GZ3371@techsingularity.net> References: <20201203141124.7391-1-mgorman@techsingularity.net> <20201203141124.7391-7-mgorman@techsingularity.net> <20201203175204.GY3371@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 04, 2020 at 11:56:36AM +0100, Vincent Guittot wrote: > > The intent was that the sibling might still be an idle candidate. In > > the current draft of the series, I do not even clear this so that the > > SMT sibling is considered as an idle candidate. The reasoning is that if > > there are no idle cores then an SMT sibling of the target is as good an > > idle CPU to select as any. > > Isn't the purpose of select_idle_smt ? > Only in part. > select_idle_core() looks for an idle core and opportunistically saves > an idle CPU candidate to skip select_idle_cpu. In this case this is > useless loops for select_idle_core() because we are sure that the core > is not idle > If select_idle_core() finds an idle candidate other than the sibling, it'll use it if there is no idle core -- it picks a busy sibling based on a linear walk of the cpumask. Similarly, select_idle_cpu() is not guaranteed to scan the sibling first (ordering) or even reach the sibling (throttling). select_idle_smt() is a last-ditch effort. -- Mel Gorman SUSE Labs