From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B984C43603 for ; Thu, 12 Dec 2019 15:47:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 21782214AF for ; Thu, 12 Dec 2019 15:47:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="S4p279uX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21782214AF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A83258E0005; Thu, 12 Dec 2019 10:47:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A34988E0001; Thu, 12 Dec 2019 10:47:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 94A268E0005; Thu, 12 Dec 2019 10:47:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0058.hostedemail.com [216.40.44.58]) by kanga.kvack.org (Postfix) with ESMTP id 7ED058E0001 for ; Thu, 12 Dec 2019 10:47:55 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id E3FC1181AEF30 for ; Thu, 12 Dec 2019 15:47:54 +0000 (UTC) X-FDA: 76256920068.22.tramp35_62151386d220a X-HE-Tag: tramp35_62151386d220a X-Filterd-Recvd-Size: 2853 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Dec 2019 15:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=IEJ3LeivFspfBiEBb2hcfjpdM0Mp6JK3jjIKi4Wc18c=; b=S4p279uXXCBU2Sr7nSNRYnMxg XiIwyLIqLjc1P45nwb/Wj3dgZbFCAcqAr7eEAiLZr6zwJBPMeKUiODz9cIszdXW3b14yOn5qVpV6U NB7t01b2WDvZCld45yc9I8rWI2VGusbHpRmMMRbw8OF247CsdscrR/85ZguLg0qLb5FrKuvixAKFm NbRsRjYvwPj/XAosoZI+sW4d7jEKcasecmk0NUdKxzrSyI5YRMGcQLFUz646ffp/e5gYFeTl+qLF+ qWR2ldl1Vj6gMlEbWATpI8mF1XNgccJguf2rMJ65uTsl6wAMXPIVlzp7HO7tXjs3QMkxYiTOPhg7J 3xorWtnyA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifQgy-0002qW-C1; Thu, 12 Dec 2019 15:47:52 +0000 Date: Thu, 12 Dec 2019 07:47:52 -0800 From: Christoph Hellwig To: Jens Axboe Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: [PATCHSET 0/5] Support for RWF_UNCACHED Message-ID: <20191212154752.GA3936@infradead.org> References: <20191210162454.8608-1-axboe@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191210162454.8608-1-axboe@kernel.dk> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Dec 10, 2019 at 09:24:49AM -0700, Jens Axboe wrote: > Seems to me that we have an opportunity to provide something that sits > somewhere in between buffered and O_DIRECT, and this is where > RWF_UNCACHED enters the picture. If this flag is set on IO, we get the > following behavior: > > - If the data is in cache, it remains in cache and the copy (in or out) > is served to/from that. > > - If the data is NOT in cache, we add it while performing the IO. When > the IO is done, we remove it again. > > With this, I can do 100% smooth buffered reads or writes without pushing > the kernel to the state where kswapd is sweating bullets. In fact it > doesn't even register. > > Comments appreciated! Patches are against current git (ish), and can > also be found here: I can't say I particularly like the model, as it still has all the page cache overhead. Direct I/O with bounce buffers for unaligned I/O sounds simpler and faster to me.