Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2747257pxb; Thu, 10 Feb 2022 04:50:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/YS/Xhoagmst/EzQXwj+3FO/J/fhrWardSPMcPYcljNVOb1DJ9qh6wHW9SvlZ4rUUNgx1 X-Received: by 2002:aa7:db01:: with SMTP id t1mr8120577eds.394.1644497446565; Thu, 10 Feb 2022 04:50:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644497446; cv=none; d=google.com; s=arc-20160816; b=TG8UGfHwUo/XgwAV5hRqSgu44o5t0MYRiwoG4kHf269hNeysNPhqxEOp7vvddjTqHK vG4MD/wxLRAYRyhe6YAl8X/LBmPfQCp6nc2bEScQECg9jh1nsHictsvAdUuHq8GD3H2f jZaW4VlYbQ8VLzO7Xdm2ZQ/3kSg8CrqH0wdN7qWCibhyKEaRJPwZk2fKnQ/IqNIQgn+7 Npbx99ERG9tmH0a/9U5AzJiSbiELq4Un/jm1tHfyVgBgx4JlcrbwFD2FmposB6/hWVEq ooQPJMOpNpdxRi0LduQGKKYVgJP0UEKn1qrRZOP2yjl/WaWjF0KlNAk5mrAYtNZy0jvm yEoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CF7K12UiHyUD8RD1jeYY8SOUVycWdbyPt5EtzOn4lQw=; b=KjXKHOOz7OcGZ4QEDlEsiZWAzDMaY0Rwsq2/UWMK6/SR0nKN1P3RpVPg6zX202Iwmr 3u7/h5EtyTjIsLtxuPC7/3Jvwp77S8nxrjJSGI7EYewlAy/NErQmtRY2HWoAwugRrQaC th3eMkFLUplcT+ei1zeuN/+rtSG9oXqYGyUaiVClbINS9rwi2Exkdc6ed2wHCo/xSX0K I0zRsh9OhG+eTQAxsC4v+In0TnB/GAbqVD+8UM7WPdBzFg8OxmJWA/XrjCqpd/f3Tia/ YgM1vF2uwM1YwHUJUeFnn/ti5f0pktBLr6e9TqbS1KyhgzZQkNGSLN8YHRd/0F17WyK8 4aIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=ISYayM7H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 13si13219599ejj.673.2022.02.10.04.50.21; Thu, 10 Feb 2022 04:50:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=ISYayM7H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241592AbiBJMhV (ORCPT + 99 others); Thu, 10 Feb 2022 07:37:21 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:54858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241588AbiBJMhT (ORCPT ); Thu, 10 Feb 2022 07:37:19 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8F8725F9 for ; Thu, 10 Feb 2022 04:37:20 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id ki18-20020a17090ae91200b001b8be87e9abso1771645pjb.1 for ; Thu, 10 Feb 2022 04:37:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CF7K12UiHyUD8RD1jeYY8SOUVycWdbyPt5EtzOn4lQw=; b=ISYayM7HD4PDDxgAQEj7ZxaBeXkg55hZEZUJ9/011NcLqiLDBvHYG1mZTewaXAZUZv XQc1oHESzLZ4AV83ol2dg4VBY+m9jxtkvSHSB1bsn0ery+gvLJ5v1WEZ9DKzm9uAWmC0 ap6bquUhRVZ15OZ9E9a4Lk1mt2faC5NcVRUHjgZblv5+2wynEIpVdsgpxlt6Ctcs4IZO aZn4J2LIneMvcK1HSfX/YPnefbwrR9NFaHw1/Oob9oTSMu3+YCA32I8tFatuOkDQqtC8 KhgJ+Itxj8o7a0bobjHFDD8tjoM6PUfeoSFJOi0safpm2XJ3qalHl52JE2q4LfhhpQA7 0opg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CF7K12UiHyUD8RD1jeYY8SOUVycWdbyPt5EtzOn4lQw=; b=3Kt2tI2+y25sduw14FKoD15wm5v0S3mYmXdSo0xsZxYaWWgnT7ekoN/J95Y3SdI4D6 22CmrmpQAlgULqNamrHOsp4NSn7k+svyqEB0EuEJ69IomRk0MW8BswJFUrAjebF2+Ox6 6+F+/s6yYeWcm5015ZH6fG9qtQhoJJzYH48OrnwEcBt2PHEWwTsoqsfjMP7F+Mof/bQ1 XRJ+4qA38HpGj9LIjMgZaroQB384iWu7iee6oC83ZokBao4VO7i2/fWUBNCoLcg/gngL rFvIkFuP6s4ny9VDEIGQLtYmfVx3U3xSC8QnyI+goKfL0urMJqNveaKE5yUks1Tkl4zn Uphw== X-Gm-Message-State: AOAM531OyPsdXDUS4L0PR7GUkuMJD7kPf1JlM8pzsk3OuXgQLYuaLBXs 6dyAb34wVWWRRUdkWl8q4fTozg== X-Received: by 2002:a17:90a:4f04:: with SMTP id p4mr2592587pjh.180.1644496640426; Thu, 10 Feb 2022 04:37:20 -0800 (PST) Received: from FVFYT0MHHV2J.tiktokcdn.com ([139.177.225.237]) by smtp.gmail.com with ESMTPSA id i8sm11767812pgf.94.2022.02.10.04.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 04:37:20 -0800 (PST) From: Muchun Song To: akpm@linux-foundation.org, zi.yan@cs.rutgers.edu, kirill.shutemov@linux.intel.com, rientjes@google.com, lars.persson@axis.com, mike.kravetz@oracle.com, ziy@nvidia.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, duanxiongchun@bytedance.com, fam.zheng@bytedance.com, Muchun Song Subject: [PATCH v5 0/7] Fix some cache flush bugs Date: Thu, 10 Feb 2022 20:30:51 +0800 Message-Id: <20220210123058.79206-1-songmuchun@bytedance.com> X-Mailer: git-send-email 2.32.0 (Apple Git-132) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series focus on fixing cache maintenance. v5: - Collect Reviewed-by from Mike. - Fix mcopy_atomic_pte() and __mcopy_atomic() (Mike). - Fix shmem_mfill_atomic_pte(). v4: - Replace folio_copy() with copy_user_huge_page(). - Update commit message for patch 2. v3: - Collect Reviewed-by tag from Zi Yan. - Fix hugetlb cache maintenance. v2: - Collect Reviewed-by tag from Zi Yan. - Using a for loop instead of the folio variant for backportability. Muchun Song (7): mm: thp: fix wrong cache flush in remove_migration_pmd() mm: fix missing cache flush for all tail pages of compound page mm: hugetlb: fix missing cache flush in copy_huge_page_from_user() mm: hugetlb: fix missing cache flush in hugetlb_mcopy_atomic_pte() mm: shmem: fix missing cache flush in shmem_mfill_atomic_pte() mm: userfaultfd: fix missing cache flush in mcopy_atomic_pte() and __mcopy_atomic() mm: replace multiple dcache flush with flush_dcache_folio() mm/huge_memory.c | 3 ++- mm/hugetlb.c | 3 ++- mm/memory.c | 2 ++ mm/migrate.c | 3 +-- mm/shmem.c | 4 +++- mm/userfaultfd.c | 3 +++ 6 files changed, 13 insertions(+), 5 deletions(-) -- 2.11.0