From: Andrew Jones <ajones@ventanamicro.com>
To: zhangfei <zhang_fei_0403@163.com>
Cc: aou@eecs.berkeley.edu, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, palmer@dabbelt.com,
paul.walmsley@sifive.com, zhangfei@nj.iscas.ac.cn
Subject: Re: [PATCH] riscv: Optimize memset
Date: Wed, 10 May 2023 08:58:22 +0200 [thread overview]
Message-ID: <20230510-0adf0b2a2956ca1cd426a2d2@orel> (raw)
In-Reply-To: <20230510035243.8586-4-zhang_fei_0403@163.com>
On Wed, May 10, 2023 at 11:52:43AM +0800, zhangfei wrote:
> From: zhangfei <zhangfei@nj.iscas.ac.cn>
>
> On Tue, May 09, 2023 11:16:33AM +0200, Andrew Jones wrote:
> > On Tue, May 09, 2023 at 10:22:07AM +0800, zhangfei wrote:
> > >
> > > Hi,
> > >
> > > I filled head and tail with minimal branching. Each conditional ensures that
> > > all the subsequently used offsets are well-defined and in the dest region.
> >
> > I know. You trimmed my comment, so I'll quote myself, here
> >
> > """
> > After the check of a2 against 6 above we know that offsets 6(t0)
> > and -7(a3) are safe. Are we trying to avoid too may redundant
> > stores with these additional checks?
> > """
> >
> > So, again. Why the additional check against 8 above and, the one you
> > trimmed, checking 10?
>
> Hi,
>
> These additional checks are to avoid too many redundant stores.
>
> Adding a check for more than 8 bytes is because after the loop
> segment '3' comes out, the remaining bytes are less than 8 bytes,
> which also avoids redundant stores.
So the benchmarks showed these additional checks were necessary to avoid
making memset worse? Please add comments to the code explaining the
purpose of the checks.
Thanks,
drew
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2023-05-10 6:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 8:43 [PATCH] riscv: Optimize memset 张飞
2023-05-05 11:54 ` Andrew Jones
2023-05-09 2:22 ` [PATCH 1/2] RISC-V: lib: Improve memset assembler formatting zhangfei
2023-05-09 2:22 ` [PATCH 2/2] riscv: Optimize memset zhangfei
2023-05-09 2:22 ` Re: [PATCH] " zhangfei
2023-05-09 9:16 ` Andrew Jones
2023-05-10 3:52 ` [PATCH 0/2] riscv: Optimize memset for data sizes less than 16 bytes zhangfei
2023-05-10 3:52 ` [PATCH 1/2] RISC-V: lib: Improve memset assembler formatting zhangfei
2023-05-10 7:13 ` Conor Dooley
2023-05-11 1:55 ` zhangfei
2023-05-10 3:52 ` [PATCH 2/2] riscv: Optimize memset zhangfei
2023-05-10 3:52 ` [PATCH] " zhangfei
2023-05-10 6:58 ` Andrew Jones [this message]
2023-05-11 1:42 ` zhangfei
2023-05-09 9:48 ` [PATCH 1/2] RISC-V: lib: Improve memset assembler formatting Andrew Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230510-0adf0b2a2956ca1cd426a2d2@orel \
--to=ajones@ventanamicro.com \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=zhang_fei_0403@163.com \
--cc=zhangfei@nj.iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox