Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp252825rwn; Wed, 14 Sep 2022 20:13:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR6TkYFi6L5KH9kxDiQ8Y7GeAQrkgYwJqBLxHn9Xf6WbJDiPWaPpg38zrGSoiqu5fqPvEvls X-Received: by 2002:a17:907:1ded:b0:76f:af8f:942e with SMTP id og45-20020a1709071ded00b0076faf8f942emr27295213ejc.120.1663211602768; Wed, 14 Sep 2022 20:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663211602; cv=none; d=google.com; s=arc-20160816; b=s/RH/WC5541Og7O0ESpTePoYzdmLXPsfitU9IMFGpOfZqy7LKq8G/BGXMP4iZB5j/M CRk4LXmRbXO3ZowIWG8aOk8fBrpMRPjuK8Kp5fA/9XrNDxFEPwvi75ZBqAYSV+6dQYo5 jFNyM/8MnEeV081luYz0FYScesqvSJZbkP+77/aE3ik2BgpVmZLYgEIkho8GOwElduG1 5hjtjl9yz8M1kLJhfe26aZSE1wG9IzLerDTIAL+w+mMNbo4sY/i++UfULMrR8FA9iKtc I2JiCNX01d/NYN+yOyLv/WFAnShZZH/HkeNOhfaa+ZYvJR85UE+ZAH3a4qoLdoyFFPlu t/zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=xUwyX1msHoJS+tshFPJ2fPgjV7myfYRITsUI4Mywh5E=; b=sKW5q/oAR99fy5h299E34048BmRct+sk9/qF/YIsb5hHeKvBoq5Es6JoOdQqTn8kBp k8nEs8L3QsH9aXqWa98kAn1/XLTbdL3HL1d+7Z6qFWZ8KYDbNR21AwqVohNnvhyApMp+ lB7hob3qI1YJ0wQdlR3z56Ku7/Zm1LvsOPHmuyaC1T0yIr/JtRBWZvLVA27mWbgMbrOn pAlrAIelIQpyOQYxGL8iZ85cR5+UFLgnBKGmsAOQUpZIb54jng4U7GInL9sSqPlBmu0t JHdJpsEqbUN5Q171bh24J2l+1JMuHXtrOqy2pqwLGUePa8ZEXGh6TxuIq2ZJeF+75pbK zBNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd11-20020a1709069b8b00b007803b10cc5bsi3068766ejc.614.2022.09.14.20.12.56; Wed, 14 Sep 2022 20:13:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229986AbiIOCtf (ORCPT + 99 others); Wed, 14 Sep 2022 22:49:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbiIOCtd (ORCPT ); Wed, 14 Sep 2022 22:49:33 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0D499FF9; Wed, 14 Sep 2022 19:49:28 -0700 (PDT) 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 0A66D1063; Wed, 14 Sep 2022 19:49:35 -0700 (PDT) Received: from [10.162.43.6] (unknown [10.162.43.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C76C63F71A; Wed, 14 Sep 2022 19:49:25 -0700 (PDT) Message-ID: Date: Thu, 15 Sep 2022 08:19:22 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] mm/hugetlb: correct demote page offset logic Content-Language: en-US To: Mike Kravetz , Doug Berger , Andrew Morton Cc: Muchun Song , Oscar Salvador , linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20220914190917.3517663-1-opendmb@gmail.com> From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/15/22 02:48, Mike Kravetz wrote: > On 09/14/22 12:09, Doug Berger wrote: >> With gigantic pages it may not be true that struct page structures >> are contiguous across the entire gigantic page. The nth_page macro >> is used here in place of direct pointer arithmetic to correct for >> this. >> >> Fixes: 8531fc6f52f5 ("hugetlb: add hugetlb demote page support") >> Signed-off-by: Doug Berger >> Cc: >> --- >> mm/hugetlb.c | 14 ++++++++------ >> 1 file changed, 8 insertions(+), 6 deletions(-) > > Thanks! > > Reviewed-by: Mike Kravetz > > To answer Andrew's question about user-visible runtime effects. > We could get addressing exceptions. However, this is only possible in > configurations where CONFIG_SPARSEMEM && !CONFIG_SPARSEMEM_VMEMMAP. > Such a configuration option is rare an unknown to be the default > anywhere. In that case, should this be a 'Cc: stable' ? Although it does fix the above mentioned commit for a possible configuration. But should this be backported, if there could not have been an affected system ?