From mboxrd@z Thu Jan 1 00:00:00 1970 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 3AA9EC433EF for ; Sat, 11 Jun 2022 20:33:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 627DC8D011E; Sat, 11 Jun 2022 16:33:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B0208D011D; Sat, 11 Jun 2022 16:33:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 429DD8D011E; Sat, 11 Jun 2022 16:33:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 3016A8D011D for ; Sat, 11 Jun 2022 16:33:41 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id F05CA204FD for ; Sat, 11 Jun 2022 20:33:40 +0000 (UTC) X-FDA: 79567105800.05.13E3982 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf30.hostedemail.com (Postfix) with ESMTP id 844DB80079 for ; Sat, 11 Jun 2022 20:33:40 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 898C1B80B4B; Sat, 11 Jun 2022 20:33:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9AAFC34116; Sat, 11 Jun 2022 20:33:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1654979617; bh=F7EHT9nZNVQPeqtZoCb685s4XBj+VIt+AKyBVKyAR8c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=b/zAgY8QdVjsqF7/QCSMna5TOmNv+PT2Q+hVV7LDXhuXgEABctZAXDkPzDEYdS99T /Uyvrf+ISelOhLCCUGO+gIdxx3CeSwT+xZxPGocc8G8ucXhBiEJkszNR/TkMdiEXQl APDF5E95LyAuBGog8WUrB9eFTPabRgYXJDmIjGk8= Date: Sat, 11 Jun 2022 13:33:36 -0700 From: Andrew Morton To: Miaohe Lin Cc: , , , , , , , , , , Subject: Re: [PATCH 1/7] mm/khugepaged: remove unneeded shmem_huge_enabled() check Message-Id: <20220611133336.b582edd4c2c2df15f5561d2b@linux-foundation.org> In-Reply-To: <20220611084731.55155-2-linmiaohe@huawei.com> References: <20220611084731.55155-1-linmiaohe@huawei.com> <20220611084731.55155-2-linmiaohe@huawei.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1654979620; a=rsa-sha256; cv=none; b=KvD4XRAeHASUqMA3tTWk0M3y8/xGZB3kaQc41CuqwUH5S0tiy/2EYOhTEiJ5A5PIKH8jH1 T42N8Q+cqcS0A0UeP68V2hnzgGP+qhxAwGUTeKVPn1lUOEZzicolhEs8ukmskweCHXaaDt ZpaudN31Po3Y+8AaHZma0eMnosLSpXs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1654979620; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=oBYWAOZvJpGeDNPb4gs/iuLJRRbWVq1kA66BhSE3zSk=; b=UOJzscI56w80gL8QtLuiXQIdSB8Si4fspjLoPi+boYRoHkdyWSmOhR1NywZU4kgBbGKv/1 yG2DpAP/0lmCQ/uwH+VL88js+X/epN4atuzUBSxFuipZWWuw1grzE7/moz12hodWczfRm9 /q4N5ibAivOFqLaRB7MvoEGwpiiaCEc= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="b/zAgY8Q"; dmarc=none; spf=pass (imf30.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="b/zAgY8Q"; dmarc=none; spf=pass (imf30.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Stat-Signature: qgdm5xaazhsbsrt9534f1nidg7boccrp X-Rspamd-Queue-Id: 844DB80079 X-Rspamd-Server: rspam12 X-Rspam-User: X-HE-Tag: 1654979620-264082 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: On Sat, 11 Jun 2022 16:47:25 +0800 Miaohe Lin wrote: > If we reach here, hugepage_vma_check() has already made sure that hugepage > is enabled for shmem. Remove this duplicated check. I updated this to If we reach here, hugepage_vma_check() has already made sure that hugepage is enabled for shmem, via its call to hugepage_vma_check(). Remove this duplicated check.