diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2023-09-27 16:38:37 +0300 |
---|---|---|
committer | Maxime Ripard <mripard@kernel.org> | 2023-11-06 13:44:34 +0300 |
commit | 5faf6e1853d30d113ebc9977e015d0152e5e1970 (patch) | |
tree | f3d818b0010fa107d538ca4da4eb375cffebd0ce /usr/include | |
parent | f12af4c461fb6cd5ed7b48f8b4d09b22eb19fcc5 (diff) | |
download | linux-5faf6e1853d30d113ebc9977e015d0152e5e1970.tar.xz |
drm: Do not round to megabytes for greater than 1MiB sizes in fdinfo stats
It is better not to lose precision and not revert to 1 MiB size
granularity for every size greater than 1 MiB.
Sizes in KiB should not be so troublesome to read (and in fact machine
parsing is I expect the norm here), they align with other api like
/proc/meminfo, and they allow writing tests for the interface without
having to embed drm.ko implementation knowledge into them. (Like knowing
that minimum buffer size one can use for successful verification has to be
1MiB aligned, and on top account for any pre-existing memory utilisation
outside of driver's control.)
But probably even more importantly I think that it is just better to show
the accurate sizes and not arbitrary lose precision for a little bit of a
stretched use case of eyeballing fdinfo text directly.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Adrián Larumbe <adrian.larumbe@collabora.com>
Cc: steven.price@arm.com
Reviewed-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20230927133843.247957-2-tvrtko.ursulin@linux.intel.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'usr/include')
0 files changed, 0 insertions, 0 deletions