Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2457217pxu; Mon, 7 Dec 2020 07:08:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRHk7Gc1+UejG3Z0tsyFxvocTpLMGg88oV2OtyCvSy2YvtVuhSHH5amc/g4ejtiYmfHgMD X-Received: by 2002:a17:906:128d:: with SMTP id k13mr19039491ejb.309.1607353736118; Mon, 07 Dec 2020 07:08:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607353736; cv=none; d=google.com; s=arc-20160816; b=09wLxm7cfKWzCMcYWHP3mk3YvwLa3GaNtdzw9fSEfHqfDFXlJ5iy0hrNitP36a/yeU 5vDxcA4RYiiI9RwKF76FOHAatRpgN6PuMblFd5L06KARi/vawE968XQlUO+FCWAZpaWx bmrh4FS/ozAZJ0XvKpX+oqjCHE8phCUivd0QJH4hamTTMfQN4En2oiYabpeRRB7ZDk+C yshpAYuQOMvhOnqQRXuU1Ly+BwVCdz+bqc+HGdNcW8IipUoMjyrTgbBcdKi79ELy2jYK 1W5n9UvEAq7iWtYjcttXGvj8VzXNoTn6Mtx+kgIEs4SP5KUjVdKNNoRTboWCfO1Rrabv 2BcA== 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=hH3HH1W/RdGqCEOBZUdis54iFut/lRLRcuUST7BctN4=; b=i0ob3g1Ey4MiYq/5MaV+h09EU/uQrFe0SjgctmQsP8/+SUBei6SqM+rq1YP8QNEUVY 7lVwAIED7XIDUhFjKec5ud7eTwMtNdHjhVGmYKTKt60FfXzX3sIis499uyZ1y7TMhrSu T45eVTLc7lorJah68DqZmbiQbP4Psyiy5OINCLpw+mq5GAhZpd09/vb/E1n+eQu0H0Hg G2zh2VgyOvddgMsLxdJdUTyZv37ju232yL4s6sLE+GIBz6wu9md5Pw3EYTGxId074ons 41HBpkmN6thvXCdkb8GmxHJVBGmZGEp4zwMGAi59hlIVVHfFjoMNR82jlqxb9ovFqBbI 8xvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nmqDfxGj; 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 s11si7845377edw.280.2020.12.07.07.08.31; Mon, 07 Dec 2020 07:08:56 -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; dkim=pass header.i=@linaro.org header.s=google header.b=nmqDfxGj; 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 S1726494AbgLGPFm (ORCPT + 99 others); Mon, 7 Dec 2020 10:05:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbgLGPFl (ORCPT ); Mon, 7 Dec 2020 10:05:41 -0500 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E8E0C061794 for ; Mon, 7 Dec 2020 07:04:55 -0800 (PST) Received: by mail-lj1-x241.google.com with SMTP id o24so15290001ljj.6 for ; Mon, 07 Dec 2020 07:04:55 -0800 (PST) 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=hH3HH1W/RdGqCEOBZUdis54iFut/lRLRcuUST7BctN4=; b=nmqDfxGjl4uCmTqkR6aOZDk0yp/hvoy0PCUbM16UMMElqTWeHunwHNKk9NHaVPHazV 51FsVp6diC8OT5WV7GpfcetvX+3g3icgH+AyeuxcPIxuA5oWp7QHVfoQdSpgV0+mjNPL 9fZG5u6i9U+a6i+C5UuZrGGwwPUx+7Hl2EqwZuTkK0z0jhLtsLcUKFED0GQGToe51bzl C5TDGBgRFrtS/DLiiPDLiNKE9VCbgYojGMmYwyLcwDjAVRuLBYBk64iwnBAkW4fYuoZ/ nS0k+4W57UJn14s92/+CNXiifU2e5+Df6Pyywin1pYmVpQjEmQGvTK5GSOKhBmKtB/MZ QFUA== 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=hH3HH1W/RdGqCEOBZUdis54iFut/lRLRcuUST7BctN4=; b=YkESZJGXxU2iDwL/xXeOVWNbAiUXePPgU7xBtoKB7e354zwVH0m56fmRQnjL8b0Lno 7LxABgRBEKaeTCECfF2RIk29ROwECMBYrBWHek7wi0DOnDUOiQ5DEZIXs2uKM4wCdL72 L6NWwHxwI229CaLWb9jZ4IYnNaSxcPKEsWS1AT85TzWspxqXHB/g4qS9FJNVx8r8naGz dndkKWhQuaWM0byqVzYoqQqgYl/9R4JosyzQlcLO9fOeH/DL9jIq/PCYG4EFyHWmqCeS r8pJJ1nAsVsv163pt2a1mGfFNdnm64MfFm3C7aY53HJWjAbh/wsrhKhDKBNLBi8Wi50o 5bCQ== X-Gm-Message-State: AOAM531TxXbcJxcKoCV2fo/beDk4lPzjYChGaqUqUwvkWuh483D3A3ls 8y+QYjRAEaSgVU/qt6dxsC9tEj7ug4DhW922MTh2iw== X-Received: by 2002:a2e:800e:: with SMTP id j14mr8744290ljg.226.1607353493834; Mon, 07 Dec 2020 07:04:53 -0800 (PST) MIME-Version: 1.0 References: <20201207091516.24683-1-mgorman@techsingularity.net> In-Reply-To: <20201207091516.24683-1-mgorman@techsingularity.net> From: Vincent Guittot Date: Mon, 7 Dec 2020 16:04:41 +0100 Message-ID: Subject: Re: [RFC PATCH 0/4] Reduce worst-case scanning of runqueues in select_idle_sibling To: Mel Gorman Cc: LKML , Aubrey Li , Barry Song , Ingo Molnar , Peter Ziljstra , Juri Lelli , Valentin Schneider , Linux-ARM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 7 Dec 2020 at 10:15, Mel Gorman wrote: > > This is a minimal series to reduce the amount of runqueue scanning in > select_idle_sibling in the worst case. > > Patch 1 removes SIS_AVG_CPU because it's unused. > > Patch 2 improves the hit rate of p->recent_used_cpu to reduce the amount > of scanning. It should be relatively uncontroversial > > Patch 3-4 scans the runqueues in a single pass for select_idle_core() > and select_idle_cpu() so runqueues are not scanned twice. It's > a tradeoff because it benefits deep scans but introduces overhead > for shallow scans. > > Even if patch 3-4 is rejected to allow more time for Aubrey's idle cpu mask patch 3 looks fine and doesn't collide with Aubrey's work. But I don't like patch 4 which manipulates different cpumask including load_balance_mask out of LB and I prefer to wait for v6 of Aubrey's patchset which should fix the problem of possibly scanning twice busy cpus in select_idle_core and select_idle_cpu > approach to stand on its own, patches 1-2 should be fine. The main decision > with patch 4 is whether select_idle_core() should do a full scan when searching > for an idle core, whether it should be throttled in some other fashion or > whether it should be just left alone. > > -- > 2.26.2 >