Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4261144pxy; Tue, 27 Apr 2021 00:11:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy846xS2hGoLbWZYxg71CE2UjZVVQU45v0tT0qTF5QF9iAeQKX5VzW0pWTCqLscMBX+3dlZ X-Received: by 2002:a63:7c42:: with SMTP id l2mr20239913pgn.98.1619507476269; Tue, 27 Apr 2021 00:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619507476; cv=none; d=google.com; s=arc-20160816; b=0/D8jzz/PPsCM73w4mF8tgW6iPP8UnH6J6LK4G/jat94uVHF5aubvV+jpKgGmuIENq bdHWUCIh4aa7v+6hu4yaIgxwGRBVImRUmGyS8iJLlGv5LMmjAp3WpDcHM5iRBSnLez/o Tfm5RWt/OyDSF9rZWUlSfqWNe9oBoM1P+ikMAWsafp3ui1EwP2FhWun+KKlwU0t2LiRw rYFruNQ7mnoaPtuiJjm9+pg/E2GrSE3JyxeAFPF9lEGj8xg6QdqtiVbn6Ji5r1MB9gWf CxfEfjFpQTh8Yo9+wRtFUFMJnj1vIDnWwXSJLCdu8N8gUEamwFYW6HbuYWetJobjXQZc /uhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=wpc/mBuS+58PyAmOv9kCzsRuB8j7qrM2+7/Q0mTJQQk=; b=QWVyiMimHEjJXQKrfqdmE3ep5n7dJvWOKDM9Myq04prmDz6JO2HUOA7NQ3MDUhNItd qqh4HOeXS8QFM30L2cBgo9PaZjTBpZtOFo5HdzWYAY3hsVtc3/bNfVIwLbujVTI5yFeN OMG7D/acrKMKyhKI1d55LZC/6MF9XjKmJ5vgl1im36sgVeHp7qc3kZ1JZA1hLR9Mvtw8 prGNGoC2M/Mf7Xr5krdtUTXABYhajERv8f6AsiiopXLkIW/rRXahUttjBd3AZyXPr/T2 CaUSppFShRmKBw33FImBRNZxFGaZ5Tc2OatU6QH7bRJMK7GU7BIfFHrxXakjzHSgzPAc Bd0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ngoEmbTM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n14si21458306plp.207.2021.04.27.00.11.03; Tue, 27 Apr 2021 00:11:16 -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=pass header.i=@linaro.org header.s=google header.b=ngoEmbTM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234734AbhD0HJm (ORCPT + 99 others); Tue, 27 Apr 2021 03:09:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbhD0HJl (ORCPT ); Tue, 27 Apr 2021 03:09:41 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 444D8C061574 for ; Tue, 27 Apr 2021 00:08:58 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id h36so37973610lfv.7 for ; Tue, 27 Apr 2021 00:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wpc/mBuS+58PyAmOv9kCzsRuB8j7qrM2+7/Q0mTJQQk=; b=ngoEmbTManf3zVhTwMI8I6Gkla36OxA/odDw5fyjWoP0JgIiSo5ojV/J6R7tnKFZTI 8DQaWeLJCg9kfxNF8n4aBZorix8SilKPIEQ4NE62X96dg0Htm70INl03sAKWikjPS7gc tk2Nqp6Pqb8m5HGGM8+k013flJxXT7Gj85QT8o0+9dQXVCJffDO3aK0j3B532DMrcDUp yLRqI4Yd34f1PfV+UXtwQchteFLFUHZG8y4ReHzAfUqK0VQaUUkqbfTaXZVXxuSb889f E2bSgvaHlPBIi/T4t8rbREZ58K8WpRYDwPTRZvOmv03Qn/L9KbZ83Y6C3WELF1K3vHDZ DAdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wpc/mBuS+58PyAmOv9kCzsRuB8j7qrM2+7/Q0mTJQQk=; b=PX8an0IqVd+qbx1TWmqj7rRVYSjLhJWsf0KUAr7vTBbmQD2Idn4qfqNUz95FHBthCs ZVuox5W79BxGRXLELCgY25aiVE8ewMJNLKwg8Oii9YlvupIs+ehd5L3+ZMZbf2gsQHwN eHkR/24ftAz91I/OqFazDUbAPMIeSoVOKVjR8IjLXOx71vf8fxZylsaCA1U+svAfCGDI AwZc6LfzxJqhEsuE9w0BISu3nYRLLBzeesXgbpbTLoMjWtBIPw/oESe0Y6b8zEW+NqgJ Oopo+NYqQjgB9GN/I88PF9snaqbALAmrStq1AQf3fzdzMUcIOFu1uQQz3NskADxe1rgo Fftw== X-Gm-Message-State: AOAM530sn1LV7zvM53VrUmEIMQq+K5ZC5zEGB0fuSjMW9lGs8NlbpPTL oGwjYB7bQtwpzSdbb0sPp5V88+zHm8GEn2aArTz4WadWXDk= X-Received: by 2002:ac2:560b:: with SMTP id v11mr15548986lfd.254.1619507335977; Tue, 27 Apr 2021 00:08:55 -0700 (PDT) MIME-Version: 1.0 References: <1619456652-19143-1-git-send-email-ego@linux.vnet.ibm.com> In-Reply-To: <1619456652-19143-1-git-send-email-ego@linux.vnet.ibm.com> From: Vincent Guittot Date: Tue, 27 Apr 2021 09:08:44 +0200 Message-ID: Subject: Re: [PATCH] sched/fair: Fix unsetting of "has_idle_cores" flag To: "Gautham R. Shenoy" Cc: Mel Gorman , "Peter Zijlstra (Intel)" , Ingo Molnar , Srikar Dronamraju , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Apr 2021 at 19:04, Gautham R. Shenoy wrote: > > From: "Gautham R. Shenoy" > > In commit 9fe1f127b913 ("sched/fair: Merge select_idle_core/cpu()"), in > select_idle_cpu(), we check if an idle core is present in the LLC of the > target CPU via the flag "has_idle_cores". We look for the idle core in > select_idle_cores(). If select_idle_cores() isn't able to find an idle > core/CPU, we need to unset the has_idle_cores flag in the LLC of the > target to prevent other CPUs from going down this route. > > However, the current code is unsetting it in the LLC of the current CPU > instead of the target CPU. This patch fixes this issue. > > Fixes: Commit 9fe1f127b913 ("sched/fair: Merge select_idle_core/cpu()") > Cc: Mel Gorman > Signed-off-by: Gautham R. Shenoy Reviewed-by: Vincent Guittot > --- > 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 794c2cb..5fb5020 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -6171,7 +6171,7 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t > } > > if (smt) > - set_idle_cores(this, false); > + set_idle_cores(target, false); > > if (sched_feat(SIS_PROP) && !smt) { > time = cpu_clock(this) - time; > -- > 1.9.4 >