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.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, 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 511C4C2D0C9 for ; Thu, 12 Dec 2019 15:52:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 168EF2253D for ; Thu, 12 Dec 2019 15:52:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="SzI1DOGv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 168EF2253D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B6C458E0005; Thu, 12 Dec 2019 10:52:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B1B398E0001; Thu, 12 Dec 2019 10:52:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A098E8E0005; Thu, 12 Dec 2019 10:52:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0084.hostedemail.com [216.40.44.84]) by kanga.kvack.org (Postfix) with ESMTP id 8797D8E0001 for ; Thu, 12 Dec 2019 10:52:08 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 42FCB180AD81A for ; Thu, 12 Dec 2019 15:52:08 +0000 (UTC) X-FDA: 76256930736.21.cord58_8703bb4466508 X-HE-Tag: cord58_8703bb4466508 X-Filterd-Recvd-Size: 4363 Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Dec 2019 15:52:07 +0000 (UTC) Received: by mail-il1-f194.google.com with SMTP id r81so2462510ilk.0 for ; Thu, 12 Dec 2019 07:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=V0rzD69sAvpYoYAXwifXkGJ/c3BEX7oHaXNnSu/7R1A=; b=SzI1DOGvsgQG/a8ar2Ti7v2aUdaaiCFJizyPBOlaQbK9xD7GDmASaAQWVmpK/PrJFH feNXUM8rq1SIkXPCAT3IdmpYkcCHLjZskV2782eYG/I+CAlzZRWzyAKaxSQivhOL22rx 7TZY0ZwUivRozG48Xlnr1wKrP7wG5Fs9XrK1HM8yGvl2GX/ZcaIxFRgpGvJlo8QFa4Cx suElgOqZ7TUVlqGi7Sho7DskEt+8FWde9DkAZprvCODsA4rbSLFXhK9wSGJKw11FAP0g JbJMcIRGbqw/iezIhnauvM9V7jaDbpY7HX+dBxn9TMBnNe0ohevkevPACyP75fUBBlUF cJjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=V0rzD69sAvpYoYAXwifXkGJ/c3BEX7oHaXNnSu/7R1A=; b=kjO+wJEuSgGLPqKTRUtjQd4KXwm2CfMTo32AlYyeX2GJm2UH+Xwpwg/oscD6Gs4fda a/Y9ZMAI1NOjqHloAvehMQ49/PggFPMhQ6dTzUNFUMRjfaLCqv0T9bAg93GktDo00IUK 5QOgs7vZqJwGAz7xiMrgJ2PYT0v/XM1UrA0OrcEGEMK816yVkfmOfjxN3VIJLpZsUjaw 5MEPVOovWgLoC04AbkRqj+yejvHUTXfjuwSzH70CuP6U+gXyihxXe+3XI49HkRS7jPK5 QSoHKgill8bSll9dTwZMsyYPbMC7e3dFD/ADmGUWLXGMMEza1jdedW4SDrki5cpAw7aR mTAw== X-Gm-Message-State: APjAAAUI0CnO3CSyTEHS0rRme4gbjgkZ7VgxR0pNO6TxNENglO3KU/cs o7WJ9RB7kc2pIbJK53uJBk4SAg== X-Google-Smtp-Source: APXvYqxS2dkp/Ovx5CvFCzb8EkwUApe8FaaO0vOhCgPE2dsCgSj49pRSoy3unKMrBzXFDk9H/Q4mAQ== X-Received: by 2002:a92:5c4a:: with SMTP id q71mr9001087ilb.266.1576165926938; Thu, 12 Dec 2019 07:52:06 -0800 (PST) Received: from [192.168.1.159] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id u10sm1818820ilb.8.2019.12.12.07.52.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Dec 2019 07:52:06 -0800 (PST) Subject: Re: [PATCHSET 0/5] Support for RWF_UNCACHED To: Christoph Hellwig Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org References: <20191210162454.8608-1-axboe@kernel.dk> <20191212154752.GA3936@infradead.org> From: Jens Axboe Message-ID: <941edff1-76fb-41f8-cb81-15ea0970e949@kernel.dk> Date: Thu, 12 Dec 2019 08:52:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191212154752.GA3936@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 12/12/19 8:47 AM, Christoph Hellwig wrote: > 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. The current patchset read side does not, hopefully the same can be done on the write side. No page cache usage for reads, because it did indeed turn out to have too much overhead. -- Jens Axboe