From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3AEE7301474 for ; Thu, 18 Jun 2026 15:23:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781796234; cv=none; b=tusS//gM6yqvXs1q8osgIUK3Qz8hRlIGeaYYiIbCpVVuiADL5e3oreoiFr3xf5Vic0JCaC7cq9kilz3qBVH8XlzOvWxuRAMlJdgNLurbgECtcTazaMWBcp9jHb1rzzZk91RW3FfGsGrtBkZiAfv2IPfQtRpsrSSVg2g3Q8F9Xac= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781796234; c=relaxed/simple; bh=mfo2nNVlU3eqMt+gVfQt4jB8xwDnCElPo6ZYaSV7Ar8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ny0ioqjWR2iYERjFumoy3nNJguBiN03GgDbVP3cOO1Jy0FkdpdKpTctzsts21B+Mc+U2Te2b7LPvivfZheCxUtlYTIrZDsm8y2EXptxn85MgvQWt1P0AIRZGERlE3cD5XvIgeXnwF3ixxXb72FnGpA+qNHs6YuW1zqxSvawD4/E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Y5L+0wbN; arc=none smtp.client-ip=209.85.167.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Y5L+0wbN" Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-486539875c1so443769b6e.0 for ; Thu, 18 Jun 2026 08:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1781796232; x=1782401032; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=K6B/IbNdF7W08THyMkolQP5SVZHowNzPQFBoYdQdeI0=; b=Y5L+0wbN19tRlEd+Lbm1VVAt5fzTSgeKF0r6RfFa7UZxq0TlM6zU1e0uad33clNCUk Y8FvYy9L4V4K55nYu33gGRTOjDwks4ce7q5GZJRe5gDwyxxbiXXsYGw8z3klxQyXSk1e RXQVzyBukBy8qR2NgZuRN2LCz2nLU61h6g7us= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781796232; x=1782401032; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=K6B/IbNdF7W08THyMkolQP5SVZHowNzPQFBoYdQdeI0=; b=J6dtSczqVMNUA1a/e4Z0UFuBC+kMD29V9Ac2tALwgjlC7+LBdxKQp9PoJZ5qBjEeGA nn2zs5HTLSxSJ/q83eblX+IMN0d4XaaGe9rOL447FdL2wB40jIk/pT2DrFBXUI+u74Ph U8MogVQACEMML1eeab4sRdED7FpzMzjOmyLcWRrbxJeO63HQkbFf08n3/DvmNi+uNYSr i5Aa0HHrljdNZ/pzlhS2gMSb6Y8BrALz9FGFbdD0nSAWBbP2lfeR50M/qLI5e+tRQJrS hpDBlj9iyZyDXH70xRSnPmpR//K+rZUgHmAzP8u03T8hggqVWijW7cB6qpRYBmhVXBIK leZw== X-Gm-Message-State: AOJu0Yx5tz7Fs5WgeCpN6uhZKZIEcPmm+m2V+MIxpK6KOd+P85jyBoNT 4YoxkRqCOMzndQkPOpMbxbTz5QSFeqH5+jjzdhFLLZROrlhFeQ2qqzPQ4poCCg4DU6I= X-Gm-Gg: Acq92OG9mUHuI/PWARmOR8Jzl+ZyRa5kbMsZyZbPrrV4cxbnW4mO8o+XhJWl88vjB1D cu+ssgDZWVclxeR6CV7pnLyd87ugPTg7s80UNfBk32GwFSj42g11P9TR2NCagz0SFzGMGXcGlo5 xpG0L3hM1pYxzOeIX5JAWtDb6uGR4LsSIxu6/0SPEc+Pid1bOpeoNixS98yV9vJ+7Jnl1wMGOTS U/mHcJKNKlDtBQOadqp/BlV0XjukFTpmUjhs6UYU6nQ/GEolKWRp5zEfijU5/55ultvrSmN25W3 qYKK+ZSH4JFMVCxQIstAyxusgj0TDhoh+08FSdG/jNpj2vldvDcZCFaHaz5r0Kz4UHGpZGxFv3o FG/DhMfP3huWS5dpCfN5CQYPQ02y+6nlkNfaQXqoI403pX9pSrSL30i0qwhV36X4mi1YRzrzDsr S0epiYYnn8kXKS2NCVI4jej/UWDb4UUS0= X-Received: by 2002:a05:6808:308d:b0:487:4f98:f379 with SMTP id 5614622812f47-489572495d7mr3493352b6e.36.1781796231961; Thu, 18 Jun 2026 08:23:51 -0700 (PDT) Received: from [192.168.1.14] ([38.15.57.99]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7e79f6b7e6csm11706074a34.17.2026.06.18.08.23.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Jun 2026 08:23:50 -0700 (PDT) Message-ID: Date: Thu, 18 Jun 2026 09:23:49 -0600 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: [PATCH v4] cpupower: Implement powercap enabled setters To: =?UTF-8?Q?Mateusz_Ja=C5=9Bkiewicz?= , "John B . Wyatt IV" , John Kacur , Thomas Renninger Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Shuah Khan References: <5ff19049-a83a-4ef9-9cae-b97438fb3e77@linuxfoundation.org> <20260528153248.4114324-1-jaskiewiczteo@gmail.com> <9e4994be-008d-4c0b-9bb0-1ff782ad00f5@linuxfoundation.org> Content-Language: en-US From: Shuah Khan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 6/17/26 22:18, Mateusz Jaƛkiewicz wrote: > > So when you tried to write it worked looks like. The new > Please follow the kernel mailing list convention of posting at the bottom of the message you are replying you instead adding your response at the top. You can find the details in the kernel documentation. > What I meant by "silent failure" is the situation, when we call a function and it just returns success without doing anything (the situation with current implementation). > > > > value is 1 - what was it before you ran echo 1? > > It was 0 before. That being said there are zones that after writing 0 to them remained 1. Should I add check for this and fail if the value remains unchanged despite intention? Okay so in this case it worked the way it should and the value changed. When writing 0 (echo 0) to the file, did you see a message that says "not supported" I would like to see an concrete use-case for adding the set enable API. We added this stub when SWIG support was added. powercap_set_enabled() could return ENOTSUPP instead of 0 if we don't have a concrete use-case that uses this API. Also if you are looking to improve things cpupower, looks like sysfs_read_file() could be improved. The return values are inconsistent and confusing. In some return values aren't checked. thanks, -- Shuah