From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) (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 598BC23ABBE for ; Mon, 20 Jul 2026 02:36:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784515002; cv=none; b=cC52hAE5mLcx/PPrsBjW/16oi3jcLAT31Dj/B5Iyh+FOeCS2COn5ixYnyuMARgbw5SJpb0a0KN3Mhgmwdi/owF4yj+qAKN+dUzzY5OI5Tl/ylcu3z5iwlBTgs5KoSgGR6SgL2Nbt9kjEgYvhakluqUINsiJrl7YcdO81y35Bpck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784515002; c=relaxed/simple; bh=BnY1OUJgMV/YL/WyEIzD4Ylveq2RJTx0N1HyfQAyw1I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Wis93neLWpHWQPhH1vE0B3CuWp9Ffkv/XeN7hMUQjx/wq1UgHIJbAdmk6WNqibw7491FGV/08fvH3PGb5BzXT+xM/f5mcx7qaLEYwxolj+MCqLGkP0BzchKUcLbIQHHMG4gQubm/2dQFH6kCrJydd0kD+2/moqQof7n440a0xg8= 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=eOkJFHgM; arc=none smtp.client-ip=95.215.58.173 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="eOkJFHgM" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784514998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KusPc2Cpip6sPBv9PieUVxeP0LYiRvmdBMosAeD5k90=; b=eOkJFHgM6kcMlXyh79+foKL5z5ba2DkfV7iAXPTnhaKpSyAfu+A4jkqQyailvUNMc/6G4M zWGbF8zey1Q6P6wxgRW81ZPZq542iHED+d3N/jM8OdRtPmCigRL/bxu5+GnNbEoTTCgObo hFa9uZ3fDfD2zOrYYfaVO6DiCuPlLV4= Date: Mon, 20 Jul 2026 10:36:14 +0800 Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] mm/thp: expose deferred split folio memory usage in meminfo To: "David Hildenbrand (Arm)" , "Lorenzo Stoakes (ARM)" Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Andrew Morton , Ye Liu , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Kairui Song , Qi Zheng , Shakeel Butt , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Zi Yan , Baolin Wang , Nico Pache , Ryan Roberts , Dev Jain , Lance Yang , Usama Arif , driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org References: <20260717063025.168436-1-ye.liu@linux.dev> <46017e29-48a3-4a74-8c5a-0be9d912deaa@kernel.org> <41bc5ca5-08ed-4aba-86a3-d7f44b16e6f5@linux.dev> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Ye Liu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 在 2026/7/17 18:29, David Hildenbrand (Arm) 写道: > On 7/17/26 11:54, Ye Liu wrote: >> >> >> 在 2026/7/17 17:48, Lorenzo Stoakes (ARM) 写道: >>> On Fri, Jul 17, 2026 at 11:33:05AM +0200, David Hildenbrand (Arm) wrote: >>>> >>>> Don't expose it to user space. >>> >>> Yeah please stop. >>> >>> We don't want this change, it exposes internal implementation details. It's a >>> no. >>> >>> Next time send an RFC or a discussion thread. >>> >> Yes, sending an RFC would be more appropriate. >> >> I'd also like to ask if it's possible to implement this in >> `/sys/kernel/debug/deferred_split_pages`, or are you completely against querying this statistic? > > It's not pages. It's folios. > > You don't know how much memory is there to reclaim. You don't know if it can > even be reclaimed. > > You don't even know if there can be any memory reclaimed *at all*, because there > are scenarios where we add folios that are actually *not* partially mapped today. > > You don't even know the relationship to memcgs. > >> >> How can we quickly identify this situation? >> I believe some people will still be confused: where did the memory go? > > Just like other caches that are shrunk on memory pressure. > > We do have a "split_deferred" and a "nr_anon_partially_mapped" counter in > "/sys/kernel/mm/transparent_hugepage/hugepages-2048kB/", maybe that helps. > Thank you, it really helped. -- Thanks, Ye Liu