From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 B47343D646B for ; Wed, 25 Feb 2026 17:13:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772039597; cv=none; b=iF5FJMGazbnk1NYR/UjE72xO4zpAhzeLhvGVeaAp/M5t8Ewv8rBf8IC3dxzGaOqIipW4Z0uSQepbpmgsY9vaulknc1OoltYWrRN5pGRgsO3fjZ2sO6XaH546bjUQHsx6rno3/3gclgPcCRUvXFtrMfWqcZW4FO7dOyaDPzvE2k4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772039597; c=relaxed/simple; bh=jvx8OI8589pU7n8VwmuC3ZAxbXCuSeaMfn/7QGicxQY=; h=Date:From:To:Cc:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=NJyTLT09xihriGbNKCz2Ju3V0VyFvGt5iLB1UVLeD3VaeY81Jy936D69Oij9W1w8GgsWZmVBGzI66aREPnWjgYEGsLE25IlLTrrzw3ZNI17KstsNe7fC6bnO4aSqOV1VSHfziKzb83YzK5sCAlbrEOwBOaAtkARQLX/qzqordBI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=KbWKnyxw; arc=none smtp.client-ip=91.218.175.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="KbWKnyxw" Date: Wed, 25 Feb 2026 09:13:07 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1772039592; h=from:from:reply-to:subject:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type; bh=EcNfu5QPEljmkghcq+Tc5PJXRUsruQgJIeVqlzVEC30=; b=KbWKnyxwTcXSZJwPM1rqkKE+hJju1HOUMTcxekn5QiC+G1Jxy4/7HC4yq8ttQg81AOHKh8 2kSYL5c8KZw/uiw/MyG+9z+XpjvevbTTXd3+3B2SYw5gi5FBKzVuLfH7/fey+budGk9WfI rz4ZIRXnRqM6vf7KB9i5fcVdC41LMmU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Axel Rasmussen Cc: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, muchun.song@linux.dev Message-ID: Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Migadu-Flow: FLOW_OUT Bcc: Subject: Re: [PATCH] Revert "ptdesc: remove references to folios from __pagetable_ctor() and pagetable_dtor()" Message-ID: Reply-To: In-Reply-To: <20260225002434.2953895-1-axelrasmussen@google.com> On Tue, Feb 24, 2026 at 04:24:34PM -0800, Axel Rasmussen wrote: > This change swapped out mod_node_page_state for lruvec_stat_add_folio. > But, these two APIs are not interchangeable: the lruvec version also > increments memcg stats, in addition to "global" pgdat stats. > > So after this change, the "pagetables" memcg stat in memory.stat always > yields "0", which is a userspace visible regression. > > I tried to look for a refactor where we add a variant of > lruvec_stat_mod_folio which takes a pgdat and a memcg instead of a > folio, to try to adhere to the spirit of the original patch. But at the > end of the day this just means we have to call > folio_memcg(ptdesc_folio(ptdesc)) anyway, which doesn't really > accomplish much. > > This regression is visible in master as well as 6.18 stable, so CC > stable too. > > Fixes: f0c92726e89f ("ptdesc: remove references to folios from __pagetable_ctor() and pagetable_dtor()") > Cc: stable@vger.kernel.org > Signed-off-by: Axel Rasmussen Acked-by: Shakeel Butt