Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2062520ybh; Fri, 24 Jul 2020 03:34:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwv8Kei995Fb6D/QxpS6txLjoWmlM0mgEQC7z23fBKy7IPRaOkHV8sWSxQVXAxdgnZfccO X-Received: by 2002:a17:906:2851:: with SMTP id s17mr8764330ejc.347.1595586880176; Fri, 24 Jul 2020 03:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595586880; cv=none; d=google.com; s=arc-20160816; b=zgeL108j4IJQ9bHaCAwPQeBKJnFOlimCL9l8OPhU4gz4OqyE6Bl7ASdvL3J+tTNKye 5bj62z89LErx0ldh8lPVus45zZyQjQNtRwgbNT7AysZA6OklftCOmsY7uGgF9y/D2ce1 R2TwqeIr0QKV8attrVeF56IpP0Dy6MAta9Z220SNI0xtREpFcMOizMmFC5f7U8eTxnh1 PSEA3z27cRuOjXLMKw2/QApCyWdfV/EEscqowU8iAblxsEKfSnIUrKkEjSM6XCYGWQ0j j73WesO2XszW/+2w4ar8JG5JDbKSanQtpTppvgTSNl9v9xV8Ivi6dZC5yMsqjDWDuJpu P9/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=l3V5co3yRSeLZkc3KLbMtdghIhpxZhFIvW5di9NxCXk=; b=Kn3GS+R0enmKROxR95t0q1i23mUCHXtlwVMikNcHvyJCxIzdAVN1FwcQC2Mzf9OBD+ 20j0EZegzQhfO/biTKIm2yY5NZlfmS+8nL4eS4An0V+gX11cZIh4Yz7KafzTGmIAZTWD RdnH0H5v7dt7H0qHloeKbrqmV+tkq5cjql8rTvB7/d0oqsbO5yqIaVrSrFBjLKRIxLT3 z/tpNHiIubyCgcsQ0WWWY5cAKEvb8pdGc/dpg7DkQ4LQQYlx+LnBrCkBuOjE1cCtLmAv EHTNP9mlKdhtHasKulLNFCxtkshS0KexzLq3A7RmU4L/N35Ic59larrWj2nXZK/rP8HS 08jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FyQtjhw6; 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 a14si265080eds.487.2020.07.24.03.34.17; Fri, 24 Jul 2020 03:34: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=pass header.i=@linaro.org header.s=google header.b=FyQtjhw6; 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 S1726857AbgGXKeF (ORCPT + 99 others); Fri, 24 Jul 2020 06:34:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbgGXKeE (ORCPT ); Fri, 24 Jul 2020 06:34:04 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4326C0619D3 for ; Fri, 24 Jul 2020 03:34:03 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id v15so391959lfg.6 for ; Fri, 24 Jul 2020 03:34:03 -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=l3V5co3yRSeLZkc3KLbMtdghIhpxZhFIvW5di9NxCXk=; b=FyQtjhw6j7uq4vJjlNJa8wKORpW8tvscTwf7wQrnK/S7/7BWWSj9v8xE2wIHDFyYSY 1iMjJS1eUg5ypXyKE0JYFvqgiViftAa8LcGTIELtc93jlmcPn1DJ+J7hRmIrT07i43rD RgV4NfTPKMNJ3H/WaE8cTtcv6Mhj1bAz2HpsrkX28rpsKhbACHwNbCi+GD6diVm94bjN diXNBXSbaPWiDHGP3Jooir/kQfJSJ3kIc7j4CHJ1wJ+txRAPztfHfl+BIumRoxEEbQd4 Zs3/IOmF4kkYt2PmO3gJjQ/7OYQ7GkkT1/9ApsxlBncZPT4TfTfQTtPMraSc+xHxqfyt XTfg== 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=l3V5co3yRSeLZkc3KLbMtdghIhpxZhFIvW5di9NxCXk=; b=XZSBcoqatu+l1lL59W0EHXnVmBvjmAmtxpRatCqC2SIn3E2JhKneiQ1703x3VQ7OGJ 3568rbWBHZldqDbLZWM3Baav1Kq6AIySKSTVXSKPOBrl2h1PIk7j3DHd9jRZPm/cglEY G2gHG6+4yBpCIHGD/aONBLM5gQn7zcuqI+qBWM32ulWT8VrqMi8Y7QPkFNaggdHLLk+R itSTmPYKmS4xBlPvZnkgwB71FQJZcHrcOT6+IZkQPyx86c4xWuEYLnvoem0p97gKUshp ZyiHSFrfBFrXi5pCqf41PVNxxOkUTNltqDXhd4iN6q/F1ozJWDmYCS4vlLCy1rUwu0B2 Ll+A== X-Gm-Message-State: AOAM533cWDuKwXlYSmg/0MAlURwaoaTc/AOR/4kk0InRj3O/+jzG7mjS lbIPTeTQT7krVnhFPwNXU7H4nplCIDV+N6o/uesYCg== X-Received: by 2002:a19:4844:: with SMTP id v65mr3470177lfa.184.1595586842297; Fri, 24 Jul 2020 03:34:02 -0700 (PDT) MIME-Version: 1.0 References: <20200723233853.48815-1-humjb_1983@163.com> In-Reply-To: From: Vincent Guittot Date: Fri, 24 Jul 2020 12:33:50 +0200 Message-ID: Subject: Re: [PATCH] sched/fair: consider sched-idle CPU when selecting idle core To: Jiang Biao Cc: Jiang Biao , Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel , Jiang Biao Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 24 Jul 2020 at 10:12, Jiang Biao wrote: > > On Fri, 24 Jul 2020 at 15:24, Vincent Guittot > wrote: > > > > On Fri, 24 Jul 2020 at 01:39, Jiang Biao wrote: > > > > > > From: Jiang Biao > > > > > > Sched-idle CPU has been considered in select_idle_cpu and > > > select_idle_smt, it also needs to be considered in select_idle_core to > > > be consistent and keep the same *idle* policy. > > > > In the case of select_idle_core, we are looking for a core that is > > fully idle but if one CPU of the core is running a sched_idle task, > > the core will not be idle and we might end up having the wakeup task > > on a CPU and a sched_idle task on another CPU of the core which is not > > what we want > Got it. sched_idle task may interfere its sibling, which brings me > another question, > If there's a core with smt1 running sched_idle task and smt2 idle, > selecting smt1 > rather than smt2 should be more helpful for wakee task, because wakee task > could suppress the sched_idle task without neighbour interfering. But the sched_idle will then probably quickly move on the idle smt2 > And there seems to be no consideration about that currently. > Is it worth improving that? This will complexify and extend the duration of the search loop and as mentioned above, it will most probably be a nop at the end because of sched_idle task moving on smt2 > > Thanks a lot. > > Regards, > Jiang