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.8 required=3.0 tests=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 1511CCA9EC0 for ; Mon, 28 Oct 2019 12:47:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B05C8204FD for ; Mon, 28 Oct 2019 12:47:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="cSff5S6y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B05C8204FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2D79E6B0007; Mon, 28 Oct 2019 08:47:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 260A36B0008; Mon, 28 Oct 2019 08:47:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 127D16B000A; Mon, 28 Oct 2019 08:47:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0095.hostedemail.com [216.40.44.95]) by kanga.kvack.org (Postfix) with ESMTP id E06B46B0007 for ; Mon, 28 Oct 2019 08:47:39 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 3CFA37591 for ; Mon, 28 Oct 2019 12:47:39 +0000 (UTC) X-FDA: 76093169838.21.low05_7cf18cfdf7a00 X-HE-Tag: low05_7cf18cfdf7a00 X-Filterd-Recvd-Size: 4125 Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Mon, 28 Oct 2019 12:47:38 +0000 (UTC) Received: by mail-lf1-f66.google.com with SMTP id z12so7688522lfj.9 for ; Mon, 28 Oct 2019 05:47:37 -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=43kMuxdcCYrw75OLEIGgvwzIRnKZbO0/qUIAHUs9fjA=; b=cSff5S6yI6dM9Egn5nfRqiok4k+70KNtQ3WNH3IFY088k4NXJ0NPflQG3OPr/taxkR xUEu/NkPtLE3zKEmQ7IjUCeeOc/9Hp5IaxSHYqvykCfrbI+eUodqR/b3+Jt0SEG2pKNN mNt1URIKmIq+awJoY+ucdy0NXoIrExTx+dTRA= 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=43kMuxdcCYrw75OLEIGgvwzIRnKZbO0/qUIAHUs9fjA=; b=EJyozz++okFK/2eG/3goP7zwsVQK1CCYameFF+yB9wJqW19M/+35g1n2lIln5fFHp0 cO4AyXy1cEwnn6yd9GpM20LDHdD/g6chbXj+7O+bDFVtTkMWmvDB6rGjXFgVeyyR1poJ YL8xW3DBTe8Ec6TSrJhwC4ECfkrOi/3g6FHwm6NBMd/8tyPXV6xNAyAppMBlz3lp2shx oketqnI42Au2D+xVh/JfcKvDQdrIDwjos3WnIBDAiap2fcBlcwWWuE2hSYOeWz1b/v4f ryzXFlzuPS8JBfrAEWAurL8/6VRAdqrD870RkxaJBQ3sKv6ftpAPMPOFj4tlJGTTT99I JOqg== X-Gm-Message-State: APjAAAUo5YU/k++uP3Xyc2NoqdCGmlYp4BK/wWlsG/P41/qlKstsNS7s 0/R1snT0RFCGroX37yAxRE1KfOhyn9pWsQ== X-Google-Smtp-Source: APXvYqykhS9IXDMrt7X313jOWQNpmEQSoRIKh0bjhizkj7CByCzCLtkLCMwrcdy2+RcveARbSNVdzA== X-Received: by 2002:ac2:48af:: with SMTP id u15mr11486771lfg.39.1572266855542; Mon, 28 Oct 2019 05:47:35 -0700 (PDT) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com. [209.85.208.171]) by smtp.gmail.com with ESMTPSA id g21sm9715817lje.67.2019.10.28.05.47.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Oct 2019 05:47:34 -0700 (PDT) Received: by mail-lj1-f171.google.com with SMTP id q64so11141919ljb.12 for ; Mon, 28 Oct 2019 05:47:33 -0700 (PDT) X-Received: by 2002:a05:651c:331:: with SMTP id b17mr11792488ljp.133.1572266853717; Mon, 28 Oct 2019 05:47:33 -0700 (PDT) MIME-Version: 1.0 References: <157225677483.3442.4227193290486305330.stgit@buzz> <20191028124222.ld6u3dhhujfqcn7w@box> In-Reply-To: <20191028124222.ld6u3dhhujfqcn7w@box> From: Linus Torvalds Date: Mon, 28 Oct 2019 13:47:16 +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: "Kirill A. Shutemov" Cc: Konstantin Khlebnikov , Linux-MM , Andrew Morton , Linux Kernel Mailing List , linux-fsdevel , Alexander Viro , Johannes Weiner , Steven Whitehouse Content-Type: text/plain; charset="UTF-8" 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 Mon, Oct 28, 2019 at 1:42 PM Kirill A. Shutemov wrote: > > I've tried something of this sort back in 2013: > > http://lore.kernel.org/r/1377099441-2224-1-git-send-email-kirill.shutemov@linux.intel.com > > and I've got push back. > > Apparently, some filesystems may not have valid i_size before >readpage(). > Not sure if it's still the case... Well, I agree that there might be some network filesystem that might have inode sizes that are stale, but if that's the case then I don't think your previous patch works either. It too will avoid the readpage() if the read position is beyond i_size. No? Linus