From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76FF24A24; Thu, 26 Sep 2024 18:53:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727376836; cv=none; b=PoyX9O/LRB7VwPUt8046aHsSVR+wYMTCFd18/kKkkzWF/8txyjHB6zknzvshrXgLnNbTBZdwoKaY7NVQ6gNYametp+TfBdSYkxXJ8MG19i901/ypi0M9U+LrZaGAi3oDoaWuuswfp4e8vM26kxBBoTnBPjWnBeLtMArm/snAMgk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727376836; c=relaxed/simple; bh=GjhL1DklTV864soyZ8shLVXWedXxRjEAjQPHytr+Lbo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sbBQ8pq0sV1SbdBoXKTxBNp6Xa8uHgIgCNOnRFAAMdZlgEcrptk4S5qg+xPbby9r3pRsTCb18cpwoTzNvJBuxaBK/Aya056FETTnUO1yapBKpYrVv5SJD7WC4rHSL4fJLpKbbkAx+80Nx192RUHStwErI+D9wgPLIJaW7vMdf64= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sh53+aA1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sh53+aA1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E045BC4CEC5; Thu, 26 Sep 2024 18:53:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727376836; bh=GjhL1DklTV864soyZ8shLVXWedXxRjEAjQPHytr+Lbo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=sh53+aA1D1BqJffmLPj4DE6Owxvt0S/63gofJfCX+OeUUvXxpSzouXFynWYc40VpK yqClJngTiWkPsB6KY5b0MteWFr2HTx2Ttlz8nD7v46QzXzNs1zoAJ0H2WcA8xbWsuL /Rz3+gVN89XQuU5Sc6HfpfymBDUpY56efS6qKXuAqib6wuyzPANQx63L8pqFTzMxuY lUbXOzSBpUhcktsAAWE07Ru19xMS444WsWa+NStGiGzz6fbkDPJLjBoaTssOLKdD+P ygVHyRdFX+6tSQ32iLrapXRVRTWprRuMrowsfYMnMHqaHSdKFjHyDqAthr9RdkpLeR w/e9ehEAUh/sA== Message-ID: Date: Thu, 26 Sep 2024 13:53:54 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC 2/2] platform/x86/amd: pmf: Add manual control support To: Antheas Kapenekakis Cc: Shyam Sundar S K , "Rafael J . Wysocki" , Hans de Goede , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , "Luke D . Jones" , Mark Pearson , "open list:AMD PMF DRIVER" , open list , "open list:ACPI" , "Derek J . Clark" , me@kylegospodneti.ch, Denis Benato , Mario Limonciello References: <20240926025955.1728766-1-superm1@kernel.org> <20240926025955.1728766-3-superm1@kernel.org> Content-Language: en-US From: Mario Limonciello In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/26/2024 03:52, Antheas Kapenekakis wrote: > Hi Mario, > > It is fine to require a module parameter for turning on custom profiles. > > However, distributions such as Bazzite use per-device kernel > parameters, which, while user accessible, will not be modified by the > user for 95% of use-cases. In fact, the Bazzite update system manages > the kernel parameters of devices automatically. > > What this would mean in practice is that for devices where this custom > control may be used, the module parameter will be set globally for all > of them and taint their kernels. > > Instead, only taint the kernel when entering custom mode. If combined > with something such as `custom_mode_choices`, only taint the kernel if > `amd-pmf-user` is selected after that. Yeah if we continue down a variation of this direction that is a sensible change to push the taint down to only when in it's actually been used, not just when the module parameter is set. > >> +{ >> + add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK); >> + pr_crit("Manual PMF control is enabled, please disable it before " >> + "reporting any bugs unrelated to PMF.\n"); >> +} > > "Manual PMF control is enabled. If the device supports other ways of > thermal management, please use those before reporting any bugs > unrelated to PMF. If not, only if setting TDP is required for testing > (e.g., under load in specific thermal conditions), proceed with the > understanding that this module may cause interference, especially with > the amd-gpu driver, the suspend process, and, if the parameters are > out of spec, general stability of the system." > > Antheas