Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2351365imm; Thu, 2 Aug 2018 10:07:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeHB1I6kzOSxuSRzwQYU3mBDWo65/gzCcZrm8ShB4nl0XZcSaDO1RbblSFXuNYFK3+uP2E6 X-Received: by 2002:a62:4cd3:: with SMTP id e80-v6mr331256pfj.234.1533229633092; Thu, 02 Aug 2018 10:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533229633; cv=none; d=google.com; s=arc-20160816; b=PHVd9jOd6yT2OVJKBZc9NfjnFKW7PIDDjsqIzM22sfF3vrOOjoWYxhetX68FyuBDQF j6r7W7Jx1QC4o/VAN9YQDnPdnBkCXvTmmpSA+hWjr7cchRfA66IRocFXVstrD5b7y5HE fNDNL8tHh3lrVoDW3H35pDTmkdzAFs56WIRfUXdbn4GpkWQ/k/MTQ/T93dBZW4xNMor/ Qdtox8YYBsme/s2LIv81WH7Ryn/YF9EbdBro7hVf79WXdj0tQjT9IE2A0on2o0j4QRcO NqH4xtg26hvv4v95dghk1Q2EKYEKqeiXvCQh3vR8S/2jeeXgbF4wbRtekiMi2QInUJz1 o6xg== 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 :arc-authentication-results; bh=BvzpHx4Y1+1jkoOdPTlcFX2PLolB5iT7+OdxjVHUXWw=; b=tkED4NNHZVM3/k4sFQzXFvZYCodE1VXIg8Avu62myGh1k1c9hBUoE/k7jRdrn1ghc6 T8YqmXvXjb1mf8+COpi7uWXda6KvMwQIi354ZPcJOlqW7P7OQqh9ug6ygLSoNNEaQhsA I7rVj+EzHi3lkkJ4T67pJRw/zTS2sm3g1iqXLB5It4eYy3UzgjPV2ZGJPN8uQ/xdVshY UgrP27NtkQ6DwGkAsqb9xu8FFjUw45ers8lO1h26CkHLoR9h2mO/ywJcXYXn7oKvQzN/ t1s+xnQq3z52l9zCGj324YfGF/KZu7ItoX2/ooqd4l659NtQnH9AJhzFvRAbJBLgYo/v iNmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="JVu9/nwu"; 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 x65-v6si2612647pff.196.2018.08.02.10.06.56; Thu, 02 Aug 2018 10:07:13 -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="JVu9/nwu"; 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 S2387779AbeHBRrW (ORCPT + 99 others); Thu, 2 Aug 2018 13:47:22 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:37135 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387632AbeHBRrW (ORCPT ); Thu, 2 Aug 2018 13:47:22 -0400 Received: by mail-io0-f195.google.com with SMTP id z19-v6so2358083ioh.4 for ; Thu, 02 Aug 2018 08:55:36 -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=BvzpHx4Y1+1jkoOdPTlcFX2PLolB5iT7+OdxjVHUXWw=; b=JVu9/nwuWWI80aaFJd09VulaJhzTBRbazNRkrS0oAEe75HcsQ1E+tHLDPxqwxfsPMa a1q9qnKEkkhD8DKdbYoPohX0tRmrETbmMuhuR3SR9Ovr9AioVk0tihCabgWFTVjThPjx Nf40UTUpDhBOuvfWQm82JsjUdbwJn2IZP7s/M= 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=BvzpHx4Y1+1jkoOdPTlcFX2PLolB5iT7+OdxjVHUXWw=; b=I/bmeL9ReBCSBi1jbELN0YbSE+RG1x9kjIyeP2b/fdTLOJWbM3rRy3vxygx8GfJJ9b DK91NyQllauoey9qFJL98gJbMxwEumdafLClTLNt/LQMDI3T1wc52MXegYpZxrKC3IWh DZVOJay9PY+h0ekip7H60G7ss3qXCoqLXJ/JCc2EobT5Cczemw4PWNogfjZzgOdHD6rm SeddLQ2+ReCXanHFD1QvB/ZKugNyuLPWV948kq7PkgbrWWis4rScyPQBwgQD1o3UQh7k ZDP7tHcdyM5+7TJyzOtIDfXK0JFR417BReOT8IU3iG1YVvgd0pFmomRALuGjrV4cdl/o foxQ== X-Gm-Message-State: AOUpUlHNCtT1YxNxx1mNwFZQKRDRI9WRCglmeqQa28ExrJDQIJXkuQFB rBYzSd9o6fEHp9c6WhVC7ZAcbYvs/XkMe2mPs832Hg== X-Received: by 2002:a6b:3e46:: with SMTP id l67-v6mr2801363ioa.294.1533225335772; Thu, 02 Aug 2018 08:55:35 -0700 (PDT) MIME-Version: 1.0 References: <20180724122521.22109-1-quentin.perret@arm.com> <20180724122521.22109-10-quentin.perret@arm.com> <20180802122629.GU2476@hirez.programming.kicks-ass.net> <20180802130337.uf6tlac2hg4nkbwr@queper01-lin> <20180802130801.GL2494@hirez.programming.kicks-ass.net> <20180802131849.mqpt5lbtcqrxbwig@queper01-lin> <20180802141424.ju4jxxbk6pxw3kyq@queper01-lin> <20180802153035.vjtmqwdwujvt7ojs@queper01-lin> In-Reply-To: <20180802153035.vjtmqwdwujvt7ojs@queper01-lin> From: Vincent Guittot Date: Thu, 2 Aug 2018 17:55:24 +0200 Message-ID: Subject: Re: [PATCH v5 09/14] sched: Add over-utilization/tipping point indicator To: Quentin Perret Cc: Peter Zijlstra , "Rafael J. Wysocki" , linux-kernel , "open list:THERMAL" , "gregkh@linuxfoundation.org" , Ingo Molnar , Dietmar Eggemann , Morten Rasmussen , Chris Redpath , Patrick Bellasi , Valentin Schneider , Thara Gopinath , viresh kumar , Todd Kjos , Joel Fernandes , "Cc: Steve Muckle" , adharmap@quicinc.com, "Kannan, Saravana" , pkondeti@codeaurora.org, Juri Lelli , Eduardo Valentin , Srinivas Pandruvada , currojerez@riseup.net, Javi Merino 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 Thu, 2 Aug 2018 at 17:30, Quentin Perret wrote: > > On Thursday 02 Aug 2018 at 17:14:15 (+0200), Vincent Guittot wrote: > > On Thu, 2 Aug 2018 at 16:14, Quentin Perret wrote: > > > Good point, setting the util_avg to 0 for new tasks should help > > > filtering out those tiny tasks too. And that would match with the idea > > > of letting tasks build their history before looking at their util_avg ... > > > > > > But there is one difference w.r.t frequency selection. The current code > > > won't mark the system overutilized, but will let sugov raise the > > > frequency when a new task is enqueued. So in case of a fork bomb, we > > > > If the initial value of util_avg is 0, we should not have any impact > > on the util_avg of the cfs rq on which the task is attached, isn't it > > ? so this should not impact both the over utilization state and the > > frequency selected by sugov or I'm missing something ? > > What I tried to say is that setting util_avg to 0 for new tasks will > prevent schedutil from raising the frequency in case of a fork bomb, and > I think that could be an issue. And I think this isn't an issue with the > patch as-is ... ok. So you also want to deal with fork bomb Not sure that you don't have some problem with current proposal too because select_task_rq_fair will always return prev_cpu because util_avg and util_est are 0 at that time > > Sorry if that wasn't clear > > > Then, select_task_rq_fair is called for a new task but util_avg is > > still 0 at that time in the current code so you will have consistent > > util_avg of the new task before and after calling > > find_energy_efficient_cpu > > New tasks don't go in find_energy_efficient_cpu(), because, as you said, > they have no consistent util_avg yet when select_task_rq_fair() is called > for the first time. > > Thanks, > Quentin