From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="m2rNX3S8" Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A0EA12F; Wed, 6 Dec 2023 04:20:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8KBSzwF5RnKTnZtNcdzBmJ+YoZoo95O1SbBkNFpKBcE=; b=m2rNX3S8s7ipaac/SEEHNQedcs AAYrNlMNmjF7zS9jCHUhtvFq1ZdWNW8yCMeTlXJWys4kJ645H/BxKVB8KXiFg3zF3gtjJTBr/NNEi mUC+FkbXTrGmrp+ETd3MnrZDpG/G+sWFHjwC2od8Oh11ObEQGbld+RrC3f4t7tBjbNqE8kRTjBTIS K6DrWwkiiYFqEcHl4lw8x2+wxFCVE07geZ6V67jqQlNN7gw4pvRuNfrwnuv47iNtfYKiCFw0DNh8W shx+kw06kdGZ1iGNF1c127OgtxHC+muEEBAzL2bC5g5udzVLu1zr6w8VFiAwR+wyS4iOErS8c/w/d i6MCK1uw==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1rAqsp-00AEvl-0n; Wed, 06 Dec 2023 12:20:07 +0000 Date: Wed, 6 Dec 2023 04:20:07 -0800 From: Christoph Hellwig To: Dave Chinner Cc: Christoph Hellwig , Baokun Li , Jan Kara , linux-mm@kvack.org, linux-ext4@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, willy@infradead.org, akpm@linux-foundation.org, ritesh.list@gmail.com, linux-kernel@vger.kernel.org, yi.zhang@huawei.com, yangerkun@huawei.com, yukuai3@huawei.com Subject: Re: [PATCH -RFC 0/2] mm/ext4: avoid data corruption when extending DIO write race with buffered read Message-ID: References: <20231202091432.8349-1-libaokun1@huawei.com> <20231204121120.mpxntey47rluhcfi@quack3> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Wed, Dec 06, 2023 at 09:34:49PM +1100, Dave Chinner wrote: > Largely they were performance problems - unpredictable IO latency > and CPU overhead for IO meant applications would randomly miss SLAs. > The application would see IO suddenly lose all concurrency, go real > slow and/or burn lots more CPU when the inode switched to buffered > mode. > > I'm not sure that's a particularly viable model given the raw IO > throughput even cheap modern SSDs largely exceeds the capability of > buffered IO through the page cache. The differences in concurrency, > latency and throughput between buffered and DIO modes will be even > more stark itoday than they were 20 years ago.... The question is what's worse: random performance drops or random corruption. I suspect the former is less bad, especially if we have good tracepoints to pin it down.