Re: [PATCH] Documentation/x86: Document resctrl bandwidth control units are MiB

From: Reinette Chatre
Date: Mon Apr 01 2024 - 22:28:10 EST


Hi Tony,

On 4/1/2024 4:03 PM, Luck, Tony wrote:
>> It appears that there is no custom here and it may just be somebody's preference?
>
> Reinette,
>
> Thanks for digging around. I had thought there was general consensus that
> memory was measured in 2^20, storage in 10^6 and networking in either
> 10^6 or 10^9 (but bits rather than bytes.
>
> But, as you've found, there doesn't seem to be to be even that much of
> a custom.
>
> Maybe a case for https://xkcd.com/927/ (since it is April 1st, I propose
> everyone standardize on Teranibbles per fortnight[1] :-) )
>
> But back to the patch. As there is no standard, changing the documentation
> to accurately represent the code looks like a good option.

It is not obvious to me what the right thing is to do. The documentation has
stated since the inception of the software controller that that it accepts
bandwidth in MBps. You demonstrated this is the case but it is not obvious to
me that this is a documentation problem or an issue that needs to
be fixed in the code. I am not familiar with a precedent in this regard.

Changing the documentation does seem like the least controversial approach.
The consequence is that resctrl documentation itself now switches back and
forth between the units ... it uses MiBps for the software controller and
GBps when referring to AMD and talking about memory bandwidth in general
(see section Memory bandwidth Allocation and monitoring). I hope that it
is clear enough that MiBps is just related to the software
controller.

Reinette