From mboxrd@z Thu Jan 1 00:00:00 1970 From: Werner Almesberger Subject: Re: barriers vs. reads - O_DIRECT Date: Fri, 25 Jun 2004 01:52:57 -0300 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040625015257.B28137@almesberger.net> References: <20040624224259.GA12840@mail.shareable.org> <200406250357.i5P3v3327344@watkins-home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "'Jamie Lokier'" , "'Bryan Henderson'" , linux-fsdevel@vger.kernel.org Return-path: Received: from almesberger.net ([63.105.73.238]:5639 "EHLO host.almesberger.net") by vger.kernel.org with ESMTP id S266202AbUFYExF (ORCPT ); Fri, 25 Jun 2004 00:53:05 -0400 To: Guy Content-Disposition: inline In-Reply-To: <200406250357.i5P3v3327344@watkins-home.com>; from bugzilla@watkins-home.com on Thu, Jun 24, 2004 at 11:57:03PM -0400 List-Id: linux-fsdevel.vger.kernel.org Guy wrote: > What if a filesystem is on a software RAID5 array? How does the filesystem > use a barrier when some of the writes are on different disks? Would md pass > the barrier down to each disk? Let's assume we just have a FIFO elevator per device, barriers affect all requests, and we don't allow any reordering across barriers. Then, a device would have to stop IO when it hits a barrier, and could only resume when all other devices using this barrier have reached it. md would have to send the barrier to each device, with the exception that in any sequence of barriers without other requests, only the first and the last barrier are needed. Now, if we have a smarter elevator and smarter barriers, there are more tricks that can be played. E.g. an elevator could try to reach a barrier shared by many others as soon as possible, and then schedule requests allowed to cross the barrier while waiting for the other devices. I'm not sure how sophisticated we want to get in the multiple devices case, though. - Werner -- _________________________________________________________________________ / Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net / /_http://www.almesberger.net/____________________________________________/