Re: [RFD] BIO_RW_BARRIER - what it means for devices, filesystems, and dm/md.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Phillip Susi
Date: Tuesday, May 29, 2007 - 12:59 pm

Neil Brown wrote:

Are you sure?  I believe that dm handles bi_endio because it waits for 
all in progress bio to complete before switching tables.


I'm not quite sure I understand this correctly, but the purpose of a 
barrier request is to prevent the elevator from reordering requests 
around a barrier.  Previous requests must be completed before the 
barrier, and latter requests must be executed after.  That is a 
sufficiently strong guarantee for careful write or journal filesystems 
to ensure that a log block hits the disk before the actual transaction 
blocks, and then the log block is marked as complete only after the 
actual transaction.  This is a weaker guarantee than a flush, and allows 
for some reordering to improve performance.


Right, the barrier doesn't need to be flushed right away, so the 
elevator could complete writes after the barrier if it wishes, then 
complete the ones before, and finally the barrier itself.  Not setting 
the FUA bit allows the disk to cache the barrier write so it can be 
completed sooner, but before the queue sends any more requests to the 
disk, it must be flushed to ensure that the barrier has hit the media 
before the new requests.


Again I am not sure I quite understand what you mean here, but only 
writes issued after the barrier can complete before the barrier.  Those 
issued before the barrier can not overtake it in the queue.


This all seems unnecessary work.


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [dm-devel] Re: [RFD] BIO_RW_BARRIER - what it means fo ..., Alasdair G Kergon, (Mon May 28, 2:43 am)
Re: [RFD] BIO_RW_BARRIER - what it means for devices, file ..., Phillip Susi, (Tue May 29, 12:59 pm)
Re: [dm-devel] Re: [RFD] BIO_RW_BARRIER - what it means fo ..., Alasdair G Kergon, (Tue May 29, 3:05 pm)
Re: [dm-devel] Re: [RFD] BIO_RW_BARRIER - what it means fo ..., Alasdair G Kergon, (Wed May 30, 3:41 am)
Re: [dm-devel] Re: [RFD] BIO_RW_BARRIER - what it means fo ..., Valdis.Kletnieks, (Thu Jul 12, 10:34 am)
[PATCH] block: cosmetic changes, Tejun Heo, (Wed Jul 18, 3:56 am)
[PATCH] block: factor out bio_check_eod(), Tejun Heo, (Wed Jul 18, 3:59 am)
Re: [PATCH] block: factor out bio_check_eod(), Jens Axboe, (Wed Jul 18, 4:06 am)
Re: [PATCH] block: factor out bio_check_eod(), Tejun Heo, (Wed Jul 18, 4:18 am)
Re: [PATCH] block: factor out bio_check_eod(), Jens Axboe, (Wed Jul 18, 4:31 am)
Re: [PATCH] block: factor out bio_check_eod(), Tejun Heo, (Wed Jul 18, 4:33 am)
Re: [PATCH] block: factor out bio_check_eod(), Jens Axboe, (Wed Jul 18, 4:34 am)
Re: [PATCH] block: factor out bio_check_eod(), Tejun Heo, (Wed Jul 18, 4:41 am)
Re: [PATCH] block: factor out bio_check_eod(), Jens Axboe, (Wed Jul 18, 4:45 am)
Re: [PATCH] block: factor out bio_check_eod(), Jens Axboe, (Wed Jul 18, 4:49 am)
Re: [PATCH] block: factor out bio_check_eod(), Jens Axboe, (Wed Jul 18, 5:31 am)
Re: [PATCH] block: factor out bio_check_eod(), Tejun Heo, (Wed Jul 18, 5:34 am)