From patchwork Sun Apr 24 14:50:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 12824909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3D48C433FE for ; Sun, 24 Apr 2022 14:50:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9FBAE6B0075; Sun, 24 Apr 2022 10:50:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9AAF76B0078; Sun, 24 Apr 2022 10:50:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8BF9F6B007B; Sun, 24 Apr 2022 10:50:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 8061B6B0075 for ; Sun, 24 Apr 2022 10:50:30 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 4BC2C2185A for ; Sun, 24 Apr 2022 14:50:30 +0000 (UTC) X-FDA: 79392058620.30.24BF5B2 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by imf21.hostedemail.com (Postfix) with ESMTP id E52921C003F for ; Sun, 24 Apr 2022 14:50:25 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R601e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VB2JqrI_1650811822; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VB2JqrI_1650811822) by smtp.aliyun-inc.com(127.0.0.1); Sun, 24 Apr 2022 22:50:22 +0800 From: Baolin Wang To: akpm@linux-foundation.org, mike.kravetz@oracle.com Cc: almasrymina@google.com, songmuchun@bytedance.com, baolin.wang@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] Fix cache flush issues considering PMD sharing Date: Sun, 24 Apr 2022 22:50:12 +0800 Message-Id: X-Mailer: git-send-email 1.8.3.1 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: E52921C003F X-Stat-Signature: gyh8ycmw36ot7ua6fjz4wrd5k8en3q8o X-Rspam-User: Authentication-Results: imf21.hostedemail.com; dkim=none; spf=pass (imf21.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.57 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com X-HE-Tag: 1650811825-230695 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, This patch set fixes some cache flushing issues if PMD sharing is possible for hugetlb pages, which were found by code inspection. Please help to review. Thanks. Baolin Wang (2): mm: hugetlb: Considering PMD sharing when flushing cache/TLBs mm: rmap: Move the cache flushing to the correct place for hugetlb PMD sharing mm/hugetlb.c | 17 +++++++++++++++-- mm/mremap.c | 2 +- mm/rmap.c | 40 ++++++++++++++++++++++------------------ 3 files changed, 38 insertions(+), 21 deletions(-)