All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] bcache: incremental GC and dirty data init
@ 2018-04-12  6:38 tang.junhui
  2018-04-12  6:38 ` [PATCH 1/4] bcache: finish incremental GC tang.junhui
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: tang.junhui @ 2018-04-12  6:38 UTC (permalink / raw)
  To: kent.overstreet, colyli, mlyle; +Cc: linux-bcache, linux-block, tang.junhui

Hi maintainers and folks,

Some patches of this patch set have been sent before, they are not merged
yet, and I add two new patches to solve some issues I found while testing.
since They are interdependent, so I make a patch set and resend them.

[PATCH 1/4] bcache: finish incremental GC
[PATCH 2/4] bcache: calculate the number of incremental GC nodes according to
			the total of btree nodes
[PATCH 3/4] bcache: notify allocator to prepare for GC
[PATCH 4/4] bcache: fix I/O significant decline while backend devices registering

These patches are useful to prevent I/O fluctuations or even jump 0 while GC or
cached devices registering. I have test them for some times, I hope somebody could
have a review for these patch, any comment would be welcome.

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [PATCH 3/4] bcache: notify allocator to prepare for GC
@ 2018-04-13  7:45 tang.junhui
  0 siblings, 0 replies; 11+ messages in thread
From: tang.junhui @ 2018-04-13  7:45 UTC (permalink / raw)
  To: colyli; +Cc: kent.overstreet, mlyle, linux-bcache, linux-block, tang.junhui

Hi Coly

Thanks for you comments.
> Hi Junhui,
> 
> This method is complicated IMHO. 
The main idea of this patch is:

		GC thread						allocator thread
==>triggered by sectors_to_gc
   set ca->prepare_gc to GC_PREPARING
   to notify allocator thread to
   prepare for GC					==>detect ca->prepare_gc is 
										GC_PREPARING, fill the 
										go to invalidate_buckets(),
==>waiting for allocator 				and fill free_inc queue with
   thread to prepare over				reclaimable buckets, after
										that, set ca->prepare_gc to
										GC_PREPARED to notify GC
										thread being prepared OK
==>detect ca->prepare_gc is
   prepared OK, set 
   ca->prepare_gc back to 
   GC_PREPARE_NONE, and continue GC

> Why not in bch_allocator_thread()
> simple call wake_up_gc(ca->set) after invalidate_buckets() ?
In this patch, GC is triggered by sectors_to_gc, and I/Os from front side
continue exist, so we notify allocator to pack the free_inc queue
full of buckets before GC, then we could have enough buckets for front side
I/Os during GC period.

Maybe the code is somewhat redundant, I will try to refactoring the code
in the next patch.

                                 
Thanks.                                                                      
Tang Junhui                              

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-04-13  7:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-12  6:38 [PATCH 0/4] bcache: incremental GC and dirty data init tang.junhui
2018-04-12  6:38 ` [PATCH 1/4] bcache: finish incremental GC tang.junhui
2018-04-12 14:08   ` Coly Li
2018-04-12  6:38 ` [PATCH 2/4] bcache: calculate the number of incremental GC nodes according to the total of btree nodes tang.junhui
2018-04-12 14:21   ` Coly Li
2018-04-12  6:38 ` [PATCH 3/4] bcache: notify allocator to prepare for GC tang.junhui
2018-04-12 14:46   ` Coly Li
2018-04-12  6:38 ` [PATCH 4/4] bcache: fix I/O significant decline while backend devices registering tang.junhui
2018-04-12 15:20   ` Coly Li
2018-04-12  6:45 ` [PATCH 0/4] bcache: incremental GC and dirty data init Coly Li
2018-04-13  7:45 [PATCH 3/4] bcache: notify allocator to prepare for GC tang.junhui

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.