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] [thread-next>] [day] [month] [year] [list]
Message-ID: <f4a42eb0-9379-74d-e765-fe37a8aa12d@linux.intel.com>
Date:   Thu, 14 Dec 2023 12:25:18 +0200 (EET)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     Reinette Chatre <reinette.chatre@...el.com>
cc:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        linux-kselftest@...r.kernel.org, Shuah Khan <shuah@...nel.org>,
        Shaopeng Tan <tan.shaopeng@...fujitsu.com>,
        Maciej Wieczór-Retman 
        <maciej.wieczor-retman@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 23/29] selftests/resctrl: Restore the CPU affinity
 after CAT test

On Wed, 13 Dec 2023, Reinette Chatre wrote:
> On 12/11/2023 4:18 AM, Ilpo Järvinen wrote:
> > CAT test does not reset the CPU affinity after the benchmark.
> > This is relatively harmless as is because CAT test is the last
> > benchmark to run, however, more tests may be added later.
> > 
> > Store the CPU affinity the first time taskset_benchmark() is run and
> > add taskset_restore() which the test can call to reset the CPU mask to
> > its original value.
> > 
> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
> > ---

> > +/*
> > + * taskset_restore - Taskset PID to the earlier CPU affinity
> > + * @bm_pid:		PID that should be reset
> > + * @old_affinity:	The old CPU affinity to restore
> > + *
> > + * Return: 0 on success, < 0 on error.
> > + */
> > +int taskset_restore(pid_t bm_pid, cpu_set_t *old_affinity)
> > +{
> > +	if (sched_setaffinity(bm_pid, sizeof(*old_affinity), old_affinity)) {
> > +		ksft_perror("Unable to restore taskset");
> 
> This message is not clear to me. How about "Unable to restore CPU affinity"?

Okay, I can change that. I actually was on the edge what to with these 
because I was just trying to be consistent with the existing error message 
in taskset_benchmark(). I reasoned that because "taskset" is the userspace 
tool which the user might be familiar the original idea of using 
"taskset" might be helpful.

And now rereading what I wrote in that message, "restore taskset" does not 
sound very sensical grammarwise. :-)

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ