Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2323502imm; Thu, 2 Aug 2018 09:39:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeODsOMNXdmw27yD6R8AdXKDy3Mg1mmzyiCgyhnYH0KYifKsUXHkGAYmQe4ccNoIwHVVKss X-Received: by 2002:a63:1722:: with SMTP id x34-v6mr214332pgl.268.1533227995195; Thu, 02 Aug 2018 09:39:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533227995; cv=none; d=google.com; s=arc-20160816; b=zIc/1n9/VoXMSzzbjT39ZHweXTqjGcFs21rQeeU9bBB/QQxmBFW87VK7Ne+/Ij3boT XQ6wCwq1djbfjMsdcC08GBudcDmMflYpiEpwkmjutp/tgIuqaGuI5eQIzStIFLXlL9xx rzO6jMHMxq7RgUjNo7otcLl683mXYlL3Z3SyrcAdV7BtBFWSjxwzwXBfgDSv0x27vJmA pKqxbuJG+3RnZHl8prVFHVj39AVhLNHhiDNBrgh/NlC0F1s4y6zOcRpEq2l4kLFYgohf M5Lq0Ou3wWhj9hUN//qqcmfTV+3r4YrNkyQmhC3C1t03Nkyq6gbh3I9JgMLiHjWzd5pM Z/Jg== 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=2Xf4M1f+A2HgS2NvVSCB0JIhKIPkk/45mqDi7uFQ+gI=; b=t1rbDldjOHrzoCdDPsTOxBYpeg1+b+Z0500fAvFw1ffrHEAuoxUhRaUCwQHwNKc14a Ea7w+69aG2AEEgdr9tB2N0nj/C/qNHd2JbqcOV22POIsLjj9yMIbL7rwp8HIQf5zD7gn UiQxIZ/iiHEnJc7BlkfZQeSSGlI/VbEBtn7EL2twNXu8Up6WAhuqXpcMoq25bJFTqgJz h16152kht7kQ7kXLhhWwizXS5XZSv+X5cURnsTN1tBXEo++bsoFvUjA44v+qbjbPsgea NwNdacPBA0GEljpQc2xOx7x+hrZITm6DK62Oc+8OJMJbsXZn4FEKXIDBk3a7riXfSgyL VFEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Goc33Pjh; 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 c17-v6si2038023pge.273.2018.08.02.09.39.40; Thu, 02 Aug 2018 09:39:55 -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=Goc33Pjh; 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 S1729034AbeHBSaH (ORCPT + 99 others); Thu, 2 Aug 2018 14:30:07 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:40174 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726679AbeHBSaG (ORCPT ); Thu, 2 Aug 2018 14:30:06 -0400 Received: by mail-it0-f67.google.com with SMTP id h23-v6so4235863ita.5 for ; Thu, 02 Aug 2018 09:38:12 -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=2Xf4M1f+A2HgS2NvVSCB0JIhKIPkk/45mqDi7uFQ+gI=; b=Goc33PjheeoUX0zWYRWFC+1wvcUXD6ZoXEKXlLzF74Gocn8iT3cJNiMLvBfErVmH+t Mz6DHhirTYve5E/SGMvrbGl3giHnx+eDwBs4NPyHU+LQ+0TgXDdIJVcG5GHBRwIDgxt+ koMx3RSEcnsesUmDrQDD05+ZWfv4NqUfW6Ugs= 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=2Xf4M1f+A2HgS2NvVSCB0JIhKIPkk/45mqDi7uFQ+gI=; b=IsCkMhF378CmWng+FvnDmkXXI4yolZsOn+Ejn1J3+7raoN/waBn+zar8IzsLX0ZSO9 wrnPRs67hVdWMDrQMgSeaNC5gI2la7S1fgXDMjT+aei9zg7HvJVMqQg7ARF8Ft309wEv DDKv3QV0q2HJNBleXZbbkeVaA9L1w01sD2LlG3oj5e0541lH3NrcM7qKUMrx76N1SHj0 nTnH4QdCUmgWoIGOe4Xw8f9qeE3C61os7YTzrXfXcFNPkfPTRgSwyNh9bZ38tY04opkx e6TH3wBHxQf7h8Tc3SyIEeJLpfddiVDehwJC1wnPxWu7KoZTggDDQbi2rByirqA+6pgr vxjA== X-Gm-Message-State: AOUpUlEgcvYy4PZt6IYTjU8MgogYafCqWqga6fZb3wbO3t3ArqOdsKpW jciJP7W4qrlbDjiIwDk6ZaHlNst28/58eRAQGgKSnA== X-Received: by 2002:a24:d0d1:: with SMTP id m200-v6mr3026997itg.89.1533227892148; Thu, 02 Aug 2018 09:38:12 -0700 (PDT) MIME-Version: 1.0 References: <20180802130337.uf6tlac2hg4nkbwr@queper01-lin> <20180802130801.GL2494@hirez.programming.kicks-ass.net> <20180802131849.mqpt5lbtcqrxbwig@queper01-lin> <20180802141424.ju4jxxbk6pxw3kyq@queper01-lin> <20180802153035.vjtmqwdwujvt7ojs@queper01-lin> <20180802160009.uhwwj3tqrqmv7q5a@queper01-lin> <20180802161027.v2ctgscuc4uxbb7u@queper01-lin> In-Reply-To: <20180802161027.v2ctgscuc4uxbb7u@queper01-lin> From: Vincent Guittot Date: Thu, 2 Aug 2018 18:38:01 +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 18:10, Quentin Perret wrote: > > On Thursday 02 Aug 2018 at 18:07:49 (+0200), Vincent Guittot wrote: > > On Thu, 2 Aug 2018 at 18:00, Quentin Perret wrote: > > > > > > On Thursday 02 Aug 2018 at 17:55:24 (+0200), Vincent Guittot wrote: > > > > 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 > > > > > > But find_idlest_cpu() should select a CPU using load in case of a forkee > > > no ? > > > > So you have to wait for the next tick that will set the overutilized > > and disable the want_energy. Until this point, all new tasks will be > > put on the current cpu > > want_energy should always be false for forkees, because we set it only > for SD_BALANCE_WAKE. Ah yes I forgot that point. But doesn't this break the EAS policy ? I mean each time a new task is created, we use the load to select the best CPU