Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp180532pxb; Tue, 2 Feb 2021 02:24:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwl+OuPEMyhm9YhnYRKS1beDflO/gffXyoCUFBCMHtKxId20L8UvzeUhDYU7+GkOzIjT+QA X-Received: by 2002:a05:6402:430c:: with SMTP id m12mr23929275edc.299.1612261454488; Tue, 02 Feb 2021 02:24:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1612261454; cv=pass; d=google.com; s=arc-20160816; b=acJFrBANS6wC/V8MnYtGDK5lbeVaeGP6lpdUIynZaAMuM7tOPNFw3QNZ7SxoCtLn13 4xvJixFGbnkY7+vENGVdBHg2o6IqV0RLN9AnBuuXM53qB+4TswanqxqABhfIi7z+X7JA rKMHIpGOgKsqLZsAysVWC2xAt/1V1E7waSRGEM3w3rYLDotFHuYft4l4Ksfzcllw1XJr ozXVtFoM7hAQb+BF9eQSYOHf1EznFT0hKeN5fqb3E5mM8OhtLkpwIuzPMFDpfVBGTbU1 IYJDEZYtLeDSWDhByFbwinpwsz2DYNa/dDIPbu5U054WV/44oXGXtwH3FIGUb/UKuMtt +84Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=XCvMleNImUDJWXJIc4u7VW0j456qoa/LJq5r0ZDoRXU=; b=v9JvCPpHd+J+iuhiOb9UaTAJgeyEJnGt6j54P4riq5pM33j2m3aWR9+yOC9pAz1i8P vIRwuoTsKzK6c9dhS19wsHUJP2OPU1/fko7bZsMcFi8ILI2Yb6kJeD2zUZh0sWUPVWYR SFUrcBgFY+h06c8yD1eOUNHpOapqJ7rjV8HBB/ORA5PgPAz9AHkkEA0VjJLsOQV9t/SI FMNlwRQa1GC4J5joLtMjLk22ZXBSipVIXcT0rgr8XPBXd5Epe5wtG9PuFU2nTLjGqiH5 P+LY22ST3ciyskrEysTQvZtv0OG+iC0SJAeaNLi7TM2Esam752rxQmQkQfqHAvhQL4S3 Bh5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@windriversystems.onmicrosoft.com header.s=selector2-windriversystems-onmicrosoft-com header.b=Vn14DjBF; arc=pass (i=1 spf=pass spfdomain=windriver.com dkim=pass dkdomain=windriver.com dmarc=pass fromdomain=windriver.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si12160756edq.542.2021.02.02.02.23.49; Tue, 02 Feb 2021 02:24:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@windriversystems.onmicrosoft.com header.s=selector2-windriversystems-onmicrosoft-com header.b=Vn14DjBF; arc=pass (i=1 spf=pass spfdomain=windriver.com dkim=pass dkdomain=windriver.com dmarc=pass fromdomain=windriver.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbhBBKU1 (ORCPT + 99 others); Tue, 2 Feb 2021 05:20:27 -0500 Received: from mail-bn7nam10on2072.outbound.protection.outlook.com ([40.107.92.72]:39009 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229483AbhBBKUS (ORCPT ); Tue, 2 Feb 2021 05:20:18 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MT1lA/E7ea2pwsPQ4xTMtCErmjxFTgLcMPlWmjmaxHpuUStwxGdUpr+eLwMNh9foenbSOnF4Vu1JhWOE3t3FYTaiI3yrTmYU8CNScmiJ4gaxgAhWA7PKpXq4j4Yw4Pdb2e3jsMlD7RhVDp0oB6FiLsvIm0iMv9G0M5MNn2cGKHZ8MWFEmANF3wGcdgKtyb7LVQr3dq4NM4ZCAq82t3JQgZUHyn7P77Q02nOIb29adN2jb4VwlshvxjiGhGtMhTlmBwE7he+pu4couQRbX69IQZUfSfVuireOUsicB2rTCpRbHsI2jy8/anMQh7DqeEfndYmX/J15dcM900FZI1kDlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XCvMleNImUDJWXJIc4u7VW0j456qoa/LJq5r0ZDoRXU=; b=OsImyvLwcXYdHTp0CXZ0SbsqbRz9+T3bc5lUwQWbZRVmYQyND+NNxhoLHuVCBfXlMCbB4l5mH+5JNuBiVd4z04bmXcd/ofXkfyQMHkMJESaMWEb1zsz9vVU/lgaPwYwUR43F4tLAPwmLeHvR864u6HpZxmPfTOJ9eqeWnjEuJcsOe6AWc3CnLgO77qXBcPPnWPYYCzuFewW8vZI+bqZIh1kf2zQ24XjF3y/Mnw/Dl0ZdTfJp7eBUkIOGCyKrdKkN9cRyGz3kg8w3ptnGewhRzEjm1tmX04YXtdncDxRr0YAqIzC1+/z2DIQE35LjifMsRA1XdViA75NYShax3mt2Rw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriversystems.onmicrosoft.com; s=selector2-windriversystems-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XCvMleNImUDJWXJIc4u7VW0j456qoa/LJq5r0ZDoRXU=; b=Vn14DjBFDta4SRUYwIxMPS/RzB1qhwboWpX3eawHvKZXwuP2a/1GSr1kAD5JKgZnSxTSUuh7cEQpe67vyHqL0V+EWMF4Thg5i9X75pl6U215jD/A95gy40AmpqsSGk1S3QOzrFWNxw4k1QuFw7FI+8D3Oiw4Uv1dNAMaMubOugY= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=windriver.com; Received: from BY5PR11MB4241.namprd11.prod.outlook.com (2603:10b6:a03:1ca::13) by BYAPR11MB3350.namprd11.prod.outlook.com (2603:10b6:a03:1a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.24; Tue, 2 Feb 2021 10:19:29 +0000 Received: from BY5PR11MB4241.namprd11.prod.outlook.com ([fe80::95a3:653e:2078:fb4]) by BY5PR11MB4241.namprd11.prod.outlook.com ([fe80::95a3:653e:2078:fb4%6]) with mapi id 15.20.3805.028; Tue, 2 Feb 2021 10:19:29 +0000 Subject: Re: [PATCH] mm/hugetlb: remove a meaningless if statement in gigantic page initialization To: David Hildenbrand , mike.kravetz@oracle.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210202101209.72795-1-yanfei.xu@windriver.com> <18d3db7b-da3c-db14-ab99-b2c966c70024@redhat.com> From: "Xu, Yanfei" Message-ID: <0837b5cc-2eb0-4316-8595-34f92a43035c@windriver.com> Date: Tue, 2 Feb 2021 18:19:21 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: <18d3db7b-da3c-db14-ab99-b2c966c70024@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [60.247.85.82] X-ClientProxiedBy: HK2PR0401CA0010.apcprd04.prod.outlook.com (2603:1096:202:2::20) To BY5PR11MB4241.namprd11.prod.outlook.com (2603:10b6:a03:1ca::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [128.224.162.160] (60.247.85.82) by HK2PR0401CA0010.apcprd04.prod.outlook.com (2603:1096:202:2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16 via Frontend Transport; Tue, 2 Feb 2021 10:19:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef356047-2e74-49eb-a1bf-08d8c764066c X-MS-TrafficTypeDiagnostic: BYAPR11MB3350: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:293; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nm4KX25ri7A1O6NOTVd78zsTIM0sSa3Vx/Wa3xEdh+uFC19BgPSHYMj3GCr0j1D24SqUMn+AgQojx8+AZG80ubXmmtd2qIdvkhT+pgCwUgfEMF9RHwtH1Tb29KQ5tJ5Oemur2t66KN3Y+PO/BZcS1nKeAK1eA4yCU7EMGQoPRf1ZFVlVVa0G+0GyAosL8B/VA6I92MBxfUfbHGhElZ/nwIEPSxGfHXARQr0sbNk2OiPPOnWU2MNlqxsHdOTzmxBSZAPozBjgT9HndNGT3TjuE8KrbDfymko7OUIWe+t0dFxSQUuWiesHZCO4vDX2o+NmgcPC95ONc4a0PkFC9atP1p6/L43lpDl0WE2+YmKY2jqfTo0troU6vQPiBrI6lrdR3qJB9ZGy5v8uNDq7u2hEcvC4USeWmCS8WrdBSwktJSCkpP5qWYWczmy5JpeZz41ZNy4xYNHYL3zDQPPgu7JBxfzeHEcGFfubKf8dbCnX2YwqkvBt+lR/m1Jaryl69o1MjXEioAmeSka2zE3ZKZc2JBDnSpIFBy786aT8uGXM6dkUXxjhR6qq+O09LSICKsVCl+kBbvhBOIAjy6JCLv0ZN1xQUp6EMNyIAZz7k0D8vNpR3n4m6oyjcWkYcNANCYl2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR11MB4241.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(136003)(376002)(346002)(396003)(39850400004)(6706004)(36756003)(66556008)(31696002)(186003)(16526019)(26005)(83380400001)(6666004)(86362001)(8676002)(52116002)(956004)(5660300002)(2616005)(478600001)(66946007)(2906002)(316002)(16576012)(53546011)(31686004)(4326008)(66476007)(8936002)(6486002)(78286007)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?Z1h1bnNuUTd4Y0orZUpVaUVRWGQxZEpHWlhhYkZPUlpKYWdnSHZ0NWRPeEdi?= =?utf-8?B?UmVCbE5rS09zM0pxU29GVTlkY0VLRkpHL0xUbEtUQkE1eXlTQ2J5UGc2Tmdh?= =?utf-8?B?bXNJejBZRmlOMnQ5eEJVbzFDbERWaW5yQy9DT201RXhsdXpJTFRmY0ZrOGRq?= =?utf-8?B?c0FMZEtmaGRZaEpBQ1QxcnVIVmdWbWlzaExhYlpqbytNMTcxbXlUc0ZtT0tu?= =?utf-8?B?SnVpSHArbG5PTCtNNDlhRFBiTnNDV0p6dmRzMnFxWEErLzNYZHlHUWhLUWNi?= =?utf-8?B?L21LbWd2OUNWcHIwZjExM3hYeFR2NlJGQ1dDZDJTcGl3a1E5ZGh6MkViZnNu?= =?utf-8?B?VkozVHE5dnNzc1FaOUZnSjBENU81bFYxNmgzb0VnTXVwSWRhSCtaT2JIQUV0?= =?utf-8?B?WXJpSjdYQlRJV3UxUHpaVlJVSktpZmpGZFY0MUpETUYwQTdLNDlOWWVhNnhU?= =?utf-8?B?dzRSN29aMVhPWTB6RzhGQ05ycnJEQm9Pc2xiSHB3b2JZZXgrZ2w4RmIrc2ow?= =?utf-8?B?VnFtNi9uYkVxMEZ3enFQbSt2eUJqaVZ0WmtyR214dlpuVThPbURmMk9z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ange-CrossTenant-Network-Message-Id: ef356047-2e74-49eb-a1bf-08d8c764066c X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB4241.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2021 10:19:29.2574 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ccwzjRI2yhBQF8IXOXTwrxM6TJ+5iUzE9k5aMThYmFIhJ7Wz9hGkxuXm9ww72guzXjEXulBUZVltjwsECMlyKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3350 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/2/21 6:06 PM, David Hildenbrand wrote: > [Please note: This e-mail is from an EXTERNAL e-mail address] > > On 02.02.21 11:12, yanfei.xu@windriver.com wrote: >> From: Yanfei Xu >> >> Gigantic page is a compound page and its order is more than 1. >> Thus it must be available for hpage_pincount. Let's remove this >> meaningless if statement. >> >> Signed-off-by: Yanfei Xu >> --- >>   mm/hugetlb.c | 4 +--- >>   1 file changed, 1 insertion(+), 3 deletions(-) >> >> diff --git a/mm/hugetlb.c b/mm/hugetlb.c >> index a3e4fa2c5e94..73d602f8c7e2 100644 >> --- a/mm/hugetlb.c >> +++ b/mm/hugetlb.c >> @@ -1501,9 +1501,7 @@ static void prep_compound_gigantic_page(struct >> page *page, unsigned int order) >>               set_compound_head(p, page); >>       } >>       atomic_set(compound_mapcount_ptr(page), -1); >> - >> -     if (hpage_pincount_available(page)) >> -             atomic_set(compound_pincount_ptr(page), 0); >> +     atomic_set(compound_pincount_ptr(page), 0); >>   } >> >>   /* >> > > I can spot similar handling in destroy_compound_gigantic_page(). If this > is correct (which I think it is), we should tackle both occurrences at > once. > Agree. Will do it in v2. Thanks, Yanfei > -- > Thanks, > > David / dhildenb >