Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3982130ioo; Wed, 25 May 2022 12:05:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyA4LiBLfMm4RS7PoX3Qv6p4n1iN15Hx5iuO+tODdZwRgJ3oduROtEtNKNK6c9XmUfX2032 X-Received: by 2002:a17:902:dad1:b0:161:a5b5:c8f4 with SMTP id q17-20020a170902dad100b00161a5b5c8f4mr33273259plx.169.1653505507809; Wed, 25 May 2022 12:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653505507; cv=none; d=google.com; s=arc-20160816; b=KNGWViw8G/QY7OF/fKDme4bsxfzJfjjtqiLlmMYupK0RLyriVUdbBSXlSM/TwL3kHs Fc0O81xRFv1dCGLVEM58ZhYoQkzyTHiSZ3tEJi4MHgNVv0l3YZH+W9TzHAFNxBDjcMtL 4a+Du+dJm2u7+VIh7QUktWzbIvLKvJH9QYEkW7V0VrWn7Ds+XYBrTY6fFl6MF0bITKp0 8s2Ams0dvIfDngxDjoNZ+x3jXlLUVDuQzyGWvNelOhVStVfVAM2uR7dud/UoKAGT89OY qOHLMPlLP8se9RPUINs56JmO5akhCdru2Xbw2/X7mmn3Yh/LXquZ2s9PAFgPiMnmjQD2 eZCA== 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; bh=igcvtB2J5Wa4ydOlIIFWIBR8Vi1PEltd6GPR89H4YF8=; b=ZQR75i1FtBESlE2kr5CMCCrQMCKVgVzy9TyPsAqulHh/Mnl2xwZD0mE/zDeyuBLxSv rwLRHOuwKYVDpI0OHEUrZFzXGHNDUe751FVO8rQDOrFvD0dLr0dBE8goft6ST/SiMExx ZBRx5igTaDpNnotWJP8bQGWXNKbwrYuL04CcMLDLdhVAYYDXgnEiOvbjBCI3QyKqu4uV mIDE7RKUjczWmsf0kQRapPKPUrZg5BcDGlugtBcAZN6CiLRNOHD7hXr9NXnuuumGJUsK KCaxFWJHgtkvVGzAjCtkF6JELxPO6G+eCnmVdCiWJ3IDsioKY9+15yBLFzlqmTUtNx1Q uIZg== ARC-Authentication-Results: i=1; mx.google.com; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 5-20020a631045000000b003daf6356570si4067642pgq.3.2022.05.25.12.04.45; Wed, 25 May 2022 12:05:07 -0700 (PDT) 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; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233882AbiEYISW (ORCPT + 99 others); Wed, 25 May 2022 04:18:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232404AbiEYISQ (ORCPT ); Wed, 25 May 2022 04:18:16 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8A91F67 for ; Wed, 25 May 2022 01:18:14 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4L7P4w3tGnzQkNZ; Wed, 25 May 2022 16:15:12 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 25 May 2022 16:18:12 +0800 From: Miaohe Lin To: , , CC: , , , , , , , , , , Subject: [PATCH v3 0/4] A few cleanup and fixup patches for migration Date: Wed, 25 May 2022 16:18:18 +0800 Message-ID: <20220525081822.53547-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 Hi everyone, This series contains a few patches to remove unneeded lock page and PageMovable check, reduce the rcu lock duration. Also we fix potential pte_unmap on an not mapped pte. More details can be found in the respective changelogs. Thanks! --- v3: [PATCH 1/4] mm/migration: reduce the rcu lock duration add the analysis that the original race condition isn't possible now alsoreduce the rcu lock duration in kernel_migrate_pages [PATCH 2/4] mm/migration: remove unneeded lock page and PageMovable check let free_pages_prepare() clear PG_isolated for us [PATCH 3/4] mm/migration: return errno when isolate_huge_page failed rename isolate_huge_page to isolate_hugetlb [PATCH 4/4] mm/migration: fix potential pte_unmap on an not mapped pte collect Reviewed-by tag v2: collect Reviewed-by tag make isolate_huge_page consistent with isolate_lru_page add hugetlbfs variant of hugetlb_migration_entry_wait v1: rebase [1] on mainline. [1] https://lore.kernel.org/lkml/20220304093409.25829-2-linmiaohe@huawei.com/T/ --- Miaohe Lin (4): mm: reduce the rcu lock duration mm/migration: remove unneeded lock page and PageMovable check mm/migration: return errno when isolate_huge_page failed mm/migration: fix potential pte_unmap on an not mapped pte include/linux/hugetlb.h | 6 +++--- include/linux/swapops.h | 12 ++++++++---- mm/gup.c | 2 +- mm/hugetlb.c | 15 +++++++-------- mm/memory-failure.c | 2 +- mm/mempolicy.c | 5 ++--- mm/migrate.c | 40 +++++++++++++++++++++++++--------------- 7 files changed, 47 insertions(+), 35 deletions(-) -- 2.23.0