mbox series

[Cosmic,0/4] Fixes for LP:1730836

Message ID cover.1536347216.git.joseph.salisbury@canonical.com
Headers show
Series Fixes for LP:1730836 | expand

Message

Joseph Salisbury Sept. 10, 2018, 5:19 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1730836

== Cosmic Justification ==
Intel is requesting these for fixes in Cosmic.  The commits are all in mainline 
as of v4.19-rc1.

Huge page helps to reduce TLB miss rate, but it has higher cache footprint,
sometimes this may cause some issue. For example, when clearing huge page
on x86_64 platform, the cache footprint is 2M. But on a Xeon E5 v3 2699
CPU, there are 18 cores, 36 threads, and only 45M LLC (last level cache).
That is, in average, there are 2.5M LLC for each core and 1.25M LLC for
each thread. If the cache pressure is heavy when clearing the huge page,
and we clear the huge page from the begin to the end, it is possible that
the begin of huge page is evicted from the cache after we finishing
clearing the end of the huge page. And it is possible for the application
to access the begin of the huge page after clearing the huge page.

To help the above situation, when we clear or copy a huge page, the order
 to clear or copy the sub-pages can be changed to clear or copy the sub-page to access last.  

== Fixes ==
c6ddfb6c5890 ("mm, clear_huge_page: move order algorithm into a separate function")
c9f4cd713835 ("mm, huge page: copy target sub-page last when copy huge page")
5b7a1d406062 ("mm, hugetlbfs: rename address to haddr in hugetlb_cow()")
974e6d66b6b5 ("mm, hugetlbfs: pass fault address to cow handler")

Huang Ying (4):
  mm, clear_huge_page: move order algorithm into a separate function
  mm, huge page: copy target sub-page last when copy huge page
  mm, hugetlbfs: rename address to haddr in hugetlb_cow()
  mm, hugetlbfs: pass fault address to cow handler

 include/linux/mm.h |   3 +-
 mm/huge_memory.c   |   3 +-
 mm/hugetlb.c       |  23 +++++-----
 mm/memory.c        | 120 +++++++++++++++++++++++++++++++++++------------------
 4 files changed, 94 insertions(+), 55 deletions(-)

Comments

Thadeu Lima de Souza Cascardo Sept. 11, 2018, 12:01 p.m. UTC | #1
Applied to cosmic master-next branch.

Thanks.
Cascardo.

Applied-to: cosmic/master-next