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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 713ACC33C8C for ; Tue, 7 Jan 2020 17:42:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 35A5D20715 for ; Tue, 7 Jan 2020 17:42:19 +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="kBxKQv05" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35A5D20715 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 C324E8E0038; Tue, 7 Jan 2020 12:42:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BE1948E001E; Tue, 7 Jan 2020 12:42:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF77C8E0038; Tue, 7 Jan 2020 12:42:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0186.hostedemail.com [216.40.44.186]) by kanga.kvack.org (Postfix) with ESMTP id 973C68E001E for ; Tue, 7 Jan 2020 12:42:18 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 4934E180AD804 for ; Tue, 7 Jan 2020 17:42:18 +0000 (UTC) X-FDA: 76351557156.10.metal89_887d81bfe9430 X-HE-Tag: metal89_887d81bfe9430 X-Filterd-Recvd-Size: 3500 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Tue, 7 Jan 2020 17:42:17 +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=gOiFIlZRVnOoBxSXmVwGYFu8Oc2PBoCKHWX6MtqQFiU=; b=kBxKQv05tR88yHPqmZPS9DjdT JiNHmm/82p+m9xZTf2dKIujfr9khftReZFdNEXbbHz3w73EarWaoi09SEmqxnSGza9BkXGMBZcKQV oF0+/9JEt35FM/7l+CED0sZhx2ZgyyVZ76L3zzH5O0rEBjoBGu+N8fFR1m40Ku7L9cxLg3srHGU6w WUN+5uPadqjbIfB6BgQpTZS79lnlE4H/AMVAFJ+y02AgL63hfkIlwU3jSqoE5qY1/oMVjApl2yyX1 VPzJUfGURFGxrIqPiUViXhqwt59ZQ4Ws539heX5WcP2EVd8rnTMC63qp0wmCTPwk2yDdoUcrFsI7c oevsLctfA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iosri-00046i-4n; Tue, 07 Jan 2020 17:42:02 +0000 Date: Tue, 7 Jan 2020 09:42:02 -0800 From: Christoph Hellwig To: Chris Mason Cc: Dave Chinner , Jens Axboe , Linus Torvalds , Linux-MM , linux-fsdevel , linux-block , Matthew Wilcox , Johannes Weiner Subject: Re: [PATCHSET v3 0/5] Support for RWF_UNCACHED Message-ID: <20200107174202.GA8938@infradead.org> References: <0d4e3954-c467-30a7-5a8e-7c4180275533@kernel.dk> <20191212221818.GG19213@dread.disaster.area> 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 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 Fri, Dec 13, 2019 at 01:32:10AM +0000, Chris Mason wrote: > They just have different tradeoffs. O_DIRECT actively blows away caches > and can also force writes during reads, making RWF_UNCACHED a more > natural fit for some applications. There are fewer surprises, and some > services are willing to pay for flexibility with a memcpy. In general, > they still want to do some cache management because it reduces p90+ > latencies across the board, and gives them more control over which pages > stay in cache. We can always have a variant of O_DIRECT that doesn't do that and instead check if data was in the cache and then also copy / from to it in that case. I need some time to actually look through this series, so it might be pretty similar to the implementation, but if defined the right way it could be concurrent for at least the fast path of no cached pages.