From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6CF3606A31B for ; Fri, 23 Oct 2026 06:44:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=bytedance.com header.i=@bytedance.com header.a=rsa-sha256 header.s=2212171451 header.b=cpys32/L Received: by kanga.kvack.org (Postfix) id BF5896B0AFF; Fri, 23 Oct 2026 02:44:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BCC986B0B00; Fri, 23 Oct 2026 02:44:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AE30D6B0B01; Fri, 23 Oct 2026 02:44:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 89EA56B0AFF for ; Fri, 23 Oct 2026 02:44:29 -0400 (EDT) Received: from smtpin10.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 049FB120333 for ; Fri, 23 Oct 2026 06:44:28 +0000 (UTC) X-FDA: 85352952258.10.B8858A7 Received: from va-1-115.ptr.blmpb.com (va-1-115.ptr.blmpb.com [209.127.230.115]) by imf01.hostedemail.com (Postfix) with ESMTP id 812A340008 for ; Fri, 23 Oct 2026 06:44:26 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=bytedance.com header.s=2212171451 header.b="cpys32/L"; spf=pass (imf01.hostedemail.com: domain of lizhe.67@bytedance.com designates 209.127.230.115 as permitted sender) smtp.mailfrom=lizhe.67@bytedance.com; dmarc=pass (policy=quarantine) header.from=bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1792737867; h=from:from:sender: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:dkim-signature; bh=RRG6U99EKeZDnYNuky91yYiF/y3AS7tMgJRzNytuW38=; b=YIMEMl8E2XcNzmxrPQcZzsZPjhOpTvzELHotxZ+dGXqbXf5QC5zCEzRkUbdmRS3KvgxU4o EAVIizWnw+G0rribPTETqBuVP1vDC9SM2g9QihCWJXytyQaZX2giZcrSiaSGZcNiRIK9fh 8fdmdNHXOae1k5oK6FuJ3hU6E1DWiYw= ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1792737867; b=vhpRQQqXYWO0R9ZQh6n8wK0Mz4clCLF+9jiAXoMTF5UqMq7wJ8LrHE3n8ZPEPE9jhlHV5p iGSACYIZH3y5cWADVH9Lzu7/4JKksnrN0gDkt+wJFVuLlJ7GB5c2T4sQ2JS2Qg5paGJDif gIld3AwBZhECyxtsDrh9yWljtYMrRxs= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=bytedance.com header.s=2212171451 header.b="cpys32/L"; spf=pass (imf01.hostedemail.com: domain of lizhe.67@bytedance.com designates 209.127.230.115 as permitted sender) smtp.mailfrom=lizhe.67@bytedance.com; dmarc=pass (policy=quarantine) header.from=bytedance.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1792737860; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=RRG6U99EKeZDnYNuky91yYiF/y3AS7tMgJRzNytuW38=; b=cpys32/LRolwEFjjMEMw/5ElImdKxW3aek0sC7tkC1CNPLkRKMJvICJUrECWh/hB0z30gw O2MP7SyffSrZ+log0mKJ8xHHnjE7ajfrF8OUXcg08jUoiNFS+ZBOVIzgir2eZ3QVBuLAwS Du83PYH0Bn1iHjxPqYpSOG1+8vnBVJmr08xntzi89e3Vd7dhZxBdkMQI7XwynjBqvxw/41 62EhywzBgDtmsC6/YixqjbCOBGfR7DMX3zLMeUXX4V/SL6jFS6iWgT+g/sMtVuHugXjR7V 4yLlBgQsZIKhr4Fi+HIGJ4tpRrUFlLtHI8NtZVASvZK4v9caO8Vq75AvaYG4uw== Subject: Re: [RFC 0/2] mm: add source selectors to memory.reclaim Date: Fri, 23 Oct 2026 14:43:57 +0800 X-Archived-By: Mime-Version: 1.0 References: <20261019141401.11927-1-lizhe.67@bytedance.com> <30457046-a662-4ff7-a6a8-100398d7a806@bytedance.com> <179264138036.2549665.17429111144570830454.b4-reply@b4> <9b715272-3ed9-42da-a6ae-467e8ae00c0b@bytedance.com> Cc: , , , , , , , , , , , , , , , User-Agent: Mozilla Thunderbird Content-Type: text/plain; charset=UTF-8 From: "Li Zhe" Message-Id: In-Reply-To: Content-Transfer-Encoding: 7bit X-Original-From: Li Zhe X-Lms-Return-Path: To: "Gregory Price" X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 812A340008 X-Stat-Signature: 8458fnndgz5hw173jxscbupo6mwjp844 X-Rspam-User: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=4.0.1 X-HE-Tag: 1792737866-242989 X-HE-Meta: U2FsdGVkX1/5nQ4lvxACp+mWCgtt8mN+/fC99SZYUlXZQg8ncojuHFeHlUcz28i5Ivf3PMzl5wLZlCqMCLuB8kKigZyCB+igX9Lk1s1+HC74ejcgqbEIPLbXprOx6TXzH76Ae48dkNQbzuidHjgFDSlmgzzI3TjpENcspBiU8JWV4zfBiY+ocQrLM+r2lDgYyOZo8AIN9fJzGUf9y196bN55YvzRwV9mrFcB13Txj0c19lwiMKe/MIZ9nS9UZBNbbojTKljbQjEK6ZusxH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m@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 10/22/26 10:11 PM, Gregory Price wrote: > On Thu, Oct 22, 2026 at 05:43:49PM +0800, Li Zhe wrote: >> On 10/22/26 11:56 AM, Gregory Price (Meta) wrote: >> >> So userspace cannot rely on one write to memory.reclaim to produce a >> final per-node distribution. The intended usage is a feedback loop: the >> controller observes the memcg's resident distribution, chooses the source >> nodes it wants to relieve, applies source-scoped reclaim pressure, >> observes the new distribution, and iterates. >> > I think the critical question is what CAN userspace rely on? > > We can make a bunch of feedback loop interfaces, but there's no > guarantee they'll actually be useful. The reliable part I currently want to claim is narrow: userspace can ask memory.reclaim to apply reclaim pressure to memcg memory resident on the selected source nodes. It should not rely on a single write to produce a final net per-node footprint. The existing memory.reclaim interface is also a best-effort reclaim request rather than a deterministic placement primitive; this patch only adds a way to select where that reclaim pressure is applied. > >>> At the very least i think you need to add details in your cover that >>> demonstrates the process of doing something like per-node resident >>> ratios, and show that it works as you intend. >> Agreed. I will update the cover letter to make this model clearer. I >> will also make clear that source=nodes is not a final net per-node >> footprint guarantee and does not change memory.reclaim completion >> accounting. >> > To be clear, I think not just making it clearer, but if you can show > some tests that demonstrate the reliable behavior of the interface > extension under different scenarios - that would be compelling. That makes sense. I will run more detailed tests across different scenarios and include the results in v2. Thanks, Zhe > > ~Gregory