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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8595BC10F1B for ; Sat, 17 Dec 2022 02:02:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230199AbiLQCCC (ORCPT ); Fri, 16 Dec 2022 21:02:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230010AbiLQCB5 (ORCPT ); Fri, 16 Dec 2022 21:01:57 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E777465C6 for ; Fri, 16 Dec 2022 18:01:56 -0800 (PST) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NYq1t1sJszRpvc; Sat, 17 Dec 2022 10:00:50 +0800 (CST) Received: from [10.174.151.185] (10.174.151.185) 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.34; Sat, 17 Dec 2022 10:01:54 +0800 Subject: Re: [PATCH 2/2] hugetlb: update vma flag check for hugetlb vma lock To: Mike Kravetz , , CC: Muchun Song , David Hildenbrand , Peter Xu , Naoya Horiguchi , "Aneesh Kumar K . V" , James Houghton , Mina Almasry , Andrew Morton References: <20221212235042.178355-1-mike.kravetz@oracle.com> <20221212235042.178355-2-mike.kravetz@oracle.com> From: Miaohe Lin Message-ID: Date: Sat, 17 Dec 2022 10:01:54 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20221212235042.178355-2-mike.kravetz@oracle.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/12/13 7:50, Mike Kravetz wrote: > The check for whether a hugetlb vma lock exists partially depends on > the vma's flags. Currently, it checks for either VM_MAYSHARE or > VM_SHARED. The reason both flags are used is because VM_MAYSHARE was > previously cleared in hugetlb vmas as they are tore down. This is no > longer the case, and only the VM_MAYSHARE check is required. > > Signed-off-by: Mike Kravetz Nice cleanup. This is also what I planed to do. ;) Reviewed-by: Miaohe Lin Thanks, Miaohe Lin