Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4623668ybg; Tue, 29 Oct 2019 09:54:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaHZ3FDmcUf7OHuFLfWctd3MTxdiNudwmqs08KWf8OLhJ7jQgT1iwVtenjXhbbcA40XnmW X-Received: by 2002:a50:8a90:: with SMTP id j16mr27560133edj.283.1572368042110; Tue, 29 Oct 2019 09:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572368042; cv=none; d=google.com; s=arc-20160816; b=LGTGO+bTXUrGkDaQ/5FNsYcWLEF6XGD23/F1LhXP8iYGymxFHTAA4HWituOXuqfFsf cT/qwZqDOWn5ytR4bmXWeG2aFtGQyN81htKkTNsVOcHWd6Ycnzv1y2rjzNq7r0zDZm1a go9GjCMofNmjIeZyGZZaGKuKxgai+tlWy/t9ch7mVK83y7rqn/790tJzSIohuv6E+3t/ QX+uh0vXB2gZCWs/w7D/TusGdb90OUuPu2o+zbiBSK2N4XDzbhNzAfhrehwj0Gsn5wRJ Fy2iXVjO7L8mL1rAKMAIKIuEzZyUMJvwykF6YMwFa9U7v3rrQL8dnBUFJYmOnMZ+goNP kxkQ== 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=JCP0gTNW0nrKOjfGXUDHkeT9LXYh8gTwBFSl8WQWe9E=; b=tDRgDQhZPx9GHKPm0sAKBv/jW9TWVrxUYrlameeTyTHcGwhAcVrSvOhf09RwihQSvs 1gSJcqa42pWTRCYIAi3tpeauGO4i1mHWEXOwcCpqcl3035r7uxeRJ6v5KyIbJQ/xJJJ0 9fOfU2mjL8QHivO+rWiZRQQXbdh/3AVT3u+7llHSUtSy4+kvEFVItA0pqe0+tXPGK6U0 Vu8z4SDJZbby8oMfYgWsWD5EWHgr7Bg6KB177eK5ydDWy/59k9I+hUBTjJ7BpODlYpft yQ4tApQCjKEix3h1y/HIjTf09Qwdk3hUE7TJl/JjQmGZDQQDUZEYIogmzf9h+R/+5ZuM smFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=PCQcPN9k; 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 jx8si8548065ejb.122.2019.10.29.09.53.38; Tue, 29 Oct 2019 09:54:02 -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=PCQcPN9k; 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 S2390367AbfJ2Qw2 (ORCPT + 99 others); Tue, 29 Oct 2019 12:52:28 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:44618 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728379AbfJ2Qw1 (ORCPT ); Tue, 29 Oct 2019 12:52:27 -0400 Received: by mail-lf1-f68.google.com with SMTP id v4so7640057lfd.11 for ; Tue, 29 Oct 2019 09:52:24 -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=JCP0gTNW0nrKOjfGXUDHkeT9LXYh8gTwBFSl8WQWe9E=; b=PCQcPN9krk/MLfnozI5e+YmrRxCY8nQ2YUphNRQ+Q7PWvraCFUevYyKeC3hb6cSU+E ptoftGM6aIVugo0NJ5Sj7+8ikD83EWAw+XBoNW6982A8TmkIVBVLCjVZXretXxGE0hIE uxSzFEmOYqjXztMzAKG2M3avS6nE/p3Mb230Y= 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=JCP0gTNW0nrKOjfGXUDHkeT9LXYh8gTwBFSl8WQWe9E=; b=Szu4e4Yj5ekKW+X5cigHeRda9m4BdC34IfGUvkYHrU3tZDU1my//a3eHkSOh5k457H DzgPSQ/xDzeCgAd7p2lNZI3eCaAZvdmAS+EoYRplyEcl6MKjU56i63X19fMVE+BLTD2n yKxLSuq9fI3kzed87t8ObecOfxAdkhGUklQAUefmM7d02OKfOVyz/qTLV06m75kTLcVF khFtxuREqzuNCaswsEoKTu0Nl9v/1AfIrPkqp+rYG60ZTdr3I3L/HB5pyuP5TB01zNUI qIAwaELNgm8r4HJXIq/c9c8IrE2FS3Z4aDE6ygFKFoIXmX+5YA2evVo4mmx802fW2I+h ZeZQ== X-Gm-Message-State: APjAAAW+bV+lpBqVoBfyJHPSdHoENeMaIyXhd7m6h72AFm1Hc0O0KXxF vwQekVs4PxgLKdWFoOXRGUeNYz7HxciGeg== X-Received: by 2002:ac2:5097:: with SMTP id f23mr2249151lfm.90.1572367943335; Tue, 29 Oct 2019 09:52:23 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id 81sm7614434lje.70.2019.10.29.09.52.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Oct 2019 09:52:22 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id t8so11034108lfc.13 for ; Tue, 29 Oct 2019 09:52:21 -0700 (PDT) X-Received: by 2002:a19:820e:: with SMTP id e14mr3088342lfd.29.1572367941598; Tue, 29 Oct 2019 09:52:21 -0700 (PDT) MIME-Version: 1.0 References: <157225677483.3442.4227193290486305330.stgit@buzz> <20191028124222.ld6u3dhhujfqcn7w@box> <20191028125702.xdfbs7rqhm3wer5t@box> In-Reply-To: From: Linus Torvalds Date: Tue, 29 Oct 2019 17:52:05 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm/filemap: do not allocate cache pages beyond end of file at read To: Konstantin Khlebnikov Cc: "Kirill A. Shutemov" , Linux-MM , Andrew Morton , Linux Kernel Mailing List , linux-fsdevel , Alexander Viro , Johannes Weiner , Steven Whitehouse 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 Tue, Oct 29, 2019 at 3:25 PM Konstantin Khlebnikov wrote: > > I think all network filesystems which synchronize metadata lazily should be > marked. For example as "SB_VOLATILE". And vfs could handle them specially. No need. The VFS layer doesn't call generic_file_buffered_read() directly anyway. It's just a helper function for filesystems to use if they want to. They could (and should) make sure the inode size is sufficiently up-to-date before calling it. And if they want something more synchronous, they can do it themselves. But NFS, for example, has open/close consistency, so the metadata revalidation is at open() time, not at read time. Linus