Re: [PATCH] bcache: remove unnecessary code in gc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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








[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux