Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4394877pxb; Tue, 26 Jan 2021 22:10:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhGqayhIBER+xy8XlIzsFRJ7XT4XH27kFStWIQYSMkhMPjvjyDTQty8Gf7uElyZTTipDat X-Received: by 2002:a17:906:b74f:: with SMTP id fx15mr5533145ejb.257.1611727859348; Tue, 26 Jan 2021 22:10:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611727859; cv=none; d=google.com; s=arc-20160816; b=YnG3dEgvyZpWQ3kgrIHE9F0g5tJdvEkyQoToMCbqgUNMGw00tR2/6huiGQ/edqtdAN zr3MkD6B/oJaervHTOuTOeZ3uUxVsd5mFigPfGXg9Bt1yMNsuFpfLfEYYY5X+uc87kiH fW8eoIvGP96K6MRP4nyDOsm/EDmQQtVxUh1xbdXH3XvHURUWAQekRDWz/KxJnxTawjcQ dN4yvTpbmzSpnrUq1aKx53Nv00ruDD9tFa3UTHZokGuMElZuSVA8sVjGkSE4s8mAoCUj OkRj3gUcHLw74eLRjqfsgsbHQgZ7Bg2dzTrU0Fpk+UpNJIgT4q3pEbEgHT1lNsuOs2Cg QLXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=6LMIOLV2A7XkU0V8kTMneSWXDyL8jZfzZj3x7VBzEz0=; b=iRPyk7BhpOaBdVBJvk00ZqVlC3yHbxfLOU9bmnvUiGY1QyhlTfzbDCqEzxhXyKhAXg vVYP+8qe91K9KxaPp6RlECcWGD1bhohz8RVnDblsAZ3NRMrP79KzPI0uGgebrRCSuhNx C51g+K+wVaU1e4qtj0iqPRuBh7ZLpgM1Y19BJ2/q8SAfw8AutBwQ0Xy4sKLWFTufRNtI 8avnt71lohaC2aaslHarRRP1HvOyRcmNcBEo9GYD2OCP1b18ovAq4qISsVyCMgJpRLiU fK6URS3p7K3vcrcGgvqwnrLxL5dJDsHAHQKkyEti6PA/9ACll11iZveoJvudZPilIAuG oW/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k11si407770ejp.611.2021.01.26.22.10.35; Tue, 26 Jan 2021 22:10:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391735AbhAZSEB (ORCPT + 99 others); Tue, 26 Jan 2021 13:04:01 -0500 Received: from mx2.suse.de ([195.135.220.15]:48038 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390906AbhAZJKO (ORCPT ); Tue, 26 Jan 2021 04:10:14 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 57DE5B254; Tue, 26 Jan 2021 09:09:28 +0000 (UTC) Message-ID: <1611652167.11983.65.camel@suse.cz> Subject: Re: [PATCH v2 1/1] x86,sched: On AMD EPYC set freq_max = max_boost in schedutil invariant formula From: Giovanni Gherdovich To: Peter Zijlstra Cc: Borislav Petkov , Ingo Molnar , "Rafael J . Wysocki" , Viresh Kumar , Jon Grimm , Nathan Fontenot , Yazen Ghannam , Thomas Lendacky , Suthikulpanit Suravee , Mel Gorman , Pu Wen , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Michael Larabel , x86@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Date: Tue, 26 Jan 2021 10:09:27 +0100 In-Reply-To: References: <20210122204038.3238-1-ggherdovich@suse.cz> <20210122204038.3238-2-ggherdovich@suse.cz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2021-01-25 at 11:06 +0100, Peter Zijlstra wrote: > On Fri, Jan 22, 2021 at 09:40:38PM +0100, Giovanni Gherdovich wrote: > > 1. PROBLEM DESCRIPTION (over-utilization and schedutil) > > > > The problem happens on CPU-bound workloads spanning a large number of cores. > > In this case schedutil won't select the maximum P-State. Actually, it's > > likely that it will select the minimum one. > > > > A CPU-bound workload puts the machine in a state generally called > > "over-utilization": an increase in CPU speed doesn't result in an increase of > > capacity. The fraction of time tasks spend on CPU becomes constant regardless > > of clock frequency (the tasks eat whatever we throw at them), and the PELT > > invariant util goes up and down with the frequency (i.e. it's not invariant > > anymore). > > v5.10 v5.11-rc4 > > ~~~~~~~~~~~~~~~~~~~~~~~~ > > CPU activity (mpstat) 80-90% 80-90% > > schedutil requests (tracepoint) always P0 mostly P2 > > CPU frequency (HW feedback) ~2.2 GHz ~1.5 GHz > > PELT root rq util (tracepoint) ~825 ~450 > > > > mpstat shows that the workload is CPU-bound and usage doesn't change with > > So I'm having trouble with calling a 80%-90% workload CPU bound, because > clearly there's a ton of idle time. Yes you're right. There is considerable idle time and calling it CPU-bound is a bit of a stretch. Yet I don't think I'm completely off the mark. The busy time is the same with the machine running at 1.5 GHz and at 2.2 GHz (it just takes longer to finish). To me it seems like the CPU is the bottleneck, with some overhead on top. I will confirm what causes the idle time. Giovanni