fs/resctrl: Resolve "domid" truncation issue
The "mon_data_bits" structure contains bit-fields for storing the
resource id (rid), event id (evtid), and domain id (domid). This
structure is utilized during the creation and access of monitor files.
Currently, the "domid" field is 14 bits wide. The interpretation of
"domid" is architecture-dependent. On arm64, the domain id can have
different meanings for different resources. For instance, in the case of
memory, it may indicate the proximity domain ranging from 0, increasing
sequentially, and always fitting within 14 bits. On the other hand, for
processor caches, it corresponds to the cache id, which can be any
32-bit value. Exceeding the 14-bit limit can lead to access errors.
An example of the failed access:
cat /sys/fs/resctrl/mon_data/mon_L3_1048564/llc_occupancy:
No such file or directory
The access failure occurs due to the utilization of a truncated domid
when fetching the domain. To address this, increase the width of domid
to 32 bits. It is noteworthy that the domain id for certain arm64
resources can extend up to 64 bits. However, since rdt_domain's id is
still 32 bits, the domid is capped at 32 bits. The rid and evtid fields
are allocated 16 bits each since they appear to remain within the 16-bit
range according to the current design.
Signed-off-by:
Rohit Mathew <Rohit.Mathew@arm.com>
Loading
Please register or sign in to comment