Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1340184ybe; Fri, 6 Sep 2019 16:13:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/lUVzc0nz3wx0+CrGqIkf4QRYBWmGT14LwwdwC8i8mVUmZ1TJdTyNVuzDrUSAB8vqm+K0 X-Received: by 2002:a17:902:36e:: with SMTP id 101mr11197169pld.51.1567811594288; Fri, 06 Sep 2019 16:13:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567811594; cv=none; d=google.com; s=arc-20160816; b=iRfVqDrLrWeLKyJVmXCphyWfDsY8CgtChzgi2FeFcrT3CeD3C/tDOD9trjqt29+MyH KlCvt71oZPArq5Ej5Hb7BhBzZLVOwY2tndNLYL75slU8IgDBmv8Z0wNDwono3ZVhCz1h M/g8wgeBotlmLzGRfYIukjGzsFIqDHd5qOLMcEhCFlxnBvWxYcKdx64HexBbNoCXVw6S z2TBYamW8BPsOas6fiDRV99yJmHq/tPKexOrf3zLiWr1NflbgzXjZUWMd0ytDmoIxl1H AGqTVDo720CNjfuj/GFErA09PF8l3AnzjEkwSG+FrgXhBLRrzyaPlmYtWxsYqBd8afp4 YOzA== 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=HnKrAYa5hr5iygzxmQZArwc9Hjtkga0EJsxEfRJurMM=; b=Z2aijXILqTm8yZCgz2zfwucEGv2f6CC+w/doKhuQ5+uU1Sam/v+N9DuzZRpiiGf0in 655KaTlpzre3rqnTwAcdGdkb2734qYuk8JQuy06O6WKnrfJYNOnK902Ee5DTDIVa/TXl w8+Bsdr/XxS152iBM4IGtHsVAMFRw9XkhWVeuFtVQIgmyLLz1qABbW1tcJ+dpe1kApuI 5bjWmJEL4u9LmoCJopoA13mgJEGshX1hMXj1igfqjtoitOrFh98FyKGlROT8YIi6eHXN uTe9qHCfzHcebREuVCVfijovfP8iKa5GxGwnCDmI2U7gzVGzdO/B1+ubsQugOrD8bGgI oaOQ== 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 t13si6937487pfe.247.2019.09.06.16.12.58; Fri, 06 Sep 2019 16:13:14 -0700 (PDT) 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 S2394067AbfIFONj (ORCPT + 99 others); Fri, 6 Sep 2019 10:13:39 -0400 Received: from foss.arm.com ([217.140.110.172]:56916 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731142AbfIFONj (ORCPT ); Fri, 6 Sep 2019 10:13:39 -0400 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 C5E9328; Fri, 6 Sep 2019 07:13:38 -0700 (PDT) Received: from [10.0.2.15] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DFCCD3F718; Fri, 6 Sep 2019 07:13:36 -0700 (PDT) Subject: Re: [RFC PATCH 1/9] sched,cgroup: Add interface for latency-nice To: Parth Shah , Patrick Bellasi Cc: Peter Zijlstra , Subhra Mazumdar , linux-kernel@vger.kernel.org, mingo@redhat.com, tglx@linutronix.de, steven.sistare@oracle.com, dhaval.giani@oracle.com, daniel.lezcano@linaro.org, vincent.guittot@linaro.org, viresh.kumar@linaro.org, tim.c.chen@linux.intel.com, mgorman@techsingularity.net References: <20190830174944.21741-1-subhra.mazumdar@oracle.com> <20190830174944.21741-2-subhra.mazumdar@oracle.com> <20190905083127.GA2332@hirez.programming.kicks-ass.net> <87r24v2i14.fsf@arm.com> <20190905104616.GD2332@hirez.programming.kicks-ass.net> <87imq72dpc.fsf@arm.com> <87d0ge3n85.fsf@arm.com> <3bb17e15-5492-b78c-20a8-5989519f20e2@linux.ibm.com> From: Valentin Schneider Message-ID: <75e782c7-121d-a0ea-7fbf-efb0c83f50e6@arm.com> Date: Fri, 6 Sep 2019 15:13:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <3bb17e15-5492-b78c-20a8-5989519f20e2@linux.ibm.com> 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 06/09/2019 13:45, Parth Shah wrote:> > I guess there is some usecase in case of thermal throttling. > If a task is heating up the core then in ideal scenarios POWER systems throttle > down to rated frequency. > In such case, if the task is latency sensitive (min latency nice), we can move the > task around the chip to heat up the chip uniformly allowing me to gain more performance > with sustained higher frequency. > With this, we will require the help from active load balancer and latency-nice > classification on per task and/or group basis. > > Hopefully, this might be useful for other arch as well, right? > Most of the functionality is already there, we're only really missing thermal pressure awareness. There was [1] but it seems to have died. At least with CFS load balancing, if thermal throttling is correctly reflected as a CPU capacity reduction you will tend to move things away from that CPU, since load is balanced over capacities. For active balance, we actually already have a condition that moves a task to a less capacity-pressured CPU (although it is somewhat specific). So if thermal pressure follows that task (e.g. it's doing tons of vector/float), it will be rotated around. However there should be a point made on latency vs throughput. If you care about latency you probably do not want to active balance your task. If you care about throughput, it should be specified in some way (util-clamp says hello!). It sort of feels like you'd want an extension of misfit migration (salesman hat goes on from here) - misfit moves tasks that are CPU bound (IOW their util is >= 80% of the CPU capacity) to CPUs of higher capacity. It's only enabled for systems with asymmetric capacities, but could be enabled globally for "dynamically-created asymmetric capacities" (IOW RT/IRQ/thermal pressure on SMP systems). On top of that, if we make misfit consider e.g. uclamp.min (I don't think that's already the case), then you have your throughput knob to have *some* designated tasks move away from (thermal & else) pressure. [1]: https://lore.kernel.org/lkml/1555443521-579-1-git-send-email-thara.gopinath@linaro.org/