Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1771356imm; Wed, 16 May 2018 02:50:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqyFDIIDOiPgcOUXuTm9q4Bve3GyVhHTCflfbGxlCf8RvNxlqyXRB9k8ufL9/EOgF3FPXgx X-Received: by 2002:a62:9d5a:: with SMTP id i87-v6mr200986pfd.190.1526464248720; Wed, 16 May 2018 02:50:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526464248; cv=none; d=google.com; s=arc-20160816; b=MOKmxR3WuYht0GkGfjwuT+kqXN3YnTe4EkfyLwOWv7+VlXyHzkKG3wKbYFO6+UIGf9 XL8xwO1LqIFjrkis3MiaFD4h/blSsDD8yI3Ful6CN405iXnoH8V1lukwN3mCiA1N4d9J YpHELZXRhBLm9SI+FGRuToL6xGLLjAQD/r2roU4e9E5Ib0krya0FP855SHsiNR+AfeM2 Y03VMtGVNQNHEx4qTKKX24eVE+1k6xlVi61t3cEy/ZszF8hYQWADS7IPzJAlyQozR00V k0hCzGG7R4hjT71Jom8l973Rh4GdGjrQ2fm4JTMMXxFr56/XrOP4bHyiGoO6E3Xvwd6m 211g== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=en2mT2duoDy4V74Tei7Rz8AfXLQxc+j48qjS/JDfZEM=; b=xLRmE7xTIECBUFpnEmULBv12IONBf8WA9SkS1A2GuHVNTdzZNUlln+7nEhpECrjaM/ ShftNpReiwxDkxM4pH+d+Qqu9wNVRO2c+BLtIjWpyJoFGhVrKywmx12TkbGUK4+DXTDu PrbD2bCib863s6VAc80WxayAzKCfzex7pyRTvmcIGmGe6s5GqSCpZ8wmxO2UTplDeS86 /oAVJhplWOvw3/ISAJooK+G8uK5MDdG2oaSOYItIGVtLx3etYGPVP8P4UnX04DbzTHaT xpGBdz7/O6+bkK4j/OlzkGJgrnVUVB8IM97HqhofdIuLS53wdW9shN3/2cWvOswP7YfI 3dSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=WcJK/0nF; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v23-v6si2341382pfl.233.2018.05.16.02.50.34; Wed, 16 May 2018 02:50:48 -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=fail header.i=@gmail.com header.s=20161025 header.b=WcJK/0nF; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753388AbeEPJtn (ORCPT + 99 others); Wed, 16 May 2018 05:49:43 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:34850 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753101AbeEPJtj (ORCPT ); Wed, 16 May 2018 05:49:39 -0400 Received: by mail-ot0-f195.google.com with SMTP id h8-v6so170694otb.2; Wed, 16 May 2018 02:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=en2mT2duoDy4V74Tei7Rz8AfXLQxc+j48qjS/JDfZEM=; b=WcJK/0nFluls0VRIi/dpZM4xmZS1jGqlaBAHdV6ygi5qV49I0JY/+nERGp8Y+eeoox khY7W7nsRPRPAM+ZX39x09gC+VvcSQMAsOjeRQcoPp0fxX8CBa/wDwCxYUgjvTTGBH+e /zeqbMSdnXaiNn2sdeDmpBGCbTNNYFr6+9KOgTz6pJLoz9EDofG4Nq8v7eY7OtbtZOM5 Im0cgBxh/8J4xFoDb4iHOY6SgfpNf5eWXZtlMroreP++wu5zsgoMT/R04bqkBLWi8nsz viFB9bbyHoMFffopIGzMIRFvRLhcnGGXqAaxuPcT5OpFb+IBNitVhn29UXU3S6NnClau +D0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=en2mT2duoDy4V74Tei7Rz8AfXLQxc+j48qjS/JDfZEM=; b=E1gFT9Ud+5fTnxAF1MKuvRKbAGNoKiexWZJkMLIvVDUf9/BAyDWWcKLCkSXp1V4FB1 JErykjHF93b1IA/0fgIbQ6+WUagds4faC+nYTjBW7MQDFfWhuBJa9oflyB6ZCBMYCi0G y64rQ8HhOrtRh0526X4kpzKu+xadY94l6onAoomlXq1yUPo5OudVN5T6+PjnhznM9aWf 6wvFAShWTou7j1sEoPNACDzzl+R+UUOmYqILz2GXdxQnnDeWx6MN/glb2VvZIIwW8o/0 u0whIJOpw3Gtqakk8Bi9niaHpMWNvmXESzURvuSyx96dUVKieiEd3WoGwKNeuxlsFHST 5Fjw== X-Gm-Message-State: ALKqPwcBGwIVa4+ITg8cSAF7eF5fT+iQ6ZGz+NIyI1joJD9jW4Sp73Pp yNYzYxo9TRacWNqZUtBNclMN9yDyi62VP2dHAiI= X-Received: by 2002:a9d:5917:: with SMTP id t23-v6mr113757oth.217.1526464179138; Wed, 16 May 2018 02:49:39 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:1468:0:0:0:0:0 with HTTP; Wed, 16 May 2018 02:49:38 -0700 (PDT) In-Reply-To: <20180516044911.28797-8-srinivas.pandruvada@linux.intel.com> References: <20180516044911.28797-1-srinivas.pandruvada@linux.intel.com> <20180516044911.28797-8-srinivas.pandruvada@linux.intel.com> From: "Rafael J. Wysocki" Date: Wed, 16 May 2018 11:49:38 +0200 X-Google-Sender-Auth: xI1y0S9IHUPXCyjOV9yPwTg1YeE Message-ID: Subject: Re: [RFC/RFT] [PATCH 07/10] cpufreq: intel_pstate: HWP boost performance on busy task migrate To: Srinivas Pandruvada Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Borislav Petkov , Len Brown , "Rafael J. Wysocki" , Mel Gorman , "the arch/x86 maintainers" , Linux PM , Viresh Kumar , Juri Lelli , Linux Kernel Mailing List 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, May 16, 2018 at 6:49 AM, Srinivas Pandruvada wrote: > When a busy task migrates to a new CPU boost HWP prformance to max. This > helps workloads on servers with per core P-states, which saturates all > CPUs and then they migrate frequently. But changing limits has extra over > head of issuing new HWP Request MSR, which takes 1000+ > cycles. So this change limits setting HWP Request MSR. > Rate control in setting HWP Requests: > - If the current performance is around P1, simply ignore. > - Once set wait till hold time, till remove boost. While the boost > is on, another flags is notified, it will prolong boost. > - The task migrates needs to have some utilzation which is more > than threshold utilization, which will trigger P-state above minimum. > > Signed-off-by: Srinivas Pandruvada > --- > drivers/cpufreq/intel_pstate.c | 37 ++++++++++++++++++++++++++++++++++++- > 1 file changed, 36 insertions(+), 1 deletion(-) > > diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c > index d418265..ec455af 100644 > --- a/drivers/cpufreq/intel_pstate.c > +++ b/drivers/cpufreq/intel_pstate.c > @@ -227,6 +227,7 @@ struct global_params { > * defines callback and arguments > * @hwp_boost_active: HWP performance is boosted on this CPU > * @last_io_update: Last time when IO wake flag was set > + * @migrate_hint: Set when scheduler indicates thread migration > * > * This structure stores per CPU instance data for all CPUs. > */ > @@ -263,6 +264,7 @@ struct cpudata { > call_single_data_t csd; > bool hwp_boost_active; > u64 last_io_update; > + bool migrate_hint; Why do you need this in the struct? It looks like it only is used locally in intel_pstate_update_util_hwp(). > };