[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56a93ec2-dc01-49be-b917-5134f5794062@intel.com>
Date: Thu, 28 Mar 2024 18:01:33 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Tony Luck <tony.luck@...el.com>, <linux-doc@...r.kernel.org>
CC: Fenghua Yu <fenghua.yu@...el.com>, Peter Newman <peternewman@...gle.com>,
James Morse <james.morse@....com>, Babu Moger <babu.moger@....com>, "Drew
Fustini" <dfustini@...libre.com>, <x86@...nel.org>,
<linux-kernel@...r.kernel.org>, <patches@...ts.linux.dev>
Subject: Re: [PATCH] Documentation/x86: Document resctrl bandwidth control
units are MiB
Hi Tony,
On 3/22/2024 11:20 AM, Tony Luck wrote:
> The memory bandwidth software controller uses 2^20 units rather than
> 10^6. See mbm_bw_count() which computes bandwidth using the "SZ_1M"
> Linux define for 0x00100000.
>
> Update the documentation to use MiB when describing this feature.
> It's too late to fix the mount option "mba_MBps" as that is now an
> established user interface.
I see that this is merged already but I do not think this is correct.
Shouldn't the implementation be fixed instead? Looking at the implementation
the intent appears to be clear that the goal is to have bandwidth be
MBps .... that is when looking from documentation to the define
(MBA_MAX_MBPS) to the comments of the function you reference above
mbm_bw_count(). For example, "...and delta bandwidth in MBps ..."
and "...maintain values in MBps..."
To me this change creates significant confusion since it now contradicts
with the source code and comments I reference above. Not to mention the
discrepancy with user documentation.
If you believe that this should be MiB then should the
source and comments not also be changed to reflect that? Or alternatively,
why not just fix mbm_bw_count() to support the documentation and what
it appears to be intended to do. If users have been using the interface
expecting MBps then this seems more like a needed bugfix than
a needed documentation change.
Finally, if you make documentation changes, please do build the
documentation afterwards. This change introduces a warning:
Memory bandwidth Allocation specified in MiBps
---------------------------------------------
../linux/Documentation/arch/x86/resctrl.rst:583: WARNING: Title underline too short.
Reinette
Powered by blists - more mailing lists