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 1F3EAECAAD3 for ; Thu, 15 Sep 2022 04:24:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229479AbiIOEYu (ORCPT ); Thu, 15 Sep 2022 00:24:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbiIOEYt (ORCPT ); Thu, 15 Sep 2022 00:24:49 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E74920F4C; Wed, 14 Sep 2022 21:24:45 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1F43D34234; Thu, 15 Sep 2022 04:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1663215884; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Rp2hb7jsVkIpo1uaIkf2AqZV7igkV0nPtVBey4vQ3iA=; b=heSGgyWHzuf3rMoxxqD2XF0OwMvMrOesmZZaVvvPtZ3cxmqQQMI3AHyJ65Sk5SdK9iPLka zZ2V85Ei9YcD44YLDVhzdz0JN7ixC0FS4ov5fdk8PInEo4rOqZG0SjZZKhuio317HI/Bzh ts9TyxzYSVnBjMyvLuvIx7bdIl6QYRE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1663215884; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Rp2hb7jsVkIpo1uaIkf2AqZV7igkV0nPtVBey4vQ3iA=; b=V7JIYzWAv7lP7/23sPcdYKdxyOxAIlqEZGrIoKT4zXukt6sMBBsM/mQ1b6xzjCAb7QNopS HfxwHUoFtxyIeHAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A248D139C8; Thu, 15 Sep 2022 04:24:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id HVX4JAupImMkJgAAMHmgww (envelope-from ); Thu, 15 Sep 2022 04:24:43 +0000 Date: Thu, 15 Sep 2022 06:24:41 +0200 From: Oscar Salvador To: Doug Berger Cc: Mike Kravetz , Muchun Song , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] mm/hugetlb: correct demote page offset logic Message-ID: References: <20220914190917.3517663-1-opendmb@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220914190917.3517663-1-opendmb@gmail.com> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Sep 14, 2022 at 12:09:17PM -0700, 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: Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE Labs