From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68782158535; Tue, 3 Feb 2026 02:39:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770086359; cv=none; b=GNGC1+zr8DHGzwcUeAI6Y1bCSsNPwRfuljX/tNGV82dY01NDJZxN+qldrKze9TMt8WIO1rlDbKIG/zx/UB9t9p6dVm2qychX+rwSduNCX8jlrOiXiZ6Mqu+rPlViTZulr2zF9uHVNg9m95FEq5oC72gg4WYPPANepFZddcDCIa0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770086359; c=relaxed/simple; bh=PFouNFmJPcItJkoCjf2nW+gBfA1Uk2K5fhShN0MNegw=; h=Date:From:To:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=HPl82D5dIXdHErDcZZOttOMV1yBD/rN27zIAB4+GaKkTeLCZqyB9arlH1rw81UOSjinNFFytaO8ytATBakGv0ncXJ2UV+4wbUopGElLc6vDYEOsDJ0LcytIEmYpxxmK+563G+VySNr2LjFTrHIoN+PPE3bzfLQPwY6aV73bMOYQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=wIupbiN5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="wIupbiN5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE9A9C19425; Tue, 3 Feb 2026 02:39:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1770086359; bh=PFouNFmJPcItJkoCjf2nW+gBfA1Uk2K5fhShN0MNegw=; h=Date:From:To:Subject:In-Reply-To:References:From; b=wIupbiN51G8pvhpGQEtZRLIGcxFA1YurL9mL8e+20w7tnXqaOn2GY8VihVfXh9HQx u0BTBD/1GWs7VkQAjwe9tnM2Mvl2+wkI1HaekzWae1XaYUXoLMq+kR+MzT9sU6OkbP 9v4uevy6Zw0lZEmHCbh8/OunQ1Zn22Lu9ekbz6AE= Date: Mon, 2 Feb 2026 18:39:18 -0800 From: Andrew Morton To: Joshua Hahn , David Hildenbrand , Muchun Song , Oscar Salvador , Wupeng Ma , linux-kernel@vger.kernel.org, linux-mm@kvack.org, stable@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH v2] mm/hugetlb: Restore failed global reservations to subpool Message-Id: <20260202183918.057dac34b3a1819328814fc9@linux-foundation.org> In-Reply-To: <20260121094754.8a30b7f7fcff34f579883e40@linux-foundation.org> References: <20260116204037.2270096-1-joshua.hahnjy@gmail.com> <20260121094754.8a30b7f7fcff34f579883e40@linux-foundation.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 21 Jan 2026 09:47:54 -0800 Andrew Morton wrote: > On Fri, 16 Jan 2026 15:40:36 -0500 Joshua Hahn wrote: > > > Commit a833a693a490 ("mm: hugetlb: fix incorrect fallback for subpool") > > fixed an underflow error for hstate->resv_huge_pages caused by > > incorrectly attributing globally requested pages to the subpool's > > reservation. > > > > Unfortunately, this fix also introduced the opposite problem, which would > > leave spool->used_hpages elevated if the globally requested pages could > > not be acquired. This is because while a subpool's reserve pages only > > accounts for what is requested and allocated from the subpool, its > > "used" counter keeps track of what is consumed in total, both from the > > subpool and globally. Thus, we need to adjust spool->used_hpages in the > > other direction, and make sure that globally requested pages are > > uncharged from the subpool's used counter. > > > > ... > > > > Fixes: a833a693a490 ("mm: hugetlb: fix incorrect fallback for subpool") > > Signed-off-by: Joshua Hahn > > Cc: stable@vger.kernel.org > > This (simple, cc:stable) patch presently has no reviews, if someone > could please be so kind. Oh. Joshua, it's unclear from the changelog - what are the userspace-visible effects of the bug?