Andrea Arcangeli a458b76a41 mm: gup: pack has_pinned in MMF_HAS_PINNED
has_pinned 32bit can be packed in the MMF_HAS_PINNED bit as a noop
cleanup.

Any atomic_inc/dec to the mm cacheline shared by all threads in pin-fast
would reintroduce a loss of SMP scalability to pin-fast, so there's no
future potential usefulness to keep an atomic in the mm for this.

set_bit(MMF_HAS_PINNED) will be theoretically a bit slower than WRITE_ONCE
(atomic_set is equivalent to WRITE_ONCE), but the set_bit (just like
atomic_set after this commit) has to be still issued only once per "mm",
so the difference between the two will be lost in the noise.

will-it-scale "mmap2" shows no change in performance with enterprise
config as expected.

will-it-scale "pin_fast" retains the > 4000% SMP scalability performance
improvement against upstream as expected.

This is a noop as far as overall performance and SMP scalability are
concerned.

[peterx@redhat.com: pack has_pinned in MMF_HAS_PINNED]
  Link: https://lkml.kernel.org/r/YJqWESqyxa8OZA+2@t490s
[akpm@linux-foundation.org: coding style fixes]
[peterx@redhat.com: fix build for task_mmu.c, introduce mm_set_has_pinned_flag, fix comments]

Link: https://lkml.kernel.org/r/20210507150553.208763-4-peterx@redhat.com
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jann Horn <jannh@google.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Kirill Shutemov <kirill@shutemov.name>
Cc: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-29 10:53:48 -07:00
..
2021-05-07 11:18:52 -07:00
2021-06-25 09:41:29 -07:00
2021-03-30 16:54:49 -07:00
2021-06-18 16:39:03 -07:00
2021-06-29 10:53:48 -07:00
2021-04-12 15:04:29 +02:00
2021-06-29 10:53:48 -07:00
2021-06-29 10:53:48 -07:00
2021-06-29 10:53:48 -07:00
2021-05-07 11:23:41 -07:00
2021-04-30 15:17:08 -07:00
2021-04-27 18:09:44 -07:00
2021-06-29 10:53:48 -07:00
2021-06-29 10:53:48 -07:00
2021-01-24 14:27:20 +01:00
2021-01-24 14:27:20 +01:00
2021-02-24 13:38:26 -08:00
2021-02-23 13:39:45 -08:00
2021-01-24 14:27:19 +01:00
2021-02-23 13:39:45 -08:00
2021-04-12 15:04:23 +02:00
2021-05-07 11:23:41 -07:00
2021-06-29 10:53:48 -07:00
2021-04-27 12:49:42 -07:00
2021-02-23 13:39:45 -08:00
2021-02-24 13:38:26 -08:00
2021-01-24 14:27:20 +01:00
2021-01-24 14:27:19 +01:00
2021-02-21 11:02:48 -08:00
2021-02-13 17:17:53 +01:00
2021-04-22 12:22:11 -07:00
2021-01-24 14:27:18 +01:00