* [PATCH] md/raid5-ppl: Use atomic64_inc_return() in ppl_new_iounit()
@ 2024-10-07 8:48 Uros Bizjak
2024-10-08 7:07 ` Yu Kuai
2024-10-08 7:38 ` Artur Paszkiewicz
0 siblings, 2 replies; 4+ messages in thread
From: Uros Bizjak @ 2024-10-07 8:48 UTC (permalink / raw)
To: linux-raid, linux-kernel; +Cc: Uros Bizjak, Song Liu, Yu Kuai
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@gmail.com>
Cc: Song Liu <song@kernel.org>
Cc: Yu Kuai <yukuai3@huawei.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;
--
2.46.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] md/raid5-ppl: Use atomic64_inc_return() in ppl_new_iounit()
2024-10-07 8:48 [PATCH] md/raid5-ppl: Use atomic64_inc_return() in ppl_new_iounit() Uros Bizjak
@ 2024-10-08 7:07 ` Yu Kuai
2024-10-08 7:38 ` Artur Paszkiewicz
1 sibling, 0 replies; 4+ messages in thread
From: Yu Kuai @ 2024-10-08 7:07 UTC (permalink / raw)
To: Uros Bizjak, linux-raid, linux-kernel; +Cc: Song Liu, yangerkun
在 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@gmail.com>
> Cc: Song Liu <song@kernel.org>
> Cc: Yu Kuai <yukuai3@huawei.com>
LGTM
Reviewed-by: Yu Kuai <yukuai3@huawei.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;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] md/raid5-ppl: Use atomic64_inc_return() in ppl_new_iounit()
2024-10-07 8:48 [PATCH] md/raid5-ppl: Use atomic64_inc_return() in ppl_new_iounit() Uros Bizjak
2024-10-08 7:07 ` Yu Kuai
@ 2024-10-08 7:38 ` Artur Paszkiewicz
2024-10-18 16:00 ` Song Liu
1 sibling, 1 reply; 4+ messages in thread
From: Artur Paszkiewicz @ 2024-10-08 7:38 UTC (permalink / raw)
To: Uros Bizjak, linux-raid, linux-kernel; +Cc: Song Liu, Yu Kuai
On 10/7/24 10:48, Uros Bizjak wrote:
> 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@gmail.com>
> Cc: Song Liu <song@kernel.org>
> Cc: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] md/raid5-ppl: Use atomic64_inc_return() in ppl_new_iounit()
2024-10-08 7:38 ` Artur Paszkiewicz
@ 2024-10-18 16:00 ` Song Liu
0 siblings, 0 replies; 4+ messages in thread
From: Song Liu @ 2024-10-18 16:00 UTC (permalink / raw)
To: Artur Paszkiewicz; +Cc: Uros Bizjak, linux-raid, linux-kernel, Yu Kuai
On Tue, Oct 8, 2024 at 12:38 AM Artur Paszkiewicz
<artur.paszkiewicz@intel.com> wrote:
>
> On 10/7/24 10:48, Uros Bizjak wrote:
> > 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@gmail.com>
> > Cc: Song Liu <song@kernel.org>
> > Cc: Yu Kuai <yukuai3@huawei.com>
>
> Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Applied to md-6.13. Thanks for the patch!
Song
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-18 16:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-07 8:48 [PATCH] md/raid5-ppl: Use atomic64_inc_return() in ppl_new_iounit() Uros Bizjak
2024-10-08 7:07 ` Yu Kuai
2024-10-08 7:38 ` Artur Paszkiewicz
2024-10-18 16:00 ` Song Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome