Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2314323imm; Wed, 16 May 2018 10:56:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoSvwI8XDlr7mSgZxdfS2GtkeyN9iX1VNUHaQHaC1KRonEMe+oQyAU4Je2H4hAAka+xit7j X-Received: by 2002:a17:902:9048:: with SMTP id w8-v6mr1920332plz.34.1526493406498; Wed, 16 May 2018 10:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526493406; cv=none; d=google.com; s=arc-20160816; b=RP5pHDouGlMVUrJvX0Z/B/P2TyokoMIkKbxFI+i2IoX9v03mpwBO3FcPOLK0iG1RRX KUoBTiOJhdO6WYPykn/xCETT034RrZOnWBwaAbQjV90aLs6xvjxknZUNOo+/+QrTv1Pc KVRxhARNTSzBIsVQhRtQnhcvulZiL0RmPaPUQaMNaEeHCFvJ7YE/pYIC9v+734b8GJMK tWCN0tCAKV02D/246ZwpC14TAG7bXXNQUR5TqEUdr1ceF8OdE8TJuws7yMZpqIPCDoUW Uw+2STr5w0Lx24i+IjoetQsh8ZdJCvQhM/M46y7SYLXxqQ+Xs2xb23OmYH4DrbVjj2nv c9QQ== 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=uFDGSx2zHRzEQHleNTlV7syOlR6Am2MDzpxQG2ejIHI=; b=KiEc7SVGzw8x35JXcuglVzm4EcSSyabKsFW26HTj7ED0CXk052c+qShGiu/Qr1zF73 YzvDRK97TBXlyflOdNCFuUVoo5CXYfFOsxHwo3tqh2mUkIFW0u9H4OIfXjX98CLMG3q9 zhUJAPso2mLoW04prC4+WnLuDWmT14VkCAVFT8Zpy1crO0pkfpSOF8VCid5rh75paoUX 4SgEBr2KgewH/Z7zzteEC7IfherlL9XwFhqYNzWNd34Dx9MFjUnSbryqzTS/qox0INkX 87wpQppHcnIJpKQP8zUoTDQr2xBhRVIvMGDRTbtGzNc77/jSEM1ZLUgoQCb/3TzwZv8t fOEg== 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 bc11-v6si2956307plb.544.2018.05.16.10.56.31; Wed, 16 May 2018 10:56:46 -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 S1751916AbeEPRzP (ORCPT + 99 others); Wed, 16 May 2018 13:55:15 -0400 Received: from mga07.intel.com ([134.134.136.100]:46060 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751096AbeEPRzO (ORCPT ); Wed, 16 May 2018 13:55:14 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 May 2018 10:55:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,406,1520924400"; d="scan'208";a="199913834" Received: from spandruv-desk.jf.intel.com ([10.54.75.31]) by orsmga004.jf.intel.com with ESMTP; 16 May 2018 10:55:13 -0700 Message-ID: <1526493313.61700.61.camel@linux.intel.com> Subject: Re: [RFC/RFT] [PATCH 05/10] cpufreq: intel_pstate: HWP boost performance on IO Wake From: Srinivas Pandruvada To: Peter Zijlstra Cc: tglx@linutronix.de, mingo@redhat.com, bp@suse.de, lenb@kernel.org, rjw@rjwysocki.net, mgorman@techsingularity.net, x86@kernel.org, linux-pm@vger.kernel.org, viresh.kumar@linaro.org, juri.lelli@arm.com, linux-kernel@vger.kernel.org Date: Wed, 16 May 2018 10:55:13 -0700 In-Reply-To: <20180516073701.GW12217@hirez.programming.kicks-ass.net> References: <20180516044911.28797-1-srinivas.pandruvada@linux.intel.com> <20180516044911.28797-6-srinivas.pandruvada@linux.intel.com> <20180516073701.GW12217@hirez.programming.kicks-ass.net> 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 09:37 +0200, Peter Zijlstra wrote: > On Tue, May 15, 2018 at 09:49:06PM -0700, Srinivas Pandruvada wrote: [...] > > @@ -258,6 +261,8 @@ struct cpudata { > > s16 epp_saved; > > u64 hwp_req_cached; > > call_single_data_t csd; > > + bool hwp_boost_active; > > + u64 last_io_update; > > This structure has abysmal layout; you should look at that. > Also, mandatory complaint about using _Bool in composites. > I will take care about this in next version. [...] > > +/* Default: This will roughly around P1 on SKX */ > > +#define BOOST_PSTATE_THRESHOLD (SCHED_CAPACITY_SCALE / 2) > > Yuck.. why the need to hardcode this? Can't you simply read the P1 > value > for the part at hand? Done later in the series. So need to reorder. [..] > + if (cpu->iowait_boost) { > > + cpu->hwp_boost_active = true; > > + if (smp_processor_id() == cpu->cpu) > > + intel_pstate_hwp_boost_up(cpu); > > + else > > + smp_call_function_single_async(cpu->cpu, > > &cpu->csd); > > + } > > } > > Hurmph, this looks like you're starting to duplicate the schedutil > iowait logic. Why didn't you copy the gradual boosting thing? I tried what we implemented in intel_pstate in legacy mode, which gave the best performance for servers (ramp up faster and slow ramp down). This caused regression on some workloads, as each time we can call HWP_REQUEST, we spend 1200+ cycles in issuing MSR. So keeping it at max for timeout. Even keeping at P1 didn't help in power numbers.