Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1046771imm; Wed, 10 Oct 2018 08:20:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV61n7RFx9RChY61QfByp+aCfH6ineO65hj05237DoetTZmh5LN+YZdfL11eXwC8W2IKMis5u X-Received: by 2002:a17:902:24b:: with SMTP id 69-v6mr19641690plc.280.1539184845227; Wed, 10 Oct 2018 08:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539184845; cv=none; d=google.com; s=arc-20160816; b=J+qXHf5IsXIieqU8wMUICwv/SVbCrRaTKjpGKwfhhr+02Ugop+5dz1xFVNqlgwSFVW LPUcvSs4hM0t15MLSJCWKkLgQEPUXOCtYec1OcwUMuZjmHoBEFU8gEGEE/tsA3b0gjyg /iX+YrjKkk6rb6CTcWe4Fd5TXIEJu0fKfFmBh6wQpteC9goXN8aSAMjK+pfjMFXuyKeF csdtVzxOqOwB1D3WBEyiLQ8Q0y22NAruNqlGyJQWXMBQHU6zIRintnU22KmdMPGcGjp0 T9KwN0+xge3ZGEwbonLFwrFE4Cfk71a69RjAFgcSfbg1fnyyA1L+I7gK71lU6OUheVq8 FMbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=YqZNGkJBI3w2FyVhG/oP0c9Bt8VrqtJEYeeYlT2jZkI=; b=dVLXi+mIqd0BiupU3AOdAcpDZHw7J0h9nrIMgjn3EiRBudov4T6YcKJWA5llnHOdlz +tskXNZLbLvVVWQDdZ4MNTNpuPEb0lcUqj9OIYZvhG3rsL+87CJrxMSkocSsSAJh2Cmv 2atQIE+3uqKTUr06bO9sX9a9ViigXokyCOMbogt9Je6tYBY6d4TEqW05DbyMXvOqkt3R hZJ3UVikvC8Eu6Bn5xuAHiZ+IsZyGHMh7xBXrdAsd3eO+4CaKaC+em2OFgssddLC6LbZ MzF/0EIxMnxQuXGcTW9uO2L0roI6MlIenrI1UExqckaLyu/uO1tLpHzTA+nKGCLMUeXH DpMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CkK9Zk+5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5-v6si23902830plk.95.2018.10.10.08.20.29; Wed, 10 Oct 2018 08:20:45 -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; dkim=pass header.i=@linaro.org header.s=google header.b=CkK9Zk+5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726712AbeJJWma (ORCPT + 99 others); Wed, 10 Oct 2018 18:42:30 -0400 Received: from mail-it1-f195.google.com ([209.85.166.195]:54491 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbeJJWma (ORCPT ); Wed, 10 Oct 2018 18:42:30 -0400 Received: by mail-it1-f195.google.com with SMTP id l191-v6so8598652ita.4 for ; Wed, 10 Oct 2018 08:19:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YqZNGkJBI3w2FyVhG/oP0c9Bt8VrqtJEYeeYlT2jZkI=; b=CkK9Zk+5Mm5RbfCq8zrQzXzCQZst5P6xbK/cfM79t9TqnacRRSGm8uyzjdlDl//9ND Z7aPzJwLVmNGRcUafvUN9C51SGmbJOCqp/5/TPebPb57jpQkm6HcFc75C51Dofml+mZ6 U3xFOq3GvJiRIFOCXmtt7rXFLgL37xtnwg0BE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YqZNGkJBI3w2FyVhG/oP0c9Bt8VrqtJEYeeYlT2jZkI=; b=Kpb4/6mndat4iWo2BY3ZUBnxUmumFoQiDFoObiRwszYB+/vR0ILLSK+4IVfStdwPdW VNij05eYEcHA07RT2Kx3jF7nEZwiJOoZmmvYeUsSycQVvWcdBFge9q8ixazjbqJpTQEb 60vuW6upodED8efijCILrjHn2YeWkj2dBBdC72rZR0XIEqlu8exK6tcwpVsuj4n4Xv/S FcBTPsDMxrPbYito8YzEJnbscnIlHXXkCUVJCRZIWwmQ/TUFttxNa329yqfXovi2vDlf oi1YT0OM6fllB1AbD9Za5MUshjnmuWSZA1zoz+IumA/xxUFgzEnbmhIIc+D3zOIRtI3A EpTQ== X-Gm-Message-State: ABuFfohuJWD8cZOpOwzLt1lVb+s4Q+JluOJ71WOOuttwXOc+hpkVZuIy WBKCqLxnhT9sQSx3sB0nqCZA+voISxn8nnfv4f2VKA== X-Received: by 2002:a24:bd41:: with SMTP id x62-v6mr1153916ite.152.1539184790069; Wed, 10 Oct 2018 08:19:50 -0700 (PDT) MIME-Version: 1.0 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> <20181010134755.jrigtogbxwaz2izb@queper01-lin> In-Reply-To: <20181010134755.jrigtogbxwaz2izb@queper01-lin> From: Vincent Guittot Date: Wed, 10 Oct 2018 17:19:38 +0200 Message-ID: Subject: Re: [RFC PATCH 0/7] Introduce thermal pressure To: Quentin Perret 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 10 Oct 2018 at 15:48, Quentin Perret wrote: > > 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 But you know what happens in average between 2 LB > 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 But the point is that you don't know: - if the capping will not happen soon. If the pressure has reached the 50%, it means that it already happened quite often in the past 100ms. - if there is really available capacity as the current sum of utilization reflects what was available for tasks and not what the tasks really wants to use > 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 What do you mean by forever ? > 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