Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp223896iol; Sat, 11 Jun 2022 02:42:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMfalW9GNLlW1r/L5AUxoL8jyGz1c3YBbSqWFINC0eGwLgT1HSZIT+GjewA4tEkxzj2jQU X-Received: by 2002:a65:6b8a:0:b0:3fc:4c06:8a8d with SMTP id d10-20020a656b8a000000b003fc4c068a8dmr43905058pgw.83.1654940578287; Sat, 11 Jun 2022 02:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654940578; cv=none; d=google.com; s=arc-20160816; b=hEX8Pv5HiC3tiUIAL17BL/Y1pIs255XQeSA9l03OSOacERmW/M1rLU4kZldBWArCKB h0PfBOUFc+YxQe+vUy9lwRVF42AKSdvvAz7ccW9wU1Jo1IM5uJa3L9OqxzJMVksq397w DF6J8CpmbBjdEr6Lead6kAHFn26uq1F8otbDQ77zFyqzhji6PiACSJnoTpFfe1fNSrRN XI8CUYQpjoPZg1EL5Y5EBxIfoE33ki1mkTeeNzzAOGckj8JCj2UJw9edOPCa5anJQf07 W9YhLxTvefpxd/YJFHoR/4f49IOKjz6CHi6twYrvGtXZ9gjXWFNzKcnI1IxMtCDuPypk a3xA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xJRBn267w54p9IbB6lOSHEVhfWB/FWSqWLVJQc+TgwA=; b=e11NAfthdplT4oXHB4MZ+mWIRDWXsQex1hfORzZHCvJrFITPmEe3huRTG5ji61QHe6 8imdNQeRbpcVEP9Dckmd/TOCGWNDVSvL8bV5C39plYycGW2i+aJNWHjbW85/xm3I3GF7 Cf15xZYUPG39Htyzu/7aEGbSu6if1ZZccTonnikne1DdYd7pz/n2g06hjraErEvsk381 ksLVrsNDReLm5SkywaUBwtAu/Mz1LePIxnvCyiuGwe+Au6Ye8LVWMf/DOjDWar6nvUnz lOKkGQohD0FU0pufQDaA/r23TpETBJpFpyIePiYtaaVEt4OupiiOcuqnNOa68vtN5rfu hkQg== 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 l9-20020a170903244900b0016164e8816dsi1802477pls.247.2022.06.11.02.42.46; Sat, 11 Jun 2022 02:42:58 -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 S231649AbiFKIrd (ORCPT + 99 others); Sat, 11 Jun 2022 04:47:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231593AbiFKIrc (ORCPT ); Sat, 11 Jun 2022 04:47:32 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70B7022BC1 for ; Sat, 11 Jun 2022 01:47:30 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LKrz728B9zjX0R; Sat, 11 Jun 2022 16:46:27 +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; Sat, 11 Jun 2022 16:47:27 +0800 From: Miaohe Lin To: CC: , , , , , , , , , , , Subject: [PATCH 1/7] mm/khugepaged: remove unneeded shmem_huge_enabled() check Date: Sat, 11 Jun 2022 16:47:25 +0800 Message-ID: <20220611084731.55155-2-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220611084731.55155-1-linmiaohe@huawei.com> References: <20220611084731.55155-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) 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 If we reach here, hugepage_vma_check() has already made sure that hugepage is enabled for shmem. Remove this duplicated check. Signed-off-by: Miaohe Lin --- mm/khugepaged.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 476d79360101..73570dfffcec 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -2153,8 +2153,6 @@ static unsigned int khugepaged_scan_mm_slot(unsigned int pages, if (khugepaged_scan.address < hstart) khugepaged_scan.address = hstart; VM_BUG_ON(khugepaged_scan.address & ~HPAGE_PMD_MASK); - if (shmem_file(vma->vm_file) && !shmem_huge_enabled(vma)) - goto skip; while (khugepaged_scan.address < hend) { int ret; -- 2.23.0