Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1779055rwl; Thu, 6 Apr 2023 00:41:56 -0700 (PDT) X-Google-Smtp-Source: AKy350ZbCI2r+SVu9ztB90ws5AhmCv6/UTBZyln2c1x1leDjstgLzqwK7SGl+x8nj1v4LSiJTWQS X-Received: by 2002:a17:90b:1c01:b0:23d:4b01:b27 with SMTP id oc1-20020a17090b1c0100b0023d4b010b27mr10311221pjb.10.1680766916343; Thu, 06 Apr 2023 00:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680766916; cv=none; d=google.com; s=arc-20160816; b=MekUzMUK9JFqddf4PPminLlrVlzah7O+Y1P1GfITSK9gh7NXEMTQwag3VNLMOmQ1tZ ewrsskIxzHpx5eBccgrsXmA/UkbARK6mYAKuc3vz0dZor1B25czjYiqgnqJyIaVRAZ6y Fx/d9gvWqL6tHhhls/JcfO9mXHgd6hD8ETJC/07Ja4uTKC3yF/m/CcSagg+H6hXR3GIl ttxNPtoebD4uSb+B997R5xXy9XCpLEkgfEnUcxY4eOqii1RfcT+NbzQ/45c+pU59TUDy K1JOwYpNRPi5ykER7KoRIR3F8diqPKkd//59xB69hCGvI/6bTrJqUWDHVZZSwS+DdO40 48XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PSTnZvKPii8CuqOLasDZa85RvXeN5qcfEeMj/qPN4AI=; b=GAzXU+lvc9dx3dEtJjGnO7IZ98sBmq0ROipbLELQvRU6Dfr4zHRRoumNK4//4OGGah PjGY0LYCQO+UiRLZUd8A1DN7ZWorAuh3rl202CguM0OSIv5xANz/HbC5uqFtqtC+MfF9 alK3T3vb8NSwqQq/sv9hTKS+R+l0Ht6VxOe153T74pQJOxew/s3GKP/aDY4JDXwzOgFn +pAtzRm8HhEc+CbPlUqNEKL7mGagd6y+fwtHYt75iKzuPyN8jtZEPFuOrtJvHUulnMVc x5SW9A0lcDnha7cNHDfrtsF1C2PVSQLn0Ts/0G8Ny0Ik+Z83GkKO8HMQlSlFnf+ZtXPs JsJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=NS+Rj5XN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020a170902f68700b0019e88376e3csi1226854plg.162.2023.04.06.00.41.44; Thu, 06 Apr 2023 00:41:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=NS+Rj5XN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235411AbjDFHjZ (ORCPT + 99 others); Thu, 6 Apr 2023 03:39:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234846AbjDFHjX (ORCPT ); Thu, 6 Apr 2023 03:39:23 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DD3F76A8; Thu, 6 Apr 2023 00:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=PSTnZvKPii8CuqOLasDZa85RvXeN5qcfEeMj/qPN4AI=; b=NS+Rj5XNebo6MF4JhS2WqHg+pY ILIdptlQ1bk40yfARr2w/c3p1krt6L0pMWX612ksBo1yCxk9YxCWaqf2t7UWlPP1tCrwpnQzKCNd3 cBi2ZFmaJ7k+LwPVX3gYnTYJSIF3tMDHiTVxOXbMEKAhDpOq3v6ZOpOU9kD7sFxxavM5TdWx5S3fd gOJSgcgQM086pSBofRNXZVbJkznDSLzclz5TcbU0TrQy0hMUae0+OQhMcsOIPqKSLyv67cepA8V7m 9Tiogm4Fuxu1w4JrHqEV6JFitpcmTral7U/bnGHxrFZX4jTpKUycTLFmHBUJJZD1SM7/dBCTXlEOZ 0K21+nJQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1pkKCn-00ASbW-0T; Thu, 06 Apr 2023 07:38:49 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 74E9D3000DC; Thu, 6 Apr 2023 09:38:48 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5BAFA24C025F1; Thu, 6 Apr 2023 09:38:48 +0200 (CEST) Date: Thu, 6 Apr 2023 09:38:48 +0200 From: Peter Zijlstra To: Saravana Kannan Cc: David Dai , "Rafael J. Wysocki" , Viresh Kumar , Rob Herring , Krzysztof Kozlowski , Paolo Bonzini , Jonathan Corbet , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , kernel-team@android.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: Re: [RFC PATCH 0/6] Improve VM DVFS and task placement behavior Message-ID: <20230406073848.GC386572@hirez.programming.kicks-ass.net> References: <20230330224348.1006691-1-davidai@google.com> <20230405080548.GW4253@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 05, 2023 at 02:08:43PM -0700, Saravana Kannan wrote: > The only 2 pieces of information shared between host/guest are: > > 1. Host CPU frequency -- this isn't really scheduler internals and > will map nicely to a virtual cpufreq driver. > > 2. A vCPU util value between 0 - 1024 where 1024 corresponds to the > highest performance point across all CPUs (taking freq, arch, etc into > consideration). Yes, this currently matches how the run queue util is > tracked, but we can document the interface as "percentage of max > performance capability", but representing it as 0 - 1024 instead of > 0-100. That way, even if the scheduler changes how it tracks util in > the future, we can still keep this interface between guest/host and > map it appropriately on the host end. > > In either case, we could even have a Windows guest where they might > track vCPU utilization differently and still have this work with the > Linux host with this interface. > > Does that sound reasonable to you? Yeah, I suppose that's managable. Something that wasn't initially clear to me; all this hard assumes a 1:1 vCPU:CPU relation, right? Which isn't typical in virt land.