lkml.org 
[lkml]   [2022]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT PULL] Ceph updates for 5.20-rc1
On Sun, Aug 14, 2022 at 12:08 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
>
>
> There's a cheap way to reduce the register pressure:
> seq = raw_seqcount_begin(&dentry->d_seq);
> if (dentry->d_parent != parent)
> continue;
> if (d_unhashed(dentry))
> continue;
> if (dentry->d_name.hash_len != hashlen)
> continue;
> if (dentry_cmp(dentry, str, hashlen_len(hashlen)) != 0)
> continue;
> *seqp = seq;
> could move the last store to before dentry_cmp().

I actually tried that, it doesn't really end up helping.

Gcc does well regardless, and clang ends up really wanting to move so
much out of the dentry_cmp() loop that it runs out of registers and
always ends up doing a couple of spills.

I think it reduced the spills by one, but not enough to generate the
nice non-frame code that gcc does.

It's a bit ugly, but the code probably performs quite well - the
spills aren't in the inner loop.

Linus

\
 
 \ /
  Last update: 2022-08-14 22:05    [W:0.063 / U:2.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site