Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp252840rdb; Tue, 5 Dec 2023 04:43:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IHiDpvxGBHKxhOVUufyBv1/xDe8ESwT3EaC0LlTqB2/tU3Cmm+e9YUE3gTR1vnsTO24a0Ai X-Received: by 2002:a05:6a20:160d:b0:138:2fb8:6c48 with SMTP id l13-20020a056a20160d00b001382fb86c48mr4048801pzj.8.1701780217901; Tue, 05 Dec 2023 04:43:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701780217; cv=none; d=google.com; s=arc-20160816; b=gARbCor+52D7+LcKLDzhUXuUm15PtTuAd5UdkFCGUT2eZQZX/ql3j7Qotxe5xKN6AV 444sxjBLKxAbQeTJzb1m/m5Dv1wWZzBJV5BpC7LKrqsirgWEgWj5Ay1YIV/5WNdvxeiE NeslPZprW8SJ+GERa5ddyrzjEgfNHkSqv1QD79xWeI1EEp5A0iHZqQieRo64IciuoJJB LsGevRrxl8iHbR4XJoFV8mMbpJUyUE43Hcm8GIYb0cbcG80JZ+HSOxzIUYtbyVwvb20N 3qCg8t4KniyB7r65StGo6I23uwbwZnTCBsiq2E2pBtMv26ENUMd49e4QY6MhzDMBaG5h RgNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=5o7BD26l9hkZy8yvLgdq0nRBUd4uZCUMfxDrZc/GRxk=; fh=ETS5o/r4qM4bBSCto4uUh6ibyc0shFPfUk0QO2GeP68=; b=xkN0UWhCvv1X0eX/EW5EusQTHC1qCWhJzE/lie8spYSzIMeafxnpXQSEKNVqovt1hW xoHMxZ3mC4Lndh+fnpDhIdKasc8uZVd22fJ6ZgpZEZiKTUk/MZ95bwkklnXptVEUSHcl naj2s/d85fhU7jQLiv1Pl5VynpHxQdCRqfNGuh8ttcgrIlL+6TwPDklen3lOVKPUruva dF6MrgAWIl+kaOmdPb1kQAPGJIj6mjOpbrACYTjE8lWneW5IGmX7ddtm6VG6l7d4mTyA SRYegB5qB/gc9AQie+26/pd+6YoOxlX6IBxUQsG4NOm3lkNt63HUSFPFtl5UEIfc65iG Q9ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id f15-20020a056a00228f00b006cb68d849afsi716096pfe.280.2023.12.05.04.43.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 04:43:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 7719C805E50C; Tue, 5 Dec 2023 04:43:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232019AbjLEMnV convert rfc822-to-8bit (ORCPT + 99 others); Tue, 5 Dec 2023 07:43:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231873AbjLEMnU (ORCPT ); Tue, 5 Dec 2023 07:43:20 -0500 Received: from mail-oa1-f45.google.com (mail-oa1-f45.google.com [209.85.160.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91215C6 for ; Tue, 5 Dec 2023 04:43:27 -0800 (PST) Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-1fae54afb66so508065fac.1 for ; Tue, 05 Dec 2023 04:43:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701780207; x=1702385007; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JGsDskLbtr8yeU+Ls6PXtLcKmUVWMqdHJkv5ZXnV+Lo=; b=j+u8yf3i/GNAvVgTJqeKsi99HosiZN/rKPaN5mkttIiL5usLT8/GP9jMghDWF5khJr dD8zZ+Uz7ewoKow1oWiZk1Zt/ey9UNrh2k636Ei8dmeeSqDKkSMsvt3re4W1XjMdcZNn vpHIpHIluXwwwHeLEwQMdYhg7uu5KHVcyrzTcg0Uky+YtsZFwUIqy72NssDsX/ozb52L e3C73UDcU7UAPi85CcRgprxk4ozE+L9G0w/x2clDRI4Q7fZz+dPKVelEB/DosYu34gN6 2hXVj2oMmYn7uKl7IUW+CAaFRW0f9dkw4/H6E0tAaGMkl1IrLLH23ZDuqmqYclxc5cPV Vi6Q== X-Gm-Message-State: AOJu0YxonsEThOkYRfB688esz5VqTksKLIHc4f2mC10t+HAtA11woMPp AFTn3TtuFCOFKM+2A5yMD7eotipA9M+2qHlVyXQ= X-Received: by 2002:a05:6870:6490:b0:1fa:f0ee:ba9c with SMTP id cz16-20020a056870649000b001faf0eeba9cmr13670250oab.2.1701780206786; Tue, 05 Dec 2023 04:43:26 -0800 (PST) MIME-Version: 1.0 References: <53bce76c5c60463eba1372df426a64b9@amazon.co.uk> <1D71D218-5EB6-47DE-A01B-3A66F9F4C74E@infradead.org> <5322CF05-344D-4ADE-B38C-7DCE7F076E0C@infradead.org> <35268BBA-E97F-4ACB-A1C1-04C94AFDEA65@infradead.org> In-Reply-To: <35268BBA-E97F-4ACB-A1C1-04C94AFDEA65@infradead.org> From: "Rafael J. Wysocki" Date: Tue, 5 Dec 2023 13:43:15 +0100 Message-ID: Subject: Re: [PATCH] x86: intel_epb: Add earlyparam option to keep bias at performance To: David Woodhouse Cc: "Rafael J. Wysocki" , pdurrant@amazon.co.uk, bp@alien8.de, dave.hansen@intel.com, dave.hansen@linux.intel.com, hdegoede@redhat.com, hpa@zytor.com, jalliste@amazon.co.uk, juew@amazon.com, len.brown@intel.com, linux-kernel@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, rafael.j.wysocki@intel.com, tglx@linutronix.de, usama.arif@bytedance.com, x86@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 05 Dec 2023 04:43:35 -0800 (PST) On Tue, Dec 5, 2023 at 1:32 PM David Woodhouse wrote: > > On 5 December 2023 12:31:19 GMT, "Rafael J. Wysocki" wrote: > >On Tue, Dec 5, 2023 at 1:15 PM David Woodhouse wrote: > >> > >> On 5 December 2023 12:12:09 GMT, "Rafael J. Wysocki" wrote: > >> >On Tue, Dec 5, 2023 at 1:00 PM David Woodhouse wrote: > >> >> > >> >> > >> >> Paul writes: > >> >> > The problem is that this will take effect even on a kexec and hence it is throttling > >> >> > a system that set ENERGY_PERF_BIAS_PERFORMANCE prior to the kexec. We use kexec to > >> >> > live update the host kernel of our systems whilst leaving virtual machines running. > >> >> > This resetting of the perf bias is having a very detrimental effect on the downtime > >> >> > of our systems across the live update - about a 7 fold increase. > >> >> > >> >> It isn't just about kexec, is it? Even in a clean boot why wouldn't we want to stay in performance mode until the kernel has *finished* booting? > >> > > >> >Because it may overheat during that period. > >> > > >> >> It's literally adding seconds to the startup time in some cases. > >> >> > >> >> And yes, we *particularly* care in the kexec case because guests experience it as excessive steal time. But it ain't great in the general case either, surely? > >> > > >> >So IMV it would be perfectly fine to add a command line arg to provide > >> >the initial value of energy_perf_bias for the ones who know what they > >> >are doing. > >> > >> We don't even care about setting it to an "initial value" during boot. We just want to leave it how it was already set up. > > > >Which does not work on some systems. > > > >The problem here is that the BIOS cannot be trusted to set the initial > >value that makes sense for the given platform and that's why the code > >is the way it is. > > Yeah, I understand why we have the existing hack. We just need a way to disable it when it's doing the wrong thing. Fair enough. So the patch as is makes sense, but I would change the name of the command line switch to something like intel_epb_no_override.