lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <23188ca6-2de8-3998-c73f-41939a964754@linux.intel.com>
Date: Fri, 31 May 2024 15:51:44 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Reinette Chatre <reinette.chatre@...el.com>
cc: linux-kselftest@...r.kernel.org, Shuah Khan <shuah@...nel.org>, 
    Babu Moger <babu.moger@....com>, 
    Maciej Wieczór-Retman <maciej.wieczor-retman@...el.com>, 
    LKML <linux-kernel@...r.kernel.org>, Fenghua Yu <fenghua.yu@...el.com>, 
    Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v4 02/16] selftests/resctrl: Calculate resctrl FS derived
 mem bw over sleep(1) only

On Thu, 30 May 2024, Reinette Chatre wrote:

> Hi Ilpo,
> 
> On 5/30/24 4:11 AM, Ilpo Järvinen wrote:
> > 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.
> > 
> 
> It is not clear what you hint at here. Reading twice from an open file
> should not be a huge adjustment so it is not clear to me how this results
> in a big change to this work. As I understand this does match with original
> goal
> of reducing syscalls since the file need not be opened and closed twice.

What I tried to say is that with a single file, the test uses rewind() 
that also needs to do a syscall within the test period, whereas if the 
file is opened twice in advance rewind() won't be needed.

But I've converted it into single file for the sake of serving as an 
example for other resctrl users.

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ