From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793755768; b=Nzpdzt+C/iBjp9LIr130PDzfIh2VJp2NnIZ+aJcasoI6Ak4HG9WdcQECpn+r/vc7ny12 TMLFO79nKO/dnSXG3OYD+LQSVkqhDzy43KEuE67iH6lc1HWbUizyAufY5IUTH24NDjNrJ XZWwsWhRPdD9PxPtBskUqFkDmpYKTjbIPwyFR3x4Ae1+s8sAMDsXFqaG336cOayuYltsm D25aC5D6q0f24SbA1rKky61paZFSJO9U30mxLCKMBLhrTDSDzo7pQJJpl1eudD5BYvlUQ Ag0jgk16NcJy+IPwEwwpJebwZifQJVR2+e6IC8r5ia1kghZtrxqtT039s+bUR7uTYwQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793755768; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=CE0t5hOROhr+8knZGqTWCAomcPgxGmzw+Md6f9Efdfw=; b=b7gfhiXAokMDj/ifXJhYOWlf8wqUVVzZQUZVdcIhdb6pyKgWAXH91kWAdvQvEhPsaBiD wDrcrvjYUVDIUgHJb8LtiKgAPAdkJKyUsAEb3uebLuVBZNSqv+pWkqaw8NoyHA7ogFyMg OuRuGu72iyffdDhKOZwwjcx26ApusxLFHD0XmIU/3rtXQzX3Nh63OWJgFM5uR+Ch3UdJ8 kXOYhGAYjSzWYkFppQtXqS+wXikeNrMdxcPZobmr7lIpYYmqK9Kmv1I8Vuv7n1jM2di/V HVu6BjOkD1cza6mz1qcnoPTq7lceEPl5J81MuQ0G1qgAQPIvBDbFnh5mBvDzQD+9T8w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=o3nkAPqo; arc=none smtp.remote-ip=95.215.58.47 Received: from mta1.migadu.com (out-47.mta1.migadu.com [95.215.58.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C700606D822 for ; Wed, 4 Nov 2026 01:29:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7C700606D822 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, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=o3nkAPqo X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=QwlcNBQAVDxk0/AvVL+NWkQwGw6IW0hqKl+WZhIVwVQ=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1793755765; v=1; x=1794360565; b=o3nkAPqoiAhQCuG7W+cYJPXVqRbfmnABmAgU+ifZRUe+hpALHAZdbLU71L1/bypKy1hCRZel LrXg8QFqzflrTyf3WsCyaOUfD0hqrsfE7HFQUcMd5CRxhTZ3TmZ3IyBnoia8EK1s6VZ0g9JteeF u9uGQgAu7/aT6Re0f9SxG8j8= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 59a6eb213e4c26de; Wed, 04 Nov 2026 01:29:25 +0000 X-Mizu-Trace-ID: 59a6eb213e4c26de X-Migadu-Flow: FLOW_OUT Message-ID: Date: Wed, 4 Nov 2026 09:29:17 +0800 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 7/7] mm/mglru: add tracepoint for inc_max_seq() To: Barry Song Cc: Steven Rostedt , Masami Hiramatsu , Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Dave Chinner , Mathieu Desnoyers , Muchun Song , Qi Zheng , David Hildenbrand , Lorenzo Stoakes , Kairui Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Baoquan He , Baolin Wang , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, "open list:BPF [MISC]:Keyword:(?:b|_)bpf(?:b|_)" , Ridong Chen References: <20261103025610.3738894-1-ridong.chen@linux.dev> <20261103025610.3738894-8-ridong.chen@linux.dev> <9cabcddf-d807-4a36-84f1-5bb06ea72aac@linux.dev> From: Ridong Chen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/4/2026 2:28 AM, Barry Song wrote: > On Tue, Nov 3, 2026 at 8:23 PM Ridong Chen wrote: > [...] >> >> Hi Barry, >> >> Agreed, I'll go with option 2. Two things I'd like to confirm first: >> >> 1) To report the reason, should_run_aging() would need to return it >> instead of a bool, e.g. an enum like: >> >> enum lru_gen_aging_reason { >> AGING_NONE, >> AGING_NO_EVICTABLE, /* eviction is not possible anymore */ >> AGING_MIN_GENS, /* better to age, eviction still possible */ >> }; >> >> Or just report sc->priority, swappiness, max_seq/min_seq and the >> per-generation nr_pages, and let users derive the reason from them? >> The former is more direct, the latter keeps should_run_aging() >> unchanged. > > Right. We can let users infer the reason from max_seq, > min_seq, and nr_pages in each generation. This shouldn't > be difficult, especially since should_run_aging() may > change. We don't need to spell out the exact reason. > Just present users with the overall state of the lru_gen. > >> >> 2) try_to_shrink_lruvec() has changed quite a lot recently, e.g. >> Kairui's reclaim loop rework, and your swappiness series also touches it, >> including the aging part. Is it stable enough now to carry a tracepoint there? >> > > Yes, I think aging will always be needed, regardless of how > we change the code, so this should remain stable. > Thank you for your patience. That makes sense to me. Will update. -- Best regards Ridong