From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from imap.thunk.org ([74.207.234.97]:33610 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751197AbeDLFJa (ORCPT ); Thu, 12 Apr 2018 01:09:30 -0400 Date: Thu, 12 Apr 2018 01:09:24 -0400 From: "Theodore Y. Ts'o" To: Andres Freund Cc: Dave Chinner , Andreas Dilger , Ext4 Developers List , Linux FS Devel , Jeff Layton , "Joshua D. Drake" Subject: Re: fsync() errors is unsafe and risks data loss Message-ID: <20180412050924.GO2801@thunk.org> References: <20180410220726.vunhvwuzxi5bm6e5@alap3.anarazel.de> <190CF56C-C03D-4504-8B35-5DB479801513@dilger.ca> <20180412000916.GG729@dastard> <20180412023221.vphcqild3vckaqmw@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180412023221.vphcqild3vckaqmw@alap3.anarazel.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Apr 11, 2018 at 07:32:21PM -0700, Andres Freund wrote: > > Most of that sounds like a good thing to do, but you got to recognize > that that's a lot of linux specific code. I know it's not what PG has chosen, but realistically all of the other major databases and userspace based storage systems have used DIO precisely *because* it's the way to avoid OS-specific behavior or require OS-specific code. DIO is simple, and pretty much the same everywhere. In contrast, the exact details of how buffered I/O workrs can be quite different on different OS's. This is especially true if you take performance related details (e.g., the cleaning algorithm, how pages get chosen for eviction, etc.) As I read the PG-hackers thread, I thought I saw acknowledgement that some of the behaviors you don't like with Linux also show up on other Unix or Unix-like systems? - Ted