lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yogy79yg44BX7sI1@carbon>
Date:   Fri, 20 May 2022 17:31:43 -0700
From:   Roman Gushchin <roman.gushchin@...ux.dev>
To:     Kent Overstreet <kent.overstreet@...il.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        Dave Chinner <dchinner@...hat.com>,
        linux-kernel@...r.kernel.org, Hillf Danton <hdanton@...a.com>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH v3 3/6] mm: shrinkers: provide shrinkers with names

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!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ