Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp22936pxb; Tue, 2 Feb 2021 21:26:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpcbIQEBG+jhdhKbwDGTaXluJqyCNdQDM+IcJJZiD+oWlwFSVptXXlJJetoYEi7HXAYdix X-Received: by 2002:a17:906:fb9a:: with SMTP id lr26mr1543416ejb.474.1612330015483; Tue, 02 Feb 2021 21:26:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1612330015; cv=pass; d=google.com; s=arc-20160816; b=i24BZmhd7iq6ShKGBzrgQyGYZQgxYCEm5Mt6Ks2dW+0djkf+4QczQ40MVOgVjKu+um fMmiz1gksWpPXdQi1Hu8AbOz5kDx3mifjoBJGHt3iUhu+GMItZn2nLROjSMibuO55Xnw m0dkX0rfXV16rDLsp1eUJUcZNZKZssJOTltGuMgLAnP1mrLDmMD5AhN5xG5QjQ3YIyEQ srzIotPIhTvzYbeIF+U3lgpvMq09jVW9/Isgoa5gEEBez6ketgiQaokG0/RzOwmy4t3g +5EgotLFy0ybIYwoj1ThV+5W2b8SVS+BYCN90BnsyiAmPB36GySyt/zey8zkMXKqhBoI 2yaw== 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:dkim-signature; bh=r9QTCqHoY3tNYVA5ioO+XAb2rP2zS+yEQgb69bemgv4=; b=pxxuYw2SjzL0cKos0xBDKhLhPwcGD7/z7H9yui9SJAwBnxn5wUd/mbVBCDocdS7/0/ xu21me81/j8WVJ/Fng3yQIQEpVdQENTNLKlBU1DQ05qodvZu1GMWxaAaghBvHzj5OLfj hsYByKkgcvrArhFrxdgD0G755N2eBGohdeW8/pDvUOAfh4XfCcLXjBIne4dJJvxyrQ1f Jwp7gc26C3hh8LxTu8mh8VXmaMgecbpzNw0ILcSEHOmGdIxvFAnT9WGW9rWpO9ePv8O4 61iOUG6WcoS6/bVDqww6i2y8f0K/+VM82yi/nfrArDIp2VPuLEVM8mJYKzB7MY94npEI 48fQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=LVhubk23; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=pCuvTzXG; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si559933edo.512.2021.02.02.21.26.30; Tue, 02 Feb 2021 21:26:55 -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=@oracle.com header.s=corp-2020-01-29 header.b=LVhubk23; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=pCuvTzXG; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229539AbhBCFZP (ORCPT + 99 others); Wed, 3 Feb 2021 00:25:15 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:39938 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbhBCFYx (ORCPT ); Wed, 3 Feb 2021 00:24:53 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 1135IuBv167572; Wed, 3 Feb 2021 05:24:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=r9QTCqHoY3tNYVA5ioO+XAb2rP2zS+yEQgb69bemgv4=; b=LVhubk23QVaRdPzpIMLdZWBl54sVeZVxBCMyWTdB7osS/F5aQHLsRBOdep5OO0owJ7zD OUN9xZjx3zQHeAXNeAMqWmXhU7vuWnV11hd5W+A4b+OdwJnr+LvR5abTsbZ54i1oeJqN FAsxykXQ5zKEtRp6J0VDMaUEvhuXnq0JWk6YGkeMUQeJbGasr2iZBlfbGTE7CTSwYsoU f08j0Rn/U9LhpLuqrerfrnTOJfYXH0/SMS1BsCb2Pcaoxb61ou52x2dHVhguW9Q16vdX /pBT5gMyY1qIN9g86woNG/vPsigWxgLnURKk50WV5nZawn/K0utwxKnIaLCkREEgCnv/ +g== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 36cydkx3bw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 03 Feb 2021 05:24:07 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 1135JWoD153980; Wed, 3 Feb 2021 05:24:07 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2175.outbound.protection.outlook.com [104.47.56.175]) by aserp3030.oracle.com with ESMTP id 36dh1q5rk0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 03 Feb 2021 05:24:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XrdhkwsX/0r1596xZJVj0F+2Lk/kk4QlfnGGqBbF6KouVTKSN1KtgPydGVYCGUbaQ6lz05XYVG1p9pPt60guOgHDo3uDHZSySHTLKdB30jn2ZJbbabx60KqcEplje89sTBu6xK4FtjPmNNjRgtL9wrgbY1oyT+VTmR+mxpVp+lRnqSJPUcV0Lg8UpPK71tLciazuHtJ6ulQ5qggpIwHZ4IMKdEKSTrLrFmK2SVWqJnBdWkOp8p2+lNqBAZhQSJ5BhCRUybWe1apiS5VjaYuhk9kl8ZcNr9umqslEBFijDUij92gBagPLHPpPHcJWvdJG0epw/AfQAaOE4BQjKFzqUA== 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=r9QTCqHoY3tNYVA5ioO+XAb2rP2zS+yEQgb69bemgv4=; b=CWB5gZ+SPqtO7uZMGM/GeIm9aQ0mavh4VvbwMIcrjCrIo3P/2OOfxHHIUK9z3YT7tUQwpW8pig2S70cN4O31qmZ3KZqkrlP4LmyRKcPdkSWagv7f/yuv1hS/n68ix6YoLoUIWQ7WzG7dMrH4lK2CuvScO52/ww7osKK5Tr79hG9TDXdPyWeSCC/lKGcaVMjBlE7+dtNYDpGSO91ye8yhFUwvsJadDTe68iB711zuAI1QyuiW6rjVFspkMS5tupuVrV3K3RSoV0+6s1cQiqgCHzjeX6bOahNMFQpYptztKnBikxhYP0ZpjPAGQTb8utkuytycddwyvUqyM0OrfS3oOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r9QTCqHoY3tNYVA5ioO+XAb2rP2zS+yEQgb69bemgv4=; b=pCuvTzXGGPs8x3a632Ss8v76yWNsc0YtFC3e/Cp/HmgKBD9qv2hMVlBzrwnMBj4+Pmuv8/JkHvNa2N2+ZdBmYSzOsXV8AA9eClOfbfb8CO4AWMK4v8tOlCnRY1Z/dpJqG8ynYI4HsRCPtTe2Aua1vgMylmLxXS2S1m+8S33nCpo= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=oracle.com; Received: from MWHPR10MB1389.namprd10.prod.outlook.com (2603:10b6:300:21::22) by CO1PR10MB4609.namprd10.prod.outlook.com (2603:10b6:303:91::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16; Wed, 3 Feb 2021 05:24:05 +0000 Received: from MWHPR10MB1389.namprd10.prod.outlook.com ([fe80::897d:a360:92db:3074]) by MWHPR10MB1389.namprd10.prod.outlook.com ([fe80::897d:a360:92db:3074%5]) with mapi id 15.20.3825.020; Wed, 3 Feb 2021 05:24:05 +0000 Subject: Re: [PATCH] mm/hugetlb: remove duplicate codes of setting compound_nr To: yanfei.xu@windriver.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210203044055.89618-1-yanfei.xu@windriver.com> From: Mike Kravetz Message-ID: <8f0c2bd7-5fc7-6f22-3f68-21bf235ce930@oracle.com> Date: Tue, 2 Feb 2021 21:24:03 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 In-Reply-To: <20210203044055.89618-1-yanfei.xu@windriver.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [50.38.35.18] X-ClientProxiedBy: CO2PR04CA0138.namprd04.prod.outlook.com (2603:10b6:104::16) To MWHPR10MB1389.namprd10.prod.outlook.com (2603:10b6:300:21::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.2.112] (50.38.35.18) by CO2PR04CA0138.namprd04.prod.outlook.com (2603:10b6:104::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.17 via Frontend Transport; Wed, 3 Feb 2021 05:24:04 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 91b08a48-d50b-4afd-7297-08d8c803ec72 X-MS-TrafficTypeDiagnostic: CO1PR10MB4609: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FWOrHtP2G4G7upaU8K8ksSwNXAjHSJL35jX9DSZSWPOH6Hxstnq45+VDQ545s0BT8q85hWlE0TjsVv2OdPBeaXVJwbUsvoFxIP8YpLX4r8MMaVLDN3IDEOKEH//l36gmLdnEz5UIEQCIYMxOQFmUSushBp6N7CNPlxGqCa/7HNIZ3MYMMQhGVK9huZxBe+QbqcqFak9bOYCZ5DeGgdhmL5+2dwAetnxzGFq9oEJrQ4YQTCO8DG0Yq3Rm+5M2OWU9EjL7+aSfQMWfv3Efp9nyMKhSFETSPl7w1HjeyP+RamFpNlUJGbrOrTPhnZlJZA64SM+MIgoa7WQtyQIz2dAUVuG2KgBWmc9BIb08J17qyzCqYDIY20XLTN1kbHAowIGwRfhLckheYeR8y8QLDp2sKnbVb4JM4M20RF0dWmE2NrBuIhaF9GpgjLkyUqyKSXKlZCuUQ1UqMS+VDoMqzHVZStJGrC7MUqJPvxZ19bQAitiKDmFJ3sodXDVpK2XgnHnAlZyxpZwgHGcgILPeoTeSQrKmIIuzq/jng8FUBj3xM/gGlak3LR92enBa6Y/V+f2UO/HXT0rFvU3w/FZX2NQ74Xtkr5a/X9yYWd0hH2Qx5pU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR10MB1389.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(376002)(346002)(366004)(136003)(39860400002)(396003)(66946007)(8676002)(66476007)(4744005)(478600001)(83380400001)(36756003)(8936002)(2616005)(316002)(16576012)(66556008)(186003)(2906002)(6486002)(31696002)(16526019)(53546011)(5660300002)(86362001)(956004)(52116002)(31686004)(44832011)(4326008)(26005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?Um9QSTcvV1k5a3RXVUVVQjRGREh6Ym9keVdpMG9QOEY0VUVYczJweC9HNktS?= =?utf-8?B?S3hKUXRpMmVjWWxQY3VHQTJvelg0Zk5FZW1wcGNoMjh0QnVTV3RRcGJCRi9w?= =?utf-8?B?L05BbnFuRUpwSFF3ZWpqenFYWHlPYUxGSnRqeVYzRUh5SFJlUHUxVnp0VTBx?= =?utf-8?B?UlpjZkZqbE9xcWhtbTV5MlJxaTRTWGNQVTRwb1lYUFhTd0N2MmZiMml4ZFpi?= =?utf-8?B?djhPZXBMeCtmbWxDMFAvZnRIMFRjNlF0UmFHSWxKSndrbTZuYTREOTlrdTdT?= =?utf-8?B?a3o2dTY3ZU1xVmovWktEVElFNEI1SDRnV2JWUm9XLy9Gc2U3Sms2MjhxNXdl?= =?utf-8?B?NTg3K1U4TEFSWTR6L0JObmx2aTZpVUxVYmpObWhIb2lPMDV4VTlRdmZGZmpF?= =?utf-8?B?ZkRQc2RXTEd6VnVZUU85b2swSURoZ2NWY0pjOHVhTUVHdm5xQS96bzE4Y21u?= =?utf-8?B?d3JYYVhNMm93bXJ6OWF2ZUNWU2RVS3BjRHNqeDFtL2lrM0hDS2dCTFZ5MnNI?= =?utf-8?B?WkVhUDhBY2FOV0Z4MzNBUDJoc1BpdWJlaXQ1eDRrZnhUQjBUcDlWNktsL294?= =?utf-8?B?aHI0YkNZc09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?utf-8?B?TUFLT1JyYXhvSEVZTGlqbTJtQWN4aUYzYjdhK0ZjQWx2dXlFWDh4TFViaGJ0?= =?utf-8?B?ZGJKMENueHhPMS9QaXJISTNwcE5iYlZmempVdWVWQ1VRLzV5dmJpZzdDeXg4?= =?utf-8?B?SW5OdCtEdWJDckJBUUxpYUVVbHpWQmZIOWUrNldsRUF4djJPY1dJbVYvT2c4?= =?utf-8?B?ZmhKVVJWaW5LempSdTdCWXJxendMbkNVYTZVNlE4S2oxL3VhMXZtSVRhVzMx?= =?utf-8?Q?ezZ7iBEbg3rvOTtYF9MdaBgoDmnA0e/mGHtuCHL?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91b08a48-d50b-4afd-7297-08d8c803ec72 X-MS-Exchange-CrossTenant-AuthSource: MWHPR10MB1389.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2021 05:24:05.2254 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: C58x+KzNhKXZCeBvDwUF1fUM8ZMbWneFsVz8PrNVd0KlRWcC74K26hlVSFhpsTHkLz/hbddeyzmnQOIVl93C6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4609 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9883 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 phishscore=0 suspectscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102030030 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9883 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102030030 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/2/21 8:40 PM, yanfei.xu@windriver.com wrote: > From: Yanfei Xu > > set_compound_order() set both of page's compound_order and > compound_nr. It's no need to assign to compound_nr again, so > remove it. > > Signed-off-by: Yanfei Xu > --- > mm/hugetlb.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index a3e4fa2c5e94..ac249b1583de 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -1228,7 +1228,6 @@ static void destroy_compound_gigantic_page(struct page *page, > } > > set_compound_order(page, 0); > - page[1].compound_nr = 0; I may be reading the code wrong, but set_compound_order(page, 0) will set page[1].compound_nr to the value of 1. That is different than the explicit setting to 0 in the existing code. If that is correct, then you should say why the explicit assignment is not necessary. -- Mike Kravetz > __ClearPageHead(page); > } > >