Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4405009pxv; Tue, 27 Jul 2021 06:39:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNIL5Nrw9GNOuWDYO+0aIkjGfxaSTpxbztOke9LZSLn4VbbBTSFnZxY/ZQKsXQx9LDuueP X-Received: by 2002:a05:6402:220d:: with SMTP id cq13mr411812edb.318.1627393182463; Tue, 27 Jul 2021 06:39:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627393182; cv=none; d=google.com; s=arc-20160816; b=EjvA0fUdrozdNJOzOoVid0W7oNyWaiY/V6MFQAcDunQ1mA1CxWGRZNB1Wr45C3ibDj euSMlLYgTbXtZJnFiJgjekK+m1OHyemXNwHu+HrKxkf1BRviTGYpwJMwi4udjsAjQiuU SbHUtX7t9DEpZZDS3JDlPHGVJ6x0tYoC+DCovO005nyQmplHFepLJZ7TH3C/ISxw07gZ aUxdLUK3ndPKfKhJekZXyN2/KKSQeRK8hRvOo7r7PDyycTZPOp/gNCaqfdM1NLk6Y0T+ EHxvLVzQtOzMewKl97L/X9wgIw5NMSLCd+C6hDcfZ+OapoHJNxzVCAJgK+kBJLKyKBRL UCmA== 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=FfyHKXilEVpvQwZNUQeVcTBtETi4MM5qnXqsygqJ5GM=; b=Ue50WemOMsrdne7kLuKsmh352BpzVbKVKjH9sOS9sLt5sE4ymTrmxWcgK6GqYYRLbZ M4R5ozAtGuH8tR13hTfR/2Fw2VXxVfVuddYQKoP7rQ1ftmtS3TMOcvX4xChLilOHuYyH pCeJsEaxUwvJAbAaFdRQ/QDrIOkNxGWhuwYW5F+WjCrFVEy/lqC2kX05ereXV9MeBF56 hkTiuUVRRxwHcnXb1clcW1rUvO/BcFxyV/mmVkvZXbnTjDjtVm42uhP/9G8rpx0dW7g7 5zwNuJN3XpqmgvOtUmiFgQHjuEScxXP1JXQaZHnYz43+RtroNvBgH9e5iRs43E309qva djbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="clx/HWdt"; 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 a16si2523115edr.547.2021.07.27.06.39.19; Tue, 27 Jul 2021 06:39:42 -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="clx/HWdt"; 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 S236691AbhG0Nfk (ORCPT + 99 others); Tue, 27 Jul 2021 09:35:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232186AbhG0Nfj (ORCPT ); Tue, 27 Jul 2021 09:35:39 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16F92C061757; Tue, 27 Jul 2021 06:35:40 -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=FfyHKXilEVpvQwZNUQeVcTBtETi4MM5qnXqsygqJ5GM=; b=clx/HWdtuYepQP+w777uZzHziW hJ0u9tgrLOXfZAeH9tArRyAk8l2dGOF70RZ9q0ewZI13VNqKP+1AiS7SYWLkB3ckl7g2eS6GNzERU frWGN/FlQQhkAxnX/J11GQ1cTDFE8KZdZ4q9/f7Mw8Vp0GaVQ1Yrytu+DDRQxj0Y6u58E/vOSeJyy WZg/JqJEkd7GDsijv8jIlzp4luPxFiu9haUZu4Y6uY4zcEND2L2UEhnpS6d1XTS3ZV1HbyB9W/3HY dH4PdLqYtLaGi56pJA3mtqQUcz2RC/P5O61vGpO9NYfgpn9/Qfj/52z5xtp0e3BB1HkyxA00Yy2xl p1++rhAg==; 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 1m8N9X-00F2SB-AH; Tue, 27 Jul 2021 13:31:14 +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) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 2E40A300233; Tue, 27 Jul 2021 15:29:45 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E9F982C85C9EB; Tue, 27 Jul 2021 15:29:44 +0200 (CEST) Date: Tue, 27 Jul 2021 15:29:44 +0200 From: Peter Zijlstra To: Mel Gorman Cc: Christian Borntraeger , bristot@redhat.com, bsegall@google.com, dietmar.eggemann@arm.com, joshdon@google.com, juri.lelli@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux@rasmusvillemoes.dk, mgorman@suse.de, mingo@kernel.org, rostedt@goodmis.org, valentin.schneider@arm.com, vincent.guittot@linaro.org Subject: Re: [PATCH 1/1] sched/fair: improve yield_to vs fairness Message-ID: References: <20210707123402.13999-1-borntraeger@de.ibm.com> <20210707123402.13999-2-borntraeger@de.ibm.com> <20210723093523.GX3809@techsingularity.net> <20210723162137.GY3809@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210723162137.GY3809@techsingularity.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 23, 2021 at 05:21:37PM +0100, Mel Gorman wrote: > I'm still not a fan because vruntime gets distorted. From the docs > > Small detail: on "ideal" hardware, at any time all tasks would have the same > p->se.vruntime value --- i.e., tasks would execute simultaneously and no task > would ever get "out of balance" from the "ideal" share of CPU time > > If yield_to impacts this "ideal share" then it could have other > consequences. Note that we already violate this ideal both subtly and explicitly. For an example of the latter consider pretty much the entirety of place_entity() with GENTLE_FAIR_SLEEPERS being the most egregious example. That said; adding to vruntime will only penalize the task itself, while subtracting from vruntime will penalize everyone else. And in that sense addition to vruntime is a safe option. I've not fully considered the case at hand; just wanted to give some context.