On Mon, Jul 06, 2026 at 03:43:46PM +0800, Li Zhe wrote:
> The extra IS_ALIGNED() check is meant as a conservative performance
> choice, not because MOVNTI itself would be invalid on a misaligned
> destination.

Dude, you can't just wait for me to pull every unobvious decision in the code
out of you - you need to write it down in your commit messages! I'm not a mind
reader, you know.

> As the Intel optimization reference manual notes, higher-throughput
> data movement usually comes with alignment considerations, and can
> be more efficient when the destination is naturally aligned.

This can't get any more vague.

> So for these larger fixed-size cases, I kept the inline path limited
> to the aligned case. For misaligned destinations, falling back to
> __memcpy_flushcache() is expected to be the better choice, since it
> already handles the unaligned head first and only then enters its
> MOVNTI loops.
> 
> I will make that rationale explicit in the code comment and commit
> message in v6.

No, you need to show whether the alignment brigns anything and then add it or
remove it. We don't do things based on hearsay in the kernel - only on hard
performance numbers.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Reply via email to