From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-m15567.qiye.163.com (mail-m15567.qiye.163.com [101.71.155.67]) (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 113E72EEE65 for ; Thu, 25 Jun 2026 14:13:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=101.71.155.67 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782396790; cv=none; b=g0foBsVyoiX5tXf1Yv4uOhHa4wC9gne3KWI9F3sR34VJtPB+vxa5aB0J5HmBfabIfioyYu/i+FMrFXlXxRyAnVfkCIAKPbG4RUjBoPNGI87jeJ5mTzE3qz8FBkDd4MPS/65m2Ucag72UdMjTtuNijk6v35fX4FMKGMBvOw+yymM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782396790; c=relaxed/simple; bh=8MZPlrVRb5aeBnxtht6r7YhMhzIiflRmf5G1OTgiOeg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DeXRgRpdnv1kC1Lbjpf5E+vZwIrxHGTkWCAi0ioiQ+Vb2pHGERdp5lwF82HQKDZeKI4/XmOneEhu5ZEAX14ijT8uuL9+PpgX7g16K17ovRWuS/rKYKAgNwVDt2Cbz9Ht7XJIWROI1+LA1+eUjy1PvLhxfgxVjvCxKpo8+xjEpaQ= 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=101.71.155.67 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 1be5b093a; Thu, 25 Jun 2026 20:57:30 +0800 (GMT+08:00) Message-ID: <577bcce8-7cdf-4fea-b895-04fa5bda13ea@easystack.cn> Date: Thu, 25 Jun 2026 20:57:29 +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 v11 0/4] mm/page_owner: add per-fd filter infrastructure for print_mode and NUMA filtering To: Andrew Morton Cc: vbabka@kernel.org, surenb@google.com, mhocko@suse.com, jackmanb@google.com, hannes@cmpxchg.org, ziy@nvidia.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yichong Chen , Ye Liu References: <20260625043101.338794-1-zhen.ni@easystack.cn> <20260624215526.ed20169b440c62d71a3f9d90@linux-foundation.org> From: "zhen.ni" In-Reply-To: <20260624215526.ed20169b440c62d71a3f9d90@linux-foundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Tid: 0a9efedb5ec50229kunm26bbcc47af39f X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFJQjdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkaS0lCVkJOTU9NS09OSU5JHVYVFA kWGhdVGRETFhoSFyQUDg9ZV1kYEgtZQVlJSkNVQk9VSkpDVUJLWVdZFhoPEhUdFFlBWU9LSFVKS0 hKTkxPVUpLS1VKQktLWQY+ 在 2026/6/25 12:55, Andrew Morton 写道: > On Thu, 25 Jun 2026 12:30:57 +0800 Zhen Ni wrote: > >> This patch series introduces per-file-descriptor filtering capabilities to the >> page_owner feature. > > Well, I assume this work was inspired by your own operational > experience with page_owner. There's no better inspiration than this! > > Review is thin (absent) at v11. This is typical with page_owner > changes :(. I'll add the series for testing while interested people > check over it (please). > > AI review might have found a few things which you might choose to > address. Please check it out: > > https://sashiko.dev/#/patchset/20260625043101.338794-1-zhen.ni@easystack.cn > > > > Hi, Thanks for the review. Let me address the questions: Q1: Can empty write silently revert concurrent filter changes? Q3: Can concurrent writes clobber independent filter settings? A1&3: Yes, this is theoretically possible when multiple threads share the same fd. The current implementation uses short-duration spinlocks as a practical trade-off rather than holding locks during the entire parsing process. However, I believe the current design meets functional requirements: 1. Most users will use the page_owner_filter tool rather than programming against page_owner directly. For concurrent filtering needs, multiple processes can use independent file descriptors. 2. Even in the multi-threaded shared-fd case, the worst outcome is that filter settings get overwritten. Since page_owner is a debug feature, the impact is limited. --- Q2: How can users disable/clear the NUMA node filter? A2: Clearing the NUMA filter while holding the fd open is an edge case without strong practical necessity. If users need to change filter behavior, they can simply: - Apply a different filter in the next write operation, or - Close and reopen the file descriptor The filter is designed for targeted debugging sessions where the configuration is set up front and used for the session. If you believe that holding locks for the entire write process is necessary, please let me know. Thanks, Zhen