On Sun, Aug 14, 2022 at 12:08 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> 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