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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 405F3C4BA2D for ; Thu, 27 Feb 2020 00:06:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EA4C824650 for ; Thu, 27 Feb 2020 00:06:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA4C824650 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7F6166B0003; Wed, 26 Feb 2020 19:06:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7A5EC6B0005; Wed, 26 Feb 2020 19:06:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6BB726B0006; Wed, 26 Feb 2020 19:06:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0208.hostedemail.com [216.40.44.208]) by kanga.kvack.org (Postfix) with ESMTP id 5298F6B0003 for ; Wed, 26 Feb 2020 19:06:46 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E679440CA for ; Thu, 27 Feb 2020 00:06:45 +0000 (UTC) X-FDA: 76533965970.10.bean59_cc6893f9333 X-HE-Tag: bean59_cc6893f9333 X-Filterd-Recvd-Size: 2668 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Thu, 27 Feb 2020 00:06:45 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 789341FB; Wed, 26 Feb 2020 16:06:44 -0800 (PST) Received: from [192.168.0.129] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E71373F73B; Wed, 26 Feb 2020 16:06:42 -0800 (PST) Subject: Re: [PATCH 1/3] mm/vma: Move VM_NO_KHUGEPAGED into generic header To: Vlastimil Babka , linux-mm@kvack.org Cc: Andrew Morton , linux-kernel@vger.kernel.org References: <1582692658-3294-1-git-send-email-anshuman.khandual@arm.com> <1582692658-3294-2-git-send-email-anshuman.khandual@arm.com> <9899b82b-1295-97de-27da-a0a20dbe1a60@suse.cz> From: Anshuman Khandual Message-ID: <6e50e08d-8892-684f-dc0a-e65cde8d632a@arm.com> Date: Thu, 27 Feb 2020 05:36:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <9899b82b-1295-97de-27da-a0a20dbe1a60@suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 02/26/2020 05:04 PM, Vlastimil Babka wrote: > On 2/26/20 5:50 AM, Anshuman Khandual wrote: >> Move VM_NO_KHUGEPAGED into generic header (include/linux/mm.h). This just >> makes sure that no VMA flag is scattered in individual function files any >> longer. While at this, fix an old comment which is no longer valid. >> >> Cc: Andrew Morton >> Cc: linux-mm@kvack.org >> Cc: linux-kernel@vger.kernel.org >> Signed-off-by: Anshuman Khandual >> --- >> include/linux/mm.h | 3 ++- >> mm/khugepaged.c | 2 -- >> 2 files changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/include/linux/mm.h b/include/linux/mm.h >> index 52269e56c514..6f7e400e6ea3 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h >> @@ -287,6 +287,8 @@ extern unsigned int kobjsize(const void *objp); >> #define VM_NOHUGEPAGE 0x40000000 /* MADV_NOHUGEPAGE marked this vma */ >> #define VM_MERGEABLE 0x80000000 /* KSM may merge identical pages */ >> >> +#define VM_NO_KHUGEPAGED (VM_SPECIAL | VM_HUGETLB) > > While the preprocessor doesn't mind that VM_SPECIAL is only defined later, I > would have moved this below VM_SPECIAL definition anyway, where it fits better, > and add a comment like other defines there do? Sure, will do.