All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] bcache: remove unnecessary code in gc
       [not found] <20211006080412.16251-1-lilei@szsandstone.com>
@ 2021-10-06 13:20 ` Coly Li
  0 siblings, 0 replies; only message in thread
From: Coly Li @ 2021-10-06 13:20 UTC (permalink / raw)
  To: Li Lei; +Cc: kent.overstreet, linux-bcache

On 10/6/21 4:04 PM, Li Lei wrote:
> Originally, btree_gc_start() ran in workqueue, it would be called
> simutaneously in different threads, c->gc_mark_valid was used to make
> sure there was only one thread to do GC.
>
> Since gc has been converted to a kthread, there is no need to the check.
>
> Signed-off-by: Li Lei <lilei@szsandstone.com>
> ---
>   drivers/md/bcache/btree.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
> index fe6dce125aba..b18e1fd2c209 100644
> --- a/drivers/md/bcache/btree.c
> +++ b/drivers/md/bcache/btree.c
> @@ -1698,9 +1698,6 @@ static void btree_gc_start(struct cache_set *c)
>   	struct cache *ca;
>   	struct bucket *b;
>
> -	if (!c->gc_mark_valid)
> -		return;
> -

Do you have any performance number for the above change ? I am not sure 
whether the change may offer benefit for bcache gc, correct me if I am 
wrong.

Coly Li

>   	mutex_lock(&c->bucket_lock);
>
>   	c->gc_mark_valid = 0;
> --
> 2.25.1
>
>
>
>


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-06 13:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20211006080412.16251-1-lilei@szsandstone.com>
2021-10-06 13:20 ` [PATCH] bcache: remove unnecessary code in gc Coly Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.