From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.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 6496A1FDA61 for ; Wed, 11 Feb 2026 13:32:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770816727; cv=none; b=jaqy0QYz/yvO3Th8JJt20lqlkEMDaVsPqvX1CROiiyqIVXc+r5iAsatb2ld1L/0tG4KMJ1OpXTQHRjrRpAHiXNP58jHdnZgAk4UnthamNocibfnintTJOpleGIkXrLl2Pv3ixCF8N+Yz5FKlyyYtTaDYG7cBoIipbi2cZf2bOkg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770816727; c=relaxed/simple; bh=Y9usQ18EUDQxjrUpUnn9TnIBTrlTnG3Vw8h/BHMnQlU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=J5eNLirEqZlrISqobYlye+wsBBzd1fUiWbTZe5RjbE6UJlcwmNPfzsVXxmBDaIywGcwL+n8npWCXsuFtILWk9n4y6Kc13FYf7YuhcTnZ1yCwiYInQfwrCxyF5NHQpy7uH9XvAVo1oTIwCncaVgvxg0JUsurfXCnUjgbvAi0ujbA= 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=TjRnkIS0; arc=none smtp.client-ip=91.218.175.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="TjRnkIS0" Message-ID: <7790f69d-7406-4535-994b-8f4b240269ba@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770816723; 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=y9YxsIwqeN3dS0eCJxBW+bEM8pY+VJOr0dsjKfFmZ8E=; b=TjRnkIS0aaSRisfZyYi5uu+HT9Ncfug0bwgBNPEghsr+7Sbqj44loph9Pd9yUzcICkxICW u+eSvI6LZM/lZAvks8C1IDMkHRFOLlP5ARO3CPUO029yjBiNBXyYPofB5dcUKeWJFShqAy 5Y/bVfILjkPkzopq2gOxIUK9GjsG6qA= Date: Wed, 11 Feb 2026 13:31:51 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [RFC 2/2] mm: thp: add THP_SPLIT_PMD_PTE_ALLOC_FAILED counter Content-Language: en-GB To: "David Hildenbrand (Arm)" , Andrew Morton , lorenzo.stoakes@oracle.com, willy@infradead.org, linux-mm@kvack.org Cc: fvdl@google.com, hannes@cmpxchg.org, riel@surriel.com, shakeel.butt@linux.dev, kas@kernel.org, baohua@kernel.org, dev.jain@arm.com, baolin.wang@linux.alibaba.com, npache@redhat.com, Liam.Howlett@oracle.com, ryan.roberts@arm.com, vbabka@suse.cz, lance.yang@linux.dev, linux-kernel@vger.kernel.org, kernel-team@meta.com References: <20260211125507.4175026-1-usama.arif@linux.dev> <20260211125507.4175026-3-usama.arif@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Usama Arif In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 11/02/2026 13:27, David Hildenbrand (Arm) wrote: > On 2/11/26 13:49, Usama Arif wrote: >> Add a vmstat counter to track PTE allocation failures during PMD split. >> This enables monitoring of split failures due to memory pressure after >> the lazy PTE page table allocation change. >> >> The counter is incremented in three places: >> - __split_huge_pmd(): Main entry point for splitting a PMD >> - try_to_unmap_one(): When reclaim needs to split a PMD-mapped THP >> - try_to_migrate_one(): When migration needs to split a PMD-mapped THP >> >> Visible via /proc/vmstat as thp_split_pmd_pte_alloc_failed. >> >> Signed-off-by: Usama Arif >> --- >>   include/linux/vm_event_item.h | 1 + >>   mm/huge_memory.c              | 1 + >>   mm/rmap.c                     | 3 +++ >>   mm/vmstat.c                   | 1 + >>   4 files changed, 6 insertions(+) >> >> diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h >> index 22a139f82d75f..827c9a8c251de 100644 >> --- a/include/linux/vm_event_item.h >> +++ b/include/linux/vm_event_item.h >> @@ -111,6 +111,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, >>           THP_DEFERRED_SPLIT_PAGE, >>           THP_UNDERUSED_SPLIT_PAGE, >>           THP_SPLIT_PMD, >> +        THP_SPLIT_PMD_PTE_ALLOC_FAILED, > > Probably sufficient to call this THP_SPLIT_PMD_FAILED and count any (future) failures (if any) as well. > Makes sense. This was just a patch I was using for testing and I wanted to share. It was always 0 as I couldnt get split to fail :) But I can rename it as THP_SPLIT_PMD_FAILED as suggested and we can use for future split failures (hopefully none). > It's a shame that we called a remapping a "split" and keep causing confusion. >