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: <8de92255-dc6f-eb42-3ee5-5d7259c7616d@huawei.com>
Date: Tue, 8 Oct 2024 15:07:24 +0800
From: Yu Kuai <yukuai3@...wei.com>
To: Uros Bizjak <ubizjak@...il.com>, <linux-raid@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
CC: Song Liu <song@...nel.org>, "yangerkun@...wei.com" <yangerkun@...wei.com>
Subject: Re: [PATCH] md/raid5-ppl: Use atomic64_inc_return() in
 ppl_new_iounit()

在 2024/10/07 16:48, Uros Bizjak 写道:
> Use atomic64_inc_return(&ref) instead of atomic64_add_return(1, &ref)
> to use optimized implementation and ease register pressure around
> the primitive for targets that implement optimized variant.
> 
> Signed-off-by: Uros Bizjak <ubizjak@...il.com>
> Cc: Song Liu <song@...nel.org>
> Cc: Yu Kuai <yukuai3@...wei.com>

LGTM
Reviewed-by: Yu Kuai <yukuai3@...wei.com>
> ---
>   drivers/md/raid5-ppl.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
> index a70cbec12ed0..37c4da5311ca 100644
> --- a/drivers/md/raid5-ppl.c
> +++ b/drivers/md/raid5-ppl.c
> @@ -258,7 +258,7 @@ static struct ppl_io_unit *ppl_new_iounit(struct ppl_log *log,
>   	memset(pplhdr->reserved, 0xff, PPL_HDR_RESERVED);
>   	pplhdr->signature = cpu_to_le32(ppl_conf->signature);
>   
> -	io->seq = atomic64_add_return(1, &ppl_conf->seq);
> +	io->seq = atomic64_inc_return(&ppl_conf->seq);
>   	pplhdr->generation = cpu_to_le64(io->seq);
>   
>   	return io;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ