From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 090C0C433EF for ; Sat, 21 May 2022 00:31:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 604AA6B0071; Fri, 20 May 2022 20:31:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 589196B0072; Fri, 20 May 2022 20:31:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3DC766B0073; Fri, 20 May 2022 20:31:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 26E1C6B0071 for ; Fri, 20 May 2022 20:31:50 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id E038920683 for ; Sat, 21 May 2022 00:31:49 +0000 (UTC) X-FDA: 79487872338.24.7B4783A Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf10.hostedemail.com (Postfix) with ESMTP id 14E37C0013 for ; Sat, 21 May 2022 00:31:16 +0000 (UTC) Date: Fri, 20 May 2022 17:31:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1653093108; 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=/PvswcI13Yf4q0l94RXQB7xvET7jRmzJANLdVyC6U+A=; b=BZxSssMM56O+65UCUfQpz9fJkEhid3CADJGmnG88vw0ZXU6GVY5FCSTCnUZRxyQSJ9nhcC 1kJLsZoU+x8BW/bPXcJo/CH4BMxdIIwFlZSOvK3zy/VshPgDCFgrVFx56VW9IGkMdBxAFS bEXLmD1vJthOX2YMbMW5txVXPs06K1s= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Kent Overstreet Cc: Andrew Morton , linux-mm@kvack.org, Dave Chinner , linux-kernel@vger.kernel.org, Hillf Danton , Christophe JAILLET Subject: Re: [PATCH v3 3/6] mm: shrinkers: provide shrinkers with names Message-ID: References: <20220509183820.573666-1-roman.gushchin@linux.dev> <20220509183820.573666-4-roman.gushchin@linux.dev> <20220520164115.oectf3x5hkwesioi@moria.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220520164115.oectf3x5hkwesioi@moria.home.lan> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Rspamd-Queue-Id: 14E37C0013 X-Stat-Signature: j63fbamefm35jy1i4e9y1ua16rs5tgnh Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=BZxSssMM; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf10.hostedemail.com: domain of roman.gushchin@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1653093076-857583 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, May 20, 2022 at 12:41:15PM -0400, Kent Overstreet wrote: > On Mon, May 09, 2022 at 11:38:17AM -0700, Roman Gushchin wrote: > > diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c > > index ad9f16689419..c1f734ab86b3 100644 > > --- a/drivers/md/bcache/btree.c > > +++ b/drivers/md/bcache/btree.c > > @@ -812,7 +812,7 @@ int bch_btree_cache_alloc(struct cache_set *c) > > c->shrink.seeks = 4; > > c->shrink.batch = c->btree_pages * 2; > > > > - if (register_shrinker(&c->shrink)) > > + if (register_shrinker(&c->shrink, "btree")) > > pr_warn("bcache: %s: could not register shrinker\n", > > __func__); > > These drivers need better names for their shrinkers - there will often be > multiple instances in use on a system and we need to distinguish. > > Also, "btree" isn't a good name for the bcache shrinker - "bcache-%pU", > c->set_uuid would be a good name for bcache's shrinker, it'll match up with the > cache set directory in /sys/fs/bcache/. Sure, will improve in the next version. Thanks! > > For others (device mapper, md, etc.) there should be a minor device number you > can reference. Good point, will think of it. Thank you for taking a look!