Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp427800ybi; Thu, 13 Jun 2019 19:31:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwX7OMikbLOa0e00figIHjfZKiOb+hiqx8GISgV+D4EmjAIPNtRtrwGwlNSTgrDG9kQkdhe X-Received: by 2002:a17:90a:c504:: with SMTP id k4mr8556146pjt.104.1560479490928; Thu, 13 Jun 2019 19:31:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560479490; cv=none; d=google.com; s=arc-20160816; b=f1I0JT/m7tLHs1wRpCU1a6WzthLPoBtu3frpdLOCrq6UUAVMFq5QYXfOpI3YE6MsJF +EKfYCGVVTrmvpVYHH/a2YXDK2GE45wiCx65WcZAGESjGD5RrSjS4EMHumNT8f356WzA 1R38RSAPU036K6AS6b2iVNt0GjQ/hXyn2gfdoGJHq/3vhpNooRaDH0WUdPT5/JBVfjOT 4WlUQ0jh0pq5v9Sa3C+3jh/FzEr6JQ+/qqt9NN83GQHUZuTHuY+bt69nzQP98vsfe+j5 ia0+qebp3aH4Tv3BNFdzXdD3KLpztOV4AXULaOj62Jh+zUIiPTz23u7qUwvQ3IO97lxg 9MDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=54SzfXIM0CUZELnkDPId2LFnAOP2eMm66mZYeVaiMIc=; b=y7WwN+YWvXZRF9/zzVkVIo7quI/u6mKDmWBkcy5YCDGPUqhBiaxGVRyKB1J4pkG9ZS HecnQNnmsNL56UGfCN8wedjXfqsUeJKfFJhfXFX1ebsPjMPo3OcCsCZis5A8t5WJFUob 54RdLWZS/26gI54RlmrPh0Pv1800cIKCgLC4GKksQve6R+b0+zKAAhbywn48YL0rIp81 6t68gqQDzwT3BL7qDr41kzrY/7BV00simCILjtMU0lWkuDB3/arlUiETZYcwlFNywmp6 G+e1G1/Tk6cNdIq2uweKsoITY+zC/M4NJby0N89XdITNPpdDW8FsUT0uc1a/Zz3q+B4K Htow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=b6wus35D; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g67si1180100pgc.344.2019.06.13.19.31.14; Thu, 13 Jun 2019 19:31:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=b6wus35D; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725838AbfFNCa6 (ORCPT + 99 others); Thu, 13 Jun 2019 22:30:58 -0400 Received: from mail-lf1-f49.google.com ([209.85.167.49]:44322 "EHLO mail-lf1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbfFNCa5 (ORCPT ); Thu, 13 Jun 2019 22:30:57 -0400 Received: by mail-lf1-f49.google.com with SMTP id r15so581436lfm.11 for ; Thu, 13 Jun 2019 19:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=54SzfXIM0CUZELnkDPId2LFnAOP2eMm66mZYeVaiMIc=; b=b6wus35DaLhs8FFeq7PNRZ3hYyz4oMdypJnhTcMZaFiSx3caRk6yJHOkFLmXfc68gQ FYnDbGsYmvinxpLwPoM2+Xa2pga+BkCWG8bI9aaj+MagRJ3SZ/YT13ZFs5CQZvlGQwk+ z315q1qxQWAhXJ4qm5Fc+0jzeL3t3lDjn2XKM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=54SzfXIM0CUZELnkDPId2LFnAOP2eMm66mZYeVaiMIc=; b=DVbB1StfOZ+gDgVL71hEp/Z529VV6Z37WC3TnxxoG0lA/4+g36Y0wCRnnt7bYlCvOM oX/68M8FV8I9AqMDnuU10zNJpgCrhyQGwY7o5AoYFlR751q3CqT8a07ZA8tK9DtRZyY+ nrV67i2QXIeAqP2IcQPQ/FILP7o/DC3bFrJoK7IIf/R707SegTW+pT/FlMxDK+zir0io y2Td7eJCbd6n1o7EI5SPF6obYUq90xacE37GbzMtyEI/cw2dAryIDo4twVw3dVjeAk8U mY2s7yoF+lrf60nF/zp3WNfWjoH7c6dSLgS1aw0kdqzsbPefe5PmQ/bPtuBPTknU1l+t aBfA== X-Gm-Message-State: APjAAAUxhk9B2WL4Y3l5FLvoeT28ZOyJ60lMh/0dSNEd73IzKUaZQor4 UcogK7cdzFjrFOR1aBL7h/yneceXcbg= X-Received: by 2002:ac2:54a6:: with SMTP id w6mr6820947lfk.108.1560479455192; Thu, 13 Jun 2019 19:30:55 -0700 (PDT) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com. [209.85.208.178]) by smtp.gmail.com with ESMTPSA id i23sm306683ljb.7.2019.06.13.19.30.53 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 19:30:53 -0700 (PDT) Received: by mail-lj1-f178.google.com with SMTP id k18so704892ljc.11 for ; Thu, 13 Jun 2019 19:30:53 -0700 (PDT) X-Received: by 2002:a2e:9ec9:: with SMTP id h9mr11450885ljk.90.1560479452914; Thu, 13 Jun 2019 19:30:52 -0700 (PDT) MIME-Version: 1.0 References: <20190610191420.27007-1-kent.overstreet@gmail.com> <20190611011737.GA28701@kmo-pixel> <20190611043336.GB14363@dread.disaster.area> <20190612162144.GA7619@kmo-pixel> <20190612230224.GJ14308@dread.disaster.area> <20190613183625.GA28171@kmo-pixel> <20190613235524.GK14363@dread.disaster.area> In-Reply-To: <20190613235524.GK14363@dread.disaster.area> From: Linus Torvalds Date: Thu, 13 Jun 2019 16:30:36 -1000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: pagecache locking (was: bcachefs status update) merged) To: Dave Chinner Cc: Kent Overstreet , Dave Chinner , "Darrick J . Wong" , Christoph Hellwig , Matthew Wilcox , Amir Goldstein , Jan Kara , Linux List Kernel Mailing , linux-xfs , linux-fsdevel , Josef Bacik , Alexander Viro , Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 13, 2019 at 1:56 PM Dave Chinner wrote: > > That said, the page cache is still far, far slower than direct IO, Bullshit, Dave. You've made that claim before, and it's been complete bullshit before too, and I've called you out on it then too. Why do you continue to make this obviously garbage argument? The key word in the "page cache" name is "cache". Caches work, Dave. Anybody who thinks caches don't work is incompetent. 99% of all filesystem accesses are cached, and they never do any IO at all, and the page cache handles them beautifully. When you say that the page cache is slower than direct IO, it's because you don't even see or care about the *fast* case. You only get involved once there is actual IO to be done. So you're making that statement without taking into account all the cases that you don't see, and that you don't care about, because the page cache has already handled them for you, and done so much better than DIO can do or ever _will_ do. Is direct IO faster when you *know* it's not cached, and shouldn't be cached? Sure. But that/s actually quite rare. How often do you use non-temporal stores when you do non-IO programming? Approximately never, perhaps? Because caches work. And no, SSD's haven't made caches irrelevant. Not doing IO at all is still orders of magnitude faster than doing IO. And it's not clear nvdimms will either. So stop with the stupid and dishonest argument already, where you ignore the effects of caching. Linus