Re: Journal Disk Cache - on or off

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

 



On Fri, Jan 29, 2016 at 6:43 PM, Sage Weil <sage@xxxxxxxxxxxx> wrote:
> On Fri, 29 Jan 2016, Guang Yang wrote:
>> Hi Sage,
>> I found a thread discussing whether we could turn on disk cache with
>> new kernel or not -
>> http://www.spinics.net/lists/ceph-devel/msg06173.html
>>
>> From within that thread, you mentioned that since the fsync/fdatasync
>> would flush the disk cache as well, we could actually turn on the
>> cache without worrying about the data safety.
>
> Yeah, any vaguely modern kernel will do a proper flush to the device; no
> need to worry about the disk cache.
>
>> Is that true if journal_dio is being used (by default), in which case
>> O_DIRECT | O_DSYNC is being used to write journal rather than
>> fsync(2)?
>
> Right.  O_DSYNC triggers a flush at the SCSI (or virtio) level, so these
> journal [A]IOs are fully synchronous all the way to the platter.

The last time I looked, O_DSYNC was nothing but an implicit fdatasync
after each write, triggered at the VFS layer - not that much different
from the explicit fdatasync.

Thanks,

                Ilya
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux