On Tue, 28 May 2024, Reinette Chatre wrote:
On 5/28/24 3:19 AM, Ilpo Järvinen wrote:
On Fri, 24 May 2024, Ilpo Järvinen wrote:
On Fri, 24 May 2024, Reinette Chatre wrote:
On 5/24/24 12:57 AM, Ilpo Järvinen wrote:
On Thu, 23 May 2024, Reinette Chatre wrote:
It is not necessary to open and close the file every time a value needs
to be read from it.
I'm bit unsure where to go with this. While I could change the code to
match what you described, I realized with the two files approach there's
no need to do even review/lseek() call during the measurement. It might
not be very significant compared with the open that was there initially
but it's still extra.
We are discussing the resctrl selftests that will accompany the resctrl
filesystem in the kernel. When in doubt on how to interact with resctrl users
use the selftests as reference. Needing to open and close a resctrl file
every time a value needs to be read from it is not the correct guidance.
That's actually a different goal from the earlier, but I've no problem
adjusting to it.
Initially, this open/close() refactoring was made because of another goal
which was to avoid doing extra syscalls during the test.