Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5820602ybv; Tue, 18 Feb 2020 04:40:12 -0800 (PST) X-Google-Smtp-Source: APXvYqykju3FaGClpGbN6eAbsvHX1/E5EF80NwI2zU4I2EmkwEEUu1DqnnzmogHtu5Y6gKkxaYem X-Received: by 2002:aca:f584:: with SMTP id t126mr1134007oih.132.1582029612162; Tue, 18 Feb 2020 04:40:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582029612; cv=none; d=google.com; s=arc-20160816; b=PETCekMKPegwiy5pCUabWqvI6s7/QQK4ECUr6MZZ/0cFgz3uIK5ZpmF+h8g8AjIfL0 Nuk/LFprij1qfOEQwkRyEu0mXT5m1Qv0ZfIl4o5/W56O3oEPE2YoMM1ka/FCWVkr2j8h m11Mv5iBP0Esb9+6jnU4i3SVEHH/tSmucsCGumc9MAQtdJxWn7YkqogcZinpsYmHSJVS 4KaB8QpERXKIlk27cpXGEfJ8LrRiDjnHKjg12HnGRYqa3XTZCXqm3/4fnBtBYnEOQ6h2 PuNHyVwGoM5JNttXp+VNV+DObt001qyhRU3bCGImR8gc9QBemHB88pIv5Q1sVC2ZdqR3 E1JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=1tnrbQ4G2lirVaFqP3urgP9A2CzwMGlpSDnyvuG3nBk=; b=ex5xqJOQF4kwzK+YhiFodtfCyDgv6V1EBLLOykfj9szvj7qShRuAROE/CTiQRCqkAn qkbrgEKAwq6B9A02armPx+2KI29FW3yfQmYc3qG/EorJ5Gz/+CHY/aOEISnExOtcjZaX MiWGc34kmjHMmgVZWFAa/672AflZUiJy9Kmhy41iobv3lcvUJLrN8v9+ad0zMzCsanRh ybsYPbgPMwdker7RWmIQk3JeSJSlu+x36jVF01GN0HSnGFOkXxmjypFcEKAUl3kZR+eE 6LntBKoPsUDavnIwcoUP7+kxo/kMditFvFYEz8JPz7pgNaiG0I9LNARX3br5hoB1G9xD 0pdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n20si7332793oig.53.2020.02.18.04.39.59; Tue, 18 Feb 2020 04:40:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726612AbgBRMiX (ORCPT + 99 others); Tue, 18 Feb 2020 07:38:23 -0500 Received: from foss.arm.com ([217.140.110.172]:51344 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726363AbgBRMiX (ORCPT ); Tue, 18 Feb 2020 07:38:23 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CE056328; Tue, 18 Feb 2020 04:38:22 -0800 (PST) Received: from [192.168.0.7] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 08B1B3F6CF; Tue, 18 Feb 2020 04:38:20 -0800 (PST) Subject: Re: [PATCH v2 1/5] sched/fair: Reorder enqueue/dequeue_task_fair path To: Vincent Guittot , mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, linux-kernel@vger.kernel.org Cc: pauld@redhat.com, parth@linux.ibm.com, valentin.schneider@arm.com, hdanton@sina.com References: <20200214152729.6059-1-vincent.guittot@linaro.org> <20200214152729.6059-2-vincent.guittot@linaro.org> From: Dietmar Eggemann Message-ID: Date: Tue, 18 Feb 2020 13:37:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200214152729.6059-2-vincent.guittot@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/02/2020 16:27, Vincent Guittot wrote: > The walk through the cgroup hierarchy during the enqueue/dequeue of a task > is split in 2 distinct parts for throttled cfs_rq without any added value > but making code less readable. > > Change the code ordering such that everything related to a cfs_rq > (throttled or not) will be done in the same loop. > > In addition, the same steps ordering is used when updating a cfs_rq: > - update_load_avg > - update_cfs_group > - update *h_nr_running Is this code change really necessary? You pay with two extra goto's. We still have the two for_each_sched_entity(se)'s because of 'if (se->on_rq); break;'. [...]