From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Turmel Subject: Re: RAID 5,6 sequential writing seems slower in newer kernels Date: Wed, 2 Dec 2015 23:30:00 -0500 Message-ID: <565FC548.1060302@turmel.org> References: <20151202010745.GC9812@www5.open-std.org> <565F03F2.3070803@turmel.org> <565F1035.10800@turmel.org> <565F136F.2090709@turmel.org> <565FA66C.8060907@turmel.org> <565FAB29.9060405@turmel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-raid-owner@vger.kernel.org To: Dallas Clement Cc: "linux-raid@vger.kernel.org" List-Id: linux-raid.ids On 12/02/2015 09:51 PM, Dallas Clement wrote: > On Wed, Dec 2, 2015 at 8:38 PM, Phil Turmel wrote: >> On 12/02/2015 09:33 PM, Dallas Clement wrote: >> >>> I'm not sure that the sync=1 has any effect in this case where I've >>> got direct=1 set (for non buffered I/O). I think the sync=1 flag only >>> matters for buffered I/O. I really shouldn't be setting that flag at >>> all. >> >> It's substantially different from direct=1. O_DIRECT just bypasses the >> kernel's caches. O_SYNC flushes the file data and filesystem metadata, >> and kills the device caches and queues. > > Isn't O_SYNC only applicable for buffered I/O or going through the > kernel caches? If I'm using O_DIRECT, seems like it should just > ignore this flag. O_SYNC is orthogonal to whether the kernel caches are involved. It is about ensuring that data *and* metadata are safely written all the way to permanent media. Phil