Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp943311imm; Wed, 10 Oct 2018 06:48:43 -0700 (PDT) X-Google-Smtp-Source: ACcGV62oQ/nxMCvRfnTVJQOmPLFINZIx70CXE07UnY+cUFdFNGZ5NFZCuYsdxpn3+PCRrwjo4eUR X-Received: by 2002:a63:9742:: with SMTP id d2-v6mr13085921pgo.278.1539179323575; Wed, 10 Oct 2018 06:48:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539179323; cv=none; d=google.com; s=arc-20160816; b=OZ1GA7fOHN69QbuvrXKSVUcc7LtfFrPNiLqZEoG0yWGCbTA8pzaChH0ilhTJoXkYEI SiuyOyVEolk700+a8REhKB4t9Br6qtodyv8S2c5Ojg7GgqdaWLgkJFIwSkMWCviv98S9 dGIz82c2aeaG293EAHagEwOLQ9yVfreWsyN7eRFDfPXVf+Q0rsO44Bzuw6AC3hf176PD QlMvjXkCpoPplV1yYcwJATiEWN12kJbdswkYjuzutRyuS2MfT7JZvH75blCMy3JDOUFt ddU8QH2u7MzEZFZwiys0P28aLa4lziDxQoPjtPZIVHPfV4nSrpPD4xg5HpnwVahvErMG eyHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=N2pcf7cuyVwEbTfdPngTcW2Skj+YT6yIs2BSzTpSEzA=; b=BAbGBg7PhBJlBuesYVKtYwtH7BfcuFZdK4Qny6hrL7VaHxVzISDOl1MEU3nyHnLoGE 5TpZAxidxTcGY5P+RZS7rSezJbf4sGn3eMMz47lnBozh/x6trd5aZ1BPDclkuRnfRD9R e/gOnMG8Aqeamx+lZoxZLNaQn7iTUjvihOURKPiqyUi5pRkWoquR/oNReaGGIr+uLZ+4 rEV847q9D+yAi9HPeEQZhrQb58Q1gmGC6mgyz9JLLNV0Q0lIfVi0kK3oIukhMUdkldX9 e/anU5FAfcqONECHaMf6yYcdvOyJZdD6wbRxuOVhGBCpmseQIEawwGfKAAdYhaE9zA6x ocfQ== 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 go1si24356231plb.242.2018.10.10.06.48.27; Wed, 10 Oct 2018 06:48:43 -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 S1726761AbeJJVKS (ORCPT + 99 others); Wed, 10 Oct 2018 17:10:18 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:52520 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726573AbeJJVKR (ORCPT ); Wed, 10 Oct 2018 17:10:17 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9EC9B1596; Wed, 10 Oct 2018 06:48:01 -0700 (PDT) Received: from queper01-lin (queper01-lin.cambridge.arm.com [10.1.195.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F41EB3F5D3; Wed, 10 Oct 2018 06:47:58 -0700 (PDT) Date: Wed, 10 Oct 2018 14:47:57 +0100 From: Quentin Perret To: Vincent Guittot Cc: Ingo Molnar , Thara Gopinath , linux-kernel , Ingo Molnar , Peter Zijlstra , Zhang Rui , "gregkh@linuxfoundation.org" , "Rafael J. Wysocki" , Amit Kachhap , viresh kumar , Javi Merino , Eduardo Valentin , Daniel Lezcano , "open list:THERMAL" , Ionela Voinescu Subject: Re: [RFC PATCH 0/7] Introduce thermal pressure Message-ID: <20181010134755.jrigtogbxwaz2izb@queper01-lin> References: <1539102302-9057-1-git-send-email-thara.gopinath@linaro.org> <20181010061751.GA37224@gmail.com> <20181010082933.4ful4dzk7rkijcwu@queper01-lin> <20181010095459.orw2gse75klpwosx@queper01-lin> <20181010103623.ttjexasymdpi66lu@queper01-lin> <20181010130549.hzpkaskvlgifbdrp@queper01-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 10 Oct 2018 at 15:27:57 (+0200), Vincent Guittot wrote: > On Wed, 10 Oct 2018 at 15:05, Quentin Perret wrote: > > > > On Wednesday 10 Oct 2018 at 14:04:40 (+0200), Vincent Guittot wrote: > > > This patchset doesn't touch cpu_capacity_orig and doesn't need to as > > > it assume that the max capacity is unchanged but some capacity is > > > momentary stolen by thermal. > > > If you want to reflect immediately all thermal capping change, you > > > have to update this field and all related fields and struct around > > > > I don't follow you here. I never said I wanted to change > > cpu_capacity_orig. I don't think we should do that actually. Changing > > capacity_of (which is updated during LB IIRC) is just fine. The question > > is about what you want to do there: reflect an averaged value or the > > instantaneous one. > > Sorry I though your were speaking about updating this cpu_capacity_orig. N/p, communication via email can easily become confusing :-) > With using instantaneous max value in capacity_of(), we are back to > the problem raised by Thara that the value will most probably not > reflect the current capping value when it is used in LB, because LB > period can quite long on busy CPU (default max value is 32*sd_weight > ms) But averaging the capping value over time doesn't make LB happen more often ... That will help you account for capping that happened in the past, but it's not obvious this is actually a good thing. Probably not all the time anyway. Say a CPU was capped at 50% of it's capacity, then the cap is removed. At that point it'll take 100ms+ for the thermal signal to decay and let the scheduler know about the newly available capacity. That can probably be a performance hit in some use cases ... And the other way around, it can also take forever for the scheduler to notice that a CPU has a reduced capacity before reacting to it. If you want to filter out very short transient capping events to avoid over-reacting in the scheduler (is this actually happening ?), then maybe the average should be done on the cooling device side or something like that ? Thanks, Quentin