From patchwork Mon Sep 10 17:19:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Salisbury X-Patchwork-Id: 968147 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 428FCF6JMsz9s7T; Tue, 11 Sep 2018 03:19:21 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fzPqE-0001T8-Vj; Mon, 10 Sep 2018 17:19:14 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1fzPqA-0001Ro-Jb for kernel-team@lists.ubuntu.com; Mon, 10 Sep 2018 17:19:10 +0000 Received: from 1.general.jsalisbury.us.vpn ([10.172.67.212] helo=salisbury) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fzPqA-0003Kl-9I for kernel-team@lists.ubuntu.com; Mon, 10 Sep 2018 17:19:10 +0000 Received: by salisbury (Postfix, from userid 1000) id 3D0C37E05E6; Mon, 10 Sep 2018 13:19:09 -0400 (EDT) From: Joseph Salisbury To: kernel-team@lists.ubuntu.com Subject: [Cosmic][PATCH 0/4] Fixes for LP:1730836 Date: Mon, 10 Sep 2018 13:19:05 -0400 Message-Id: X-Mailer: git-send-email 2.17.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" 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(-)