Messages in this thread | | | From | Linus Torvalds <> | Date | Tue, 11 Jun 2019 15:09:24 -1000 | Subject | Re: [PATCH 16/16] mm: pass get_user_pages_fast iterator arguments in a structure |
| |
On Tue, Jun 11, 2019 at 2:55 PM Nicholas Piggin <npiggin@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
| |