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: <43fa8874-a563-3f6e-35be-a30a6ac0e25c@canonical.com>
Date:   Wed, 5 Aug 2020 09:48:44 +0100
From:   Colin Ian King <colin.king@...onical.com>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>,
        netdev@...r.kernel.org
Cc:     davem@...emloft.net, eric.dumazet@...il.com,
        Willem de Bruijn <willemb@...gle.com>
Subject: ACK: [PATCH net] selftests/net: relax cpu affinity requirement in
 msg_zerocopy test

On 05/08/2020 09:40, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@...gle.com>
> 
> The msg_zerocopy test pins the sender and receiver threads to separate
> cores to reduce variance between runs.
> 
> But it hardcodes the cores and skips core 0, so it fails on machines
> with the selected cores offline, or simply fewer cores.
> 
> The test mainly gives code coverage in automated runs. The throughput
> of zerocopy ('-z') and non-zerocopy runs is logged for manual
> inspection.
> 
> Continue even when sched_setaffinity fails. Just log to warn anyone
> interpreting the data.
> 
> Fixes: 07b65c5b31ce ("test: add msg_zerocopy test")
> Reported-by: Colin Ian King <colin.king@...onical.com>
> Signed-off-by: Willem de Bruijn <willemb@...gle.com>
> ---
>  tools/testing/selftests/net/msg_zerocopy.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/msg_zerocopy.c b/tools/testing/selftests/net/msg_zerocopy.c
> index 4b02933cab8a..bdc03a2097e8 100644
> --- a/tools/testing/selftests/net/msg_zerocopy.c
> +++ b/tools/testing/selftests/net/msg_zerocopy.c
> @@ -125,9 +125,8 @@ static int do_setcpu(int cpu)
>  	CPU_ZERO(&mask);
>  	CPU_SET(cpu, &mask);
>  	if (sched_setaffinity(0, sizeof(mask), &mask))
> -		error(1, 0, "setaffinity %d", cpu);
> -
> -	if (cfg_verbose)
> +		fprintf(stderr, "cpu: unable to pin, may increase variance.\n");
> +	else if (cfg_verbose)
>  		fprintf(stderr, "cpu: %u\n", cpu);
>  
>  	return 0;
> 

Thanks, you solution is good for my testing requirements

Acked-by: Colin Ian King <colin.king@...onical.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ