Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4454885pxb; Tue, 5 Oct 2021 03:32:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiabAI2kUwCV6zfHxh2llkALhYH4dPsLD9/qymbnMjv8AA1BqAnni4tXD7tRKzZ5VdxEks X-Received: by 2002:aa7:c2c7:: with SMTP id m7mr25144090edp.339.1633429975107; Tue, 05 Oct 2021 03:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633429975; cv=none; d=google.com; s=arc-20160816; b=qz5hUG2S1D+dPdo8P2HMX/p17apSqLLlRYjq/RZsC/F9wNebvch8A0IbRzOiVm0y8/ SEXbLN1iKhQA4zmVyiteztfehTsv+dN4CBn1czPoeS8UkuTXT6GEqM/GORITDHDuOOga wFbvEiiLjhEt5sX3UdbTYUkNwK2s1XP3JC3/H3TgHA3PQnbzAz/6JPRTeiDeWOxFVnOM aN4X5qcxoEnikehYQ9nNLbO0TIcWcG4RChWbyVzwVh/l3glO4G7a8PkmO5E43PUB2qrT CuZZ/vqcGf0+0sikLqUbDlMIGaueQdhaKSUZvp0KEqWuprxPvSasjms0odHnRkuxCL2q Vqdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8/E+Skj2P4cErpuwuqBhsyiELvo+Dy6BTQQ10rnG+ys=; b=rLIyLNAvfc86vvlAlkSMqgYe4ql3nm0tbUBK8ab3fhGqao8d87BgGwxSHCYBsMXL1/ DTkQVE+cG7XO7By5TnRIlDzDhDKMbPySpTGcB3jjGOnoQX7vX4O0egTYwtSbo+VMjrPl O76NiV6alkVeuY07I8PMnTHB1+dwS+lQuISLUoCXK9ZogOaJBKll5Otyg/H+lAcFd3FT o72a0cyiMs7Ipn49YzzmveqRTC8Qx9TnstOqBlHO9O6/uiT6GZDeAarqdY77RW1Y0BC2 1FmKdPRjudmYP8L+/A4jK9vUfjRhzwFlAa0QgfQ4+VgCXSnMvOPQsmgV5URWUgqN/f37 CqGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=TFxGeYih; 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 z16si35106586edd.384.2021.10.05.03.32.31; Tue, 05 Oct 2021 03:32:55 -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=@infradead.org header.s=casper.20170209 header.b=TFxGeYih; 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 S233683AbhJEKc5 (ORCPT + 99 others); Tue, 5 Oct 2021 06:32:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233514AbhJEKc4 (ORCPT ); Tue, 5 Oct 2021 06:32:56 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4992AC06161C for ; Tue, 5 Oct 2021 03:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8/E+Skj2P4cErpuwuqBhsyiELvo+Dy6BTQQ10rnG+ys=; b=TFxGeYihBUCt7zt4FMcX3F/Z5A MnUwfKY8wnkIgAXFMP2X+rUKAwqgYVIlU1pDfjf+PErjwBGcCkcy6OEx0lQjoL+MPiaI8Un18l36/ Y2SlaIZXpQSIi7BWgGc7KP/tLiPqLY8d19vpSHpIbgficAV2Ew2kNB7xgzEHhRRUeU2vSPaOQ0+fQ P3Tb6HrYPBHZMVW1jKmL6jfGUQ0eKuC/WCle1BtZwg2HQhrqZhCqIilwKSHjOmY+17oiQdGIrdSoV zcHjc41t9Ylw8uUNZf0ys8cGfJI7usp8FG1X/gHcZaVqsbHltv66eLF1mM5tsAVdNQxRWeNS9KCgf sxRox/gg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXhgT-000DzM-Im; Tue, 05 Oct 2021 10:28:44 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id D7C8F300233; Tue, 5 Oct 2021 12:28:27 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C0BCA2038E207; Tue, 5 Oct 2021 12:28:27 +0200 (CEST) Date: Tue, 5 Oct 2021 12:28:27 +0200 From: Peter Zijlstra To: Vincent Guittot Cc: Mel Gorman , Mike Galbraith , Ingo Molnar , Valentin Schneider , Aubrey Li , Barry Song , Srikar Dronamraju , LKML Subject: Re: [PATCH 2/2] sched/fair: Scale wakeup granularity relative to nr_running Message-ID: References: <20210920142614.4891-3-mgorman@techsingularity.net> <22e7133d674b82853a5ee64d3f5fc6b35a8e18d6.camel@gmx.de> <20210921103621.GM3959@techsingularity.net> <20210922132002.GX3959@techsingularity.net> <20210922150457.GA3959@techsingularity.net> <20210922173853.GB3959@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 22, 2021 at 08:22:43PM +0200, Vincent Guittot wrote: > @@ -7161,6 +7162,13 @@ static void check_preempt_wakeup(struct rq *rq, > struct task_struct *p, int wake_ > return; > > update_curr(cfs_rq_of(se)); > + delta_exec = se->sum_exec_runtime - se->prev_sum_exec_runtime; > + /* > + * Ensure that current got a chance to move forward > + */ > + if (delta_exec < sysctl_sched_min_granularity) > + return; > + I think we tried that at some point; IIRC the problem with this is that if the interactive task fails to preempt, that preemption is lost. IOW interactivity suffers. Basically if you don't want wake-up preemptions, use SCHED_BATCH, then those tasks will not preempt one another, but the SCHED_NORMAL tasks will preempt them.