[PATCH 16/16] mm: pass get_user_pages_fast iterator arguments in a structure

Linus Torvalds torvalds at linux-foundation.org
Wed Jun 12 11:09:24 AEST 2019


On Tue, Jun 11, 2019 at 2:55 PM Nicholas Piggin <npiggin at gmail.com> wrote:
>
> What does this do for performance? I've found this pattern can be
> bad for store aliasing detection.

I wouldn't expect it to be noticeable, and the lack of argument
reloading etc should make up for it. Plus inlining makes it a
non-issue when that happens.

But I guess we could also at least look at using "restrict", if that
ends up helping. Unlike the completely bogus type-based aliasing rules
(that we disable because I think the C people were on some bad bad
drugs when they came up with them), restricted pointers are a real
thing that makes sense.

That said, we haven't traditionally used it, and I don't know how much
it helps gcc. Maybe gcc ignores it entirely? S

               Linus


More information about the Linuxppc-dev mailing list