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 42607C33C8C for ; Tue, 7 Jan 2020 17:42:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1569520715 for ; Tue, 7 Jan 2020 17:42:09 +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" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728365AbgAGRmI (ORCPT ); Tue, 7 Jan 2020 12:42:08 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:40892 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728266AbgAGRmI (ORCPT ); Tue, 7 Jan 2020 12:42:08 -0500 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 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org 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.