mm: cacheline alignment for page_table_lock and mmap_lock

It's important to keep the mmap_lock in an isolated cacheline to avoid
false sharing. While it at put also the page_table_lock in a separate
cacheline.

The kernel test robot reported a per_thread_ops -7.2% regression for
the will-it-scale mmap2 threaded testcase when the two locks
accidentally landed in the same cacheline with other fields before the
previous location of the page_table_lock.

Moving the mmap_lock in an isolated cacheline as this patch
implements, increases the SMP scalability by an extra 3.6%.

v2: fixed the BUILD_BUG_ON for arches with a small AT_VECTOR_SIZE_ARCH
that might prefer to save memory. The new layout still avoids false
sharing with the rest of the mm struct. Those arches that want to
enforce the locks are in separate cachelines need to explicitly opt-in
the BUILD_BUG_ON.

Reported-by: kernel test robot <lkp@intel.com>

Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
4 files changed