linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: Li Lei <lilei@szsandstone.com>
Cc: kent.overstreet@gmail.com, linux-bcache@vger.kernel.org
Subject: Re: [PATCH] bcache: remove unnecessary code in gc
Date: Wed, 6 Oct 2021 21:20:09 +0800	[thread overview]
Message-ID: <50cde730-06e2-0cb6-085a-cc5a76499a0a@suse.de> (raw)
In-Reply-To: <20211006080412.16251-1-lilei@szsandstone.com>

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
>
>
>
>


           reply	other threads:[~2021-10-06 13:20 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20211006080412.16251-1-lilei@szsandstone.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50cde730-06e2-0cb6-085a-cc5a76499a0a@suse.de \
    --to=colyli@suse.de \
    --cc=kent.overstreet@gmail.com \
    --cc=lilei@szsandstone.com \
    --cc=linux-bcache@vger.kernel.org \
    --subject='Re: [PATCH] bcache: remove unnecessary code in gc' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).