Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2499252imm; Wed, 16 May 2018 14:00:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqTkAvGtCqhh40cOU0fK3xbIQ4REKh2HxZXdKbU6nnq/QHaD2Qq3matidAkON55VMqk0yFT X-Received: by 2002:a62:ea1a:: with SMTP id t26-v6mr2502838pfh.117.1526504405340; Wed, 16 May 2018 14:00:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526504405; cv=none; d=google.com; s=arc-20160816; b=v6gNZay5XrnssZkoUvYYB5xWrTzTt9bW5uiE/0vY3DrOgeMlYp8NptypPb2rQ4QenX 5EIXbgXg2Hd8sozd0q7+Ue7d4bXI84GgoJwHMmeyeGyVZrx8eVgH0Vhiqw+l7E1GeZwf Vqspyo8RMXT70s6jIvwqYXBdimrZePQa+7ziWohZyWYnS4Vre3uk4JF/AHDaF2uf+CX3 MJs6xr1jZYTjWq60+TpDAHSDuMQmz1iLOB0lX18v/cV/Br4z5MdaEGzPTSwvSdaqXn09 MmakObE7rhluL5YEbsDuh57RQsupNp1wvRIo3LXw4Fy/iOT/a79RTRvq0PwSFCKXDhhv p+Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=tokh2uEPPQX5CPg6Ll9WMgTPxE4uJsrvtb2m/n/dckM=; b=bwA77MaJ2+ftff+PtT9zaiBfFwTk0ydz4wHGYQxFhIQ5VcSpzFVplqm1fDnZLmcJe0 rH0oeJVmJ6qag9qJ9tjb+s92zyaKhtbzE3ztvgtofAxxxXF/6HC4VVQb/qz9cwE5f0B3 pVXZdBneJLpp85y5GFsPvn2BlzwbG6IWI+DlCQZ2eFDhuTPIcksAqj+oxCoT+jj4R/cO BqLsekwKmY0HPxo5m3pYsFq6K+dCRMViQDeUBJpzfySGN7bgXTKms2gDi1erspFXsN55 1bJXHJXdR6xEMCCUcIXvQ2jSW8gAGZRM4xE2N9ZLUH1pyJsg9Uog/hkzxYSHb84j8OK+ u6iw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c131-v6si3430750pfg.108.2018.05.16.13.59.50; Wed, 16 May 2018 14:00:05 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751892AbeEPU7E (ORCPT + 99 others); Wed, 16 May 2018 16:59:04 -0400 Received: from mga06.intel.com ([134.134.136.31]:27516 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751130AbeEPU7D (ORCPT ); Wed, 16 May 2018 16:59:03 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 May 2018 13:59:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,407,1520924400"; d="scan'208";a="40490061" Received: from spandruv-desk.jf.intel.com ([10.54.75.31]) by fmsmga008.fm.intel.com with ESMTP; 16 May 2018 13:59:02 -0700 Message-ID: <1526504342.61700.87.camel@linux.intel.com> Subject: Re: [RFC/RFT] [PATCH 07/10] cpufreq: intel_pstate: HWP boost performance on busy task migrate From: Srinivas Pandruvada To: "Rafael J. Wysocki" 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 Date: Wed, 16 May 2018 13:59:02 -0700 In-Reply-To: References: <20180516044911.28797-1-srinivas.pandruvada@linux.intel.com> <20180516044911.28797-8-srinivas.pandruvada@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.6 (3.24.6-1.fc26) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-05-16 at 11:49 +0200, Rafael J. Wysocki wrote: > 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 > .com> > > --- > > 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(). It is required as we set just set a flag for the new CPU in its cpudata that a task is migrated on it. We update performance on the next tick on local cpu only when the rq utilization is updated to check whether it is worth boosting. Thanks, Srinivas