From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-m49211.qiye.163.com (mail-m49211.qiye.163.com [45.254.49.211]) (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 8C1EC394471 for ; Mon, 11 May 2026 12:45:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.49.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778503524; cv=none; b=plz5+mkh580XVNlGi7nTg347iEnX6pGFmGmLQGxnnZh+UvplWKonbWACy2/2Y+A5s60Alv+fIBPKt9DzmxfpdzYz57AlaBLLIhm3/w5wMHNAlhZU/2iKPYaoUjBEduG2Z/ZVm5C22Bl4RN6DUBTh092OrNweyimYW3GM27uPlj8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778503524; c=relaxed/simple; bh=vAC1S0kdvZSKAmKOR7/OUCHovYqVoAjtQGGCpPsFujA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WGyR2/D7AUWVM0lUgy1e7Mfn0UIh9ncRVEUDCZokCoiHmXYlzir/jI9yr9pDyZH6FAx4Vt1nOX7Eg8l06ccHPnDNFETe5dV/TZ8D7wnYd2sMaTp4hknusmVtNGv+nhK5MljqeN8fA0QG+bum9NTFKVx+d6xYP7pt385goGddfkA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=easystack.cn; spf=pass smtp.mailfrom=easystack.cn; arc=none smtp.client-ip=45.254.49.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=easystack.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=easystack.cn Received: from [192.168.0.59] (unknown [218.94.118.90]) by smtp.qiye.163.com (Hmail) with ESMTP id 19f9af50a; Mon, 11 May 2026 20:40:07 +0800 (GMT+08:00) Message-ID: Date: Mon, 11 May 2026 20:40:07 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 0/3] mm/page_owner: add filter infrastructure for print_mode and NUMA filtering To: Michal Hocko Cc: akpm@linux-foundation.org, vbabka@kernel.org, surenb@google.com, jackmanb@google.com, hannes@cmpxchg.org, ziy@nvidia.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20260511033017.747781-1-zhen.ni@easystack.cn> From: "zhen.ni" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Tid: 0a9e170d4a260229kunm8ac60bde304377 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFJQjdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkaGh1PVkpDHkJPThlKQ09OGlYVFA kWGhdVGRETFhoSFyQUDg9ZV1kYEgtZQVlJSkNVQk9VSkpDVUJLWVdZFhoPEhUdFFlBWU9LSFVCQk lOS1VKS0tVSkJLQlkG 在 2026/5/11 20:23, Michal Hocko 写道: > On Mon 11-05-26 11:30:14, Zhen Ni wrote: >> Solution >> ======== >> >> This patch series introduces a flexible filter infrastructure with >> two initial filters: >> >> 1. **Print Mode Filter**: Outputs only stack handles instead of >> full stack traces. The handle-to-stack mapping can be retrieved >> from the existing show_stacks_handles interface. This dramatically >> reduces output size while preserving all allocation metadata. >> >> 2. **NUMA Node Filter**: Allows filtering pages by specific NUMA node(s) >> using flexible nodelist format, enabling targeted analysis of memory >> issues in NUMA-aware deployments. > > How does this work when there are multiple consumers of the interface? > E.g per numa tool to watch node lock page_owner information? > I understand your concern about concurrent access. Are you asking about this scenario? Scenario: Multiple tools monitoring different NUMA nodes Tool 1: echo "0" > nid && cat page_owner > node0.log Tool 2: echo "1" > nid && cat page_owner > node1.log The current global filter implementation would have race conditions in this case. Best regards, Zhen