Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1799964pxu; Tue, 24 Nov 2020 09:11:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCUIQM8n/wI8atwyTKjbi12uvABsr4LX90m/h5Ge2bbsoq2fWJ0t6n0JclBJk8ZcRbRybn X-Received: by 2002:a17:906:1e0c:: with SMTP id g12mr4808493ejj.115.1606237883541; Tue, 24 Nov 2020 09:11:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606237883; cv=none; d=google.com; s=arc-20160816; b=yz6b2XL42swILl7x8T6mjByASGfTXyE83ji+lKk2ApH6fsvGec5OGKP16VtRxqZpPz Ve1/a9nA1uFS8KgwC6RpWtFIaBq4eILGizr0KX2dl6RcJ+lqgp1CjrAS833HodBDC3KH Fa7hRisNUMZ0dcUbaczIaA09lMfc2HDLTsTtn4/19jCtEn/CvdmvBU3I/ae+iIqlZnnC m9ybtwe/U9uEe/WROoUxctGcUQP4maQiIdQImQiwgyeb/Hl79D2BKA/mD3Sl9dD39i6h mZb0xVotAYbUaEaYN1cBl2v4WR8kITn16NPnlDb0NyG9oLjsmyY8uo32TGx5dCqDYsQ8 C77w== 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=aNXvn4/3k/XGywoP6C9b+pZ0yxAKPIO0oxQPosS4HbM=; b=ev40X8VFBy3UpIbgUKrtEBunaKl6rYmenBZGWkC5YNgxCkMOSp1DEx82hRqV5Whc4D UOBARKd8cYUKBTIIWTd/guEE88GHeP8d94mxhmVvbGMNVhYGGOcemMYUySBHQFh3ey7n SNS3g1IM2AKZ10iQsCzIoWZkBVE3sqirJ3ZdS7d2u6mTCe3zja97EG0o2K+UkuG72ieD u0Uwk7lceNI2QbaISHFobJhbEq5UgCjLDQHCbTm7pD2gpDp/k6KUpbKVG+C2QY5cDdpm 1h9f58ex45ZKIRM5JnN65IIoNLnlBcINCr0qqDsqmXnzjLTdLwXGBFiaR5GVh+CwWPYy 6KQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=iA9+PAPT; 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 f5si8810864ejr.411.2020.11.24.09.10.37; Tue, 24 Nov 2020 09:11:23 -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=@joelfernandes.org header.s=google header.b=iA9+PAPT; 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 S2389971AbgKXRHq (ORCPT + 99 others); Tue, 24 Nov 2020 12:07:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729093AbgKXRHq (ORCPT ); Tue, 24 Nov 2020 12:07:46 -0500 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F4A6C0613D6 for ; Tue, 24 Nov 2020 09:07:46 -0800 (PST) Received: by mail-qk1-x734.google.com with SMTP id y197so21288856qkb.7 for ; Tue, 24 Nov 2020 09:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=aNXvn4/3k/XGywoP6C9b+pZ0yxAKPIO0oxQPosS4HbM=; b=iA9+PAPTrP4eD0qcD8/sTZZ34g/wH3oACYjBdIASYZcCxL49ZUOofi0apyQp7Z0qfY G2OjvCROWNo0t0oFvMyA0licDrxsoTLCk5mgrVipL3MtWghrB+s8QDfwuS1s4WudA8KZ vT7P7ZnMB2jy/vAlGlvggc3aYgkfSWsquagCs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=aNXvn4/3k/XGywoP6C9b+pZ0yxAKPIO0oxQPosS4HbM=; b=Fg9w+HUoUWgXPDMBvoas+TBntedM7MGmrr7hB6nak4Tqz6gYU1qeMTgM69uPIFFf9Z espQzN0tf1lE69aHlp4kRDDVsOY+KVo8gHmqgn6vg0JPu27O5ULdw7uth1MhmvkZn/gb SX7821vHLV1e4kG5i9Abbdj4v3WBvuAy4IQq5TKnn0AR+/YdIfm/My6gj00EmhSkmkih WBnudcDw/IT4xAAC7EklBvh2SyyOqtyb+iHwKmelEeA+9ciXAX93ymw3yeu52Ewicj3h OVyf2yRT2Oxtz0S5nQOU6ElhNeIJ+A0n5H6USGX3uilfchLIfogZPlocTjMoT19fn1EY CxXg== X-Gm-Message-State: AOAM530l0YuLOhzoI26yQ5TwoO3zIJtiJJaxN/hjdJSze61/b+zjFUJj /JOaOFT90XGUZdFzxWWGS4wV2w== X-Received: by 2002:ae9:c211:: with SMTP id j17mr5759635qkg.458.1606237665494; Tue, 24 Nov 2020 09:07:45 -0800 (PST) Received: from localhost ([2620:15c:6:411:cad3:ffff:feb3:bd59]) by smtp.gmail.com with ESMTPSA id t56sm12686345qth.27.2020.11.24.09.07.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 09:07:44 -0800 (PST) Date: Tue, 24 Nov 2020 12:07:44 -0500 From: Joel Fernandes To: Peter Zijlstra Cc: Nishanth Aravamudan , Julien Desfossez , Tim Chen , Vineeth Pillai , Aaron Lu , Aubrey Li , tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, torvalds@linux-foundation.org, fweisbec@gmail.com, keescook@chromium.org, kerrnel@google.com, Phil Auld , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini , vineeth@bitbyteword.org, Chen Yu , Christian Brauner , Agata Gruza , Antonio Gomez Iglesias , graf@amazon.com, konrad.wilk@oracle.com, dfaggioli@suse.com, pjt@google.com, rostedt@goodmis.org, derkling@google.com, benbjiang@tencent.com, Alexandre Chartre , James.Bottomley@hansenpartnership.com, OWeisse@umich.edu, Dhaval Giani , Junaid Shahid , jsbarnes@google.com, chris.hyser@oracle.com, Ben Segall , Josh Don , Hao Luo , Tom Lendacky , Aubrey Li , "Paul E. McKenney" , Tim Chen Subject: Re: [PATCH -tip 15/32] sched: Improve snapshotting of min_vruntime for CGroups Message-ID: <20201124170744.GD1021337@google.com> References: <20201117232003.3580179-1-joel@joelfernandes.org> <20201117232003.3580179-16-joel@joelfernandes.org> <20201124102741.GW3021@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201124102741.GW3021@hirez.programming.kicks-ass.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On Tue, Nov 24, 2020 at 11:27:41AM +0100, Peter Zijlstra wrote: > On Tue, Nov 17, 2020 at 06:19:45PM -0500, Joel Fernandes (Google) wrote: > > A previous patch improved cross-cpu vruntime comparison opertations in > > pick_next_task(). Improve it further for tasks in CGroups. > > > > In particular, for cross-CPU comparisons, we were previously going to > > the root-level se(s) for both the task being compared. That was strange. > > This patch instead finds the se(s) for both tasks that have the same > > parent (which may be different from root). > > > > A note about the min_vruntime snapshot and force idling: > > Abbreviations: fi: force-idled now? ; fib: force-idled before? > > During selection: > > When we're not fi, we need to update snapshot. > > when we're fi and we were not fi, we must update snapshot. > > When we're fi and we were already fi, we must not update snapshot. > > > > Which gives: > > fib fi update? > > 0 0 1 > > 0 1 1 > > 1 0 1 > > 1 1 0 > > So the min_vruntime snapshot needs to be updated when: !(fib && fi). > > > > Also, the cfs_prio_less() function needs to be aware of whether the core > > is in force idle or not, since it will be use this information to know > > whether to advance a cfs_rq's min_vruntime_fi in the hierarchy. So pass > > this information along via pick_task() -> prio_less(). > > Hurmph.. so I'm tempted to smash a bunch of patches together. > > 2 <- 3 (already done - bisection crashes are daft) > 6 <- 11 > 7 <- {10, 12} > 9 <- 15 > > I'm thinking that would result in an easier to read series, or do we > want to preserve this history? > > (fwiw, I pulled 15 before 13,14, as I think that makes more sense > anyway). Either way would be Ok with me, I would suggest retaining the history though so that the details in the changelog are preserved of the issues we faced, and in the future we can refer back to them. thanks, - Joel