From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C3ADC4361B for ; Tue, 8 Dec 2020 16:14:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B68F320780 for ; Tue, 8 Dec 2020 16:14:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B68F320780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bQ/UgOIMeE7OI97UgB1VQ7osfQnromMF3kLLadRjO8E=; b=OVQyvadrAd2IUNx9agEHlgNY+ TLx8uF5SygiYG2r4OnJbc+YidgNcisESuy8pIjyYHePFNjg1IAywgt9PCIG3A49kbWH2ymougkuVp iTjuijiXakpHyAS+frnSX42BMG9k8SZ5PBpEYgIsXp8oBasc4YXPWJzNFHvDNo5kTUGjit6p3Wb9y w2ieMiWuPZu6BsvUE8tNVfabol8NMQrtohd9Tr52S1JpHWUDya21pRVvHtEnZqsfGrdywoyNOCH9p g1JqT9rcDxL2dONy0qfjFixgm1QfQmYXjqFvd752Kjx/Orq7+rfgO8mVuM2XUflFRhJitx+0fLaVy KmPsDHPFQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmfcA-0005zm-2W; Tue, 08 Dec 2020 16:13:22 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmfc2-0005wV-Ve for linux-arm-kernel@lists.infradead.org; Tue, 08 Dec 2020 16:13:18 +0000 Received: by mail-lj1-x242.google.com with SMTP id f11so8127381ljm.8 for ; Tue, 08 Dec 2020 08:13:14 -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=nkQDFtS2p5U84JemgJMkV8dw3Gxwd4lRuZhCZshwQFc=; b=NzOub13HrLShnK7PITsRVdLQXYgUORIA5WOsJQysQ5QsGkr4kZUwCeCb+c0oI6bwNh ZNZIQzzYNdyqbXGBs2q1P78blDmtjwSrr6aMpwisIPqokcWhkKsncaVdUgSfmOavrwUC GwU5fE54m+lc+/z1lLhjILU6NZ3TbKuWmdFaemy84lpw5En3hTdBj+o3mMWTFEmJ3KNZ L1tTVGWuxm2X0naEo8RZCPbj19i3h+ihkTnmV6BIerFiulCwhzdVMaFp8VpoV+WcqJmX LirlV6Lhu2GbgOiiIWd5xP3Z9j4yD/TKodytE1GoeMYpvLiZ+2GXJnMxk9h/WDQMTdrA devw== 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=nkQDFtS2p5U84JemgJMkV8dw3Gxwd4lRuZhCZshwQFc=; b=fTxLo/JhSd9kD7H9YRMLFh/r4BVL2rkKXo5aj2TXxIZ4y6LEY8NbSWZBMiudv8Hdcs annm96HjEVpoi7lW6XkQQ7AvJLyg+yTMdUFnBl1vpQYKNjppo3mkNVqZLiXXiD5SEwVb iVmChLVt8PfyG2l3nzZDJ1YH3ioHouorkUtUF1He5nOkupOLTdrASZtQG+QCSuH5Cy2T vR1VKjKX170oee+LLzL6MoD7/kae+ibzCfUVjiAvakdMKmRv5EsrjhEP113fw8slgWDe iS4EubwUdGZNq09gEQLuh0pNEdbx64a2Xp/+9cClZZ32ja1mBNxm8M1c06t/D9iU3m59 Ivqg== X-Gm-Message-State: AOAM532ymDRvRK8T9Z39ZT26IDaIMIi8D6NCBVPiQGoi8b/7YmjaTPC3 /I3KVwHgpDXAOtySxPj1+E7IzlpQJgGxdWqAwjffZQ== X-Google-Smtp-Source: ABdhPJzVTRX3YV/6OK5Va85svb/40NTJVWAhtA9+BxwWz3EaCZkJsKf6cO+hcrX9ReyFhR8WiNpBmANuqdMgaWdVy1A= X-Received: by 2002:a2e:88d1:: with SMTP id a17mr6198753ljk.299.1607443993318; Tue, 08 Dec 2020 08:13:13 -0800 (PST) MIME-Version: 1.0 References: <20201208153501.1467-1-mgorman@techsingularity.net> <20201208153501.1467-2-mgorman@techsingularity.net> In-Reply-To: <20201208153501.1467-2-mgorman@techsingularity.net> From: Vincent Guittot Date: Tue, 8 Dec 2020 17:13:01 +0100 Message-ID: Subject: Re: [PATCH 1/4] sched/fair: Remove SIS_AVG_CPU To: Mel Gorman X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201208_111315_248512_6F1EA77C X-CRM114-Status: GOOD ( 23.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Barry Song , Peter Ziljstra , Aubrey Li , LKML , Ingo Molnar , Valentin Schneider , Linux-ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 8 Dec 2020 at 16:35, Mel Gorman wrote: > > SIS_AVG_CPU was introduced as a means of avoiding a search when the > average search cost indicated that the search would likely fail. It > was a blunt instrument and disabled by 4c77b18cf8b7 ("sched/fair: Make > select_idle_cpu() more aggressive") and later replaced with a proportional > search depth by 1ad3aaf3fcd2 ("sched/core: Implement new approach to > scale select_idle_cpu()"). > > While there are corner cases where SIS_AVG_CPU is better, it has now been > disabled for almost three years. As the intent of SIS_PROP is to reduce > the time complexity of select_idle_cpu(), lets drop SIS_AVG_CPU and focus > on SIS_PROP as a throttling mechanism. > > Signed-off-by: Mel Gorman Reviewed-by: Vincent Guittot > --- > kernel/sched/fair.c | 20 +++++++++----------- > kernel/sched/features.h | 1 - > 2 files changed, 9 insertions(+), 12 deletions(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 98075f9ea9a8..ac7b34e7372b 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -6145,7 +6145,6 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t > { > struct cpumask *cpus = this_cpu_cpumask_var_ptr(select_idle_mask); > struct sched_domain *this_sd; > - u64 avg_cost, avg_idle; > u64 time; > int this = smp_processor_id(); > int cpu, nr = INT_MAX; > @@ -6154,18 +6153,17 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t > if (!this_sd) > return -1; > > - /* > - * Due to large variance we need a large fuzz factor; hackbench in > - * particularly is sensitive here. > - */ > - avg_idle = this_rq()->avg_idle / 512; > - avg_cost = this_sd->avg_scan_cost + 1; > + if (sched_feat(SIS_PROP)) { > + u64 avg_cost, avg_idle, span_avg; > > - if (sched_feat(SIS_AVG_CPU) && avg_idle < avg_cost) > - return -1; > + /* > + * Due to large variance we need a large fuzz factor; > + * hackbench in particularly is sensitive here. > + */ > + avg_idle = this_rq()->avg_idle / 512; > + avg_cost = this_sd->avg_scan_cost + 1; > > - if (sched_feat(SIS_PROP)) { > - u64 span_avg = sd->span_weight * avg_idle; > + span_avg = sd->span_weight * avg_idle; > if (span_avg > 4*avg_cost) > nr = div_u64(span_avg, avg_cost); > else > diff --git a/kernel/sched/features.h b/kernel/sched/features.h > index 68d369cba9e4..e875eabb6600 100644 > --- a/kernel/sched/features.h > +++ b/kernel/sched/features.h > @@ -54,7 +54,6 @@ SCHED_FEAT(TTWU_QUEUE, true) > /* > * When doing wakeups, attempt to limit superfluous scans of the LLC domain. > */ > -SCHED_FEAT(SIS_AVG_CPU, false) > SCHED_FEAT(SIS_PROP, true) > > /* > -- > 2.26.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel