Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1561215rdh; Fri, 24 Nov 2023 16:37:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqVEhSCBdHaV82J4ZF1cOPpSX8lLQJJ3M2YRlivGOy1xXhx6bziHqCbhP0yMmddqdMQMB6 X-Received: by 2002:a17:903:1245:b0:1cf:6675:b313 with SMTP id u5-20020a170903124500b001cf6675b313mr6202528plh.22.1700872655215; Fri, 24 Nov 2023 16:37:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700872655; cv=none; d=google.com; s=arc-20160816; b=eN76hUJbLyabhrOoNNUtIvWNkPSpV/vtFryXJaXVkvef+5rPniZdwBMNbowoCOBaoj XmwTmjEdSSnx5bJTyzPUByBdJzhiiMOQuC0gNkXaewfbiYSGpTQXk4VX2RooTYPscB3/ M95gxitFuHU9AC0DewZrD8WVaVBTaZEkhgK2bBIc8C0eAboOMPODhHVM4GdTl9HFcf8R lKeksDx5lq8zdUrl6rPqEUwHf2LLANOXzl0hIcNu/dIzhFuThpAw0O6lbzsX4AsxvGy5 FsllBF9Tri278by+cbjvr0K3ZSSszyr+TNL8WKaQa34nkbwp/UzbZeCN0avlA1VKwAS+ T6jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=qRAT6OKmsIpLjyYU8pdtdMLej9q1hTZbmNmWpWlr6NY=; fh=CYkGAQq9qzzyI3pe5KAGZ5puCPpMEnVzWHogkNjiBgw=; b=PLs7WvRd7EGBvKSUyOHa320q2SRrRokPw/BA55e8Ssb1LJEgDIN2gMe91orxXGZl52 RrVl/1UIPpRSa8DlB2UxTMri6hS2ucmVxmwHpOJNYwg91ZHGPWhlFSgGcyD8xlz3Y9Ij OqkLietC+Nqs2aRrOh7bfRJJRV7i91dC12ve/J0JOAbp8TJAH25C8WeNj2SBC3Cvz3bs svkMc/Hq/f7eKy9Tq4fYVIAtMnsiznQ6mWEDPJiXIKNYGzvuRF+vycNqd7TY3GFpUm0v 6dVGGzniHFFWbzCC7bGr5yn3ZXh4CETcZh7WRPxg2IVPRpSMpqFdiv9sPLvGGcVvri1n JjWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=b6ut3I+z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id b18-20020a170902d51200b001ce64a095c2si4917908plg.361.2023.11.24.16.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 16:37:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=b6ut3I+z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 503D08075029; Fri, 24 Nov 2023 16:35:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbjKYAaP (ORCPT + 99 others); Fri, 24 Nov 2023 19:30:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229557AbjKYAaO (ORCPT ); Fri, 24 Nov 2023 19:30:14 -0500 Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [IPv6:2001:41d0:1004:224b::b7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9FF31733 for ; Fri, 24 Nov 2023 16:30:17 -0800 (PST) Date: Fri, 24 Nov 2023 19:30:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1700872216; 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: in-reply-to:in-reply-to:references:references; bh=qRAT6OKmsIpLjyYU8pdtdMLej9q1hTZbmNmWpWlr6NY=; b=b6ut3I+zm74xPveDsBhnywkDDIeNnCrWMxrsbMB8T2Qo7bwS7fzHGTL96owJFfBj9WxBxa VSesApdWqDRXOIeZyqgdvi64fZdbAGEUxHt0choWC9/5xNjk11BYJHbrUBy728HXkqMaZS LWWcUmpPEcgbjQhHCIyUP7WAjmhu2HU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Qi Zheng Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Roman Gushchin , Dave Chinner Subject: Re: [PATCH 2/7] mm: shrinker: Add a .to_text() method for shrinkers Message-ID: <20231125003009.tbaxuquny43uwei3@moria.home.lan> References: <20231122232515.177833-1-kent.overstreet@linux.dev> <20231122232515.177833-3-kent.overstreet@linux.dev> <20231123212411.s6r5ekvkklvhwfra@moria.home.lan> <4caadff7-1df0-45cc-9d43-e616f9e4ddb3@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4caadff7-1df0-45cc-9d43-e616f9e4ddb3@bytedance.com> X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 24 Nov 2023 16:35:37 -0800 (PST) On Fri, Nov 24, 2023 at 11:08:11AM +0800, Qi Zheng wrote: > Hi Kent, > > On 2023/11/24 05:24, Kent Overstreet wrote: > > On Thu, Nov 23, 2023 at 11:32:59AM +0800, Qi Zheng wrote: > > > > + void (*to_text)(struct seq_buf *, struct shrinker *); > > > > > > The "to_text" looks a little strange, how about naming it > > > "stat_objects"? > > > > The convention I've been using heavily in bcachefs is > > typename_to_text(), or type.to_text(), for debug reports. The > > OK. > > > consistency is nice. > > However, this is inconsistent with the name style of other > shrinker callbacks. Please use the "objects" suffix. As for > bcachefs's own callback function, you can use typename_to_text() > to ensure consistency. That would be inconsistent with introducing a convention to the wider kernel.