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.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 937F1CA9EAE for ; Tue, 29 Oct 2019 16:52:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6674F20679 for ; Tue, 29 Oct 2019 16:52:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572367947; bh=W4XX97PoCbD1ccbiz4hoXwSku4pWV6yF2Na31s9mC+k=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=hwxn4zMtJF5WvJ7Qh41pn8JVn7Mi1NwyCcdX9sV/aS1sx+lG12dhdo+MkbcnHSKjn 1Xu1GvCsNko1gUuuWlUd6S7K3yIXMpV67UA59m2FC323R5M16xgWIHkgvMZBKnnOo2 1cI9Spbh2r7ssfKaflx3SxfN1TbJatGErjjMj0Ck= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728686AbfJ2Qw1 (ORCPT ); Tue, 29 Oct 2019 12:52:27 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:41599 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727279AbfJ2Qw0 (ORCPT ); Tue, 29 Oct 2019 12:52:26 -0400 Received: by mail-lj1-f196.google.com with SMTP id m9so6385235ljh.8 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=J277m49cFwovqiejFyqSlcGDdtE6p4tiemVniZRuhyWxSWAAr9FGB+iQFntWC9wRdZ 62G81/0iY3kU15+b1j2tEDkPilUeOT/fWOI/2OcabvojqBRZUgtETO4rt5KgsUBO/Cze 0y92dKjWjoryGn6AjTFCZJFirZYyoxZeGzybnmIzaeMWktZBxQVC3L43iFMMcmFDQv9v jFaHcnalFpXAsX/ZbQeYl9ShXwAbiY9JUz4+uJZDP4yBxlt7gPWiceMn2PAAjQbsZRw/ 1tKAooabH46NuAML8JWS63rajvqIHlueoAnhP0+CnCCkuQe+4qk0L9fmksMqYhamfCo/ VFLw== X-Gm-Message-State: APjAAAVUHc7vNwi2ptIVVPdyUcUkuvKZlanvwswJeaQ9K7b59WDGm6s8 WYs1iG1+P/rQla0ZNL2MoEAc7OxfEADvxg== X-Google-Smtp-Source: APXvYqzN9nFbbdVISSQz74kq0DmK1FDtMdtEuswBevN8fZR+vqC+c1LyxDAqQIpBtihKXYc4ojnVuA== X-Received: by 2002:a2e:9942:: with SMTP id r2mr3448881ljj.168.1572367943055; Tue, 29 Oct 2019 09:52:23 -0700 (PDT) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id r19sm769343lfi.13.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-f51.google.com with SMTP id q28so11074503lfa.5 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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