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=-5.7 required=3.0 tests=BAYES_00,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 BBF22C4361B for ; Wed, 9 Dec 2020 21:05:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8DF7F22CB1 for ; Wed, 9 Dec 2020 21:05:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730891AbgLIVFY (ORCPT ); Wed, 9 Dec 2020 16:05:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725968AbgLIVFY (ORCPT ); Wed, 9 Dec 2020 16:05:24 -0500 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDCE9C0613D6 for ; Wed, 9 Dec 2020 13:04:43 -0800 (PST) Received: by mail-lf1-x143.google.com with SMTP id l11so5095620lfg.0 for ; Wed, 09 Dec 2020 13:04:43 -0800 (PST) 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=WwSKHrmHmEJGWwO8q35qAr+m2UELcccwDz7jvO6KV+0=; b=IGmsBh+7AADorFbyaW+61TYjRjnM3bZ+NPiz+O5Dtl9xXc7x2VzpA6Qi+F5WOMjgq6 uMLjKW4msweI0isgQir1zt5KsIkczApET555uk/vdNU6Y07CL9TzUCflnfZuK/y+iqje yIw7qBjbKEo3ew5HYtrYmvAXUyDO9SGwq8BK8= 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=WwSKHrmHmEJGWwO8q35qAr+m2UELcccwDz7jvO6KV+0=; b=nXKHSG8Aza4nhU0pM8PEUeLeClcFXehuXR37cavWgWyKkq8vls0BNoTiy1QP39uvBD RtXOzeT20Q5Xt6nw0LKk2iU3XLEVbMGH1nhIIll7KN0ArgeKIi/ARa2iGWfPEGlVbUdn J2x4epcEiQMhInwPGZvlfka09zVSM8K32UD+0gC7zbk0UCM3nTVi1K64Hn2VHkV+V2DR Wwv0mXBUoY+9aXsaWsb69rO8TqYpHdxsZHc3GK3Qez6wa1tii43RooVzOU+owSvV1DIV nqkbKuFOoedJIG6Zo04//Hlqr9bokue2r4HdBVVRbrH5R7b6p5dV2RGUmwVS/2SJHOOn Vkzw== X-Gm-Message-State: AOAM533oQKkVm5Rei77w/j480LINZKiFAV2mnpgetmXgbc+zBIekatxt uxwHN2l6O+mrE7p1fjAeeruVVri1cbFSRA== X-Google-Smtp-Source: ABdhPJzUYRX9ZuksO2l2iCr6mfgoJOdwrKhohrcuXZFWFq/HnUo7CcQYcrb6joODg0pNdirNNNFoQQ== X-Received: by 2002:ac2:43c1:: with SMTP id u1mr610299lfl.38.1607547882022; Wed, 09 Dec 2020 13:04:42 -0800 (PST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id g15sm286097lfd.42.2020.12.09.13.04.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Dec 2020 13:04:39 -0800 (PST) Received: by mail-lj1-f180.google.com with SMTP id t22so4155668ljk.0 for ; Wed, 09 Dec 2020 13:04:39 -0800 (PST) X-Received: by 2002:a2e:6f17:: with SMTP id k23mr1768604ljc.411.1607547879048; Wed, 09 Dec 2020 13:04:39 -0800 (PST) MIME-Version: 1.0 References: <20201209163950.8494-1-will@kernel.org> <20201209163950.8494-2-will@kernel.org> <20201209184049.GA8778@willie-the-truck> <20201209203203.GU7338@casper.infradead.org> In-Reply-To: <20201209203203.GU7338@casper.infradead.org> From: Linus Torvalds Date: Wed, 9 Dec 2020 13:04:22 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] mm: Allow architectures to request 'old' entries when prefaulting To: Matthew Wilcox Cc: Will Deacon , Linux Kernel Mailing List , Linux-MM , Linux ARM , Catalin Marinas , Jan Kara , Minchan Kim , Andrew Morton , "Kirill A . Shutemov" , Vinayak Menon , Android Kernel Team Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 9, 2020 at 12:32 PM Matthew Wilcox wrote: > > If a filesystem has put an Uptodate page into the page cache, the > rest of the kernel can read it without telling the filesystem. XFS does the same thing for xfs_file_read_iter() too. Not that I disagree with you - when you mmap a file, once it's mapped you see the data without any lock anyway. So it's all kinds of pointless to serialize the page fault, because that's simply not relevant. The lock will be gone by the time the user actually sees the data. But hey, the XFS people have their opinions. Linus 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=-5.7 required=3.0 tests=BAYES_00,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 143B4C433FE for ; Wed, 9 Dec 2020 21:04:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9974422CB1 for ; Wed, 9 Dec 2020 21:04:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9974422CB1 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 2BCA78D0057; Wed, 9 Dec 2020 16:04:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 244CB8D0031; Wed, 9 Dec 2020 16:04:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 10D758D0057; Wed, 9 Dec 2020 16:04:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0002.hostedemail.com [216.40.44.2]) by kanga.kvack.org (Postfix) with ESMTP id EBBE98D0031 for ; Wed, 9 Dec 2020 16:04:44 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id B076F1EE6 for ; Wed, 9 Dec 2020 21:04:44 +0000 (UTC) X-FDA: 77574972888.16.girls24_350772e273f2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 86EC9100E690B for ; Wed, 9 Dec 2020 21:04:44 +0000 (UTC) X-HE-Tag: girls24_350772e273f2 X-Filterd-Recvd-Size: 4406 Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Dec 2020 21:04:43 +0000 (UTC) Received: by mail-lf1-f66.google.com with SMTP id m25so5034453lfc.11 for ; Wed, 09 Dec 2020 13:04:43 -0800 (PST) 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=WwSKHrmHmEJGWwO8q35qAr+m2UELcccwDz7jvO6KV+0=; b=IGmsBh+7AADorFbyaW+61TYjRjnM3bZ+NPiz+O5Dtl9xXc7x2VzpA6Qi+F5WOMjgq6 uMLjKW4msweI0isgQir1zt5KsIkczApET555uk/vdNU6Y07CL9TzUCflnfZuK/y+iqje yIw7qBjbKEo3ew5HYtrYmvAXUyDO9SGwq8BK8= 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=WwSKHrmHmEJGWwO8q35qAr+m2UELcccwDz7jvO6KV+0=; b=bET75UuVFJ+xZfxecWA7ys30nF+n3P6Qhrk1Cz0Nl25u6VIZtTThpHVeKXF8Mw3J0n KFj5P2kz7SnJU3EyOiHvSFCVd2BZeWGr7AMaB2TGkPQ/yT34CnA2S76XKIb5d0whDm4r 65dH5HKxU91j8Yd5lZyO+eumZ6X3qb1N306trPqGqxWx4VQAyNLGF68Iz3XVu+vYsjBO P5UskkLTGQFmJjTYlHgXsuW1VP4bascFTR+J5UXWXyA4z7N4sqIe4oNR8iV5Bb6dF4jk OSmrM7PubZotSo8iY9k9K+EvgXD4NxymN7XZJ7f4w2pG1wTArVr2ABfY7BqdoYaj4VUF hX+Q== X-Gm-Message-State: AOAM532MV9iYxX9C7ECpNNMSMvx4GyJdqALw3nZTqJZ2TrI9ZT/uiwNm oU3vqQaA1fKeIQF0hWVwGhReXnF91iwnaQ== X-Google-Smtp-Source: ABdhPJx+Dv1fHwQYP29fyKO211hBDocW45s+fnOQ/9f2iuhZ1R7WsSkZy0Or2VL97qiGR5p7k7agOA== X-Received: by 2002:a19:904:: with SMTP id 4mr1576416lfj.64.1607547881971; Wed, 09 Dec 2020 13:04:41 -0800 (PST) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id q16sm284578lfc.179.2020.12.09.13.04.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Dec 2020 13:04:39 -0800 (PST) Received: by mail-lj1-f181.google.com with SMTP id f11so4149995ljn.2 for ; Wed, 09 Dec 2020 13:04:39 -0800 (PST) X-Received: by 2002:a2e:6f17:: with SMTP id k23mr1768604ljc.411.1607547879048; Wed, 09 Dec 2020 13:04:39 -0800 (PST) MIME-Version: 1.0 References: <20201209163950.8494-1-will@kernel.org> <20201209163950.8494-2-will@kernel.org> <20201209184049.GA8778@willie-the-truck> <20201209203203.GU7338@casper.infradead.org> In-Reply-To: <20201209203203.GU7338@casper.infradead.org> From: Linus Torvalds Date: Wed, 9 Dec 2020 13:04:22 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] mm: Allow architectures to request 'old' entries when prefaulting To: Matthew Wilcox Cc: Will Deacon , Linux Kernel Mailing List , Linux-MM , Linux ARM , Catalin Marinas , Jan Kara , Minchan Kim , Andrew Morton , "Kirill A . Shutemov" , Vinayak Menon , Android Kernel Team 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 Wed, Dec 9, 2020 at 12:32 PM Matthew Wilcox wrote: > > If a filesystem has put an Uptodate page into the page cache, the > rest of the kernel can read it without telling the filesystem. XFS does the same thing for xfs_file_read_iter() too. Not that I disagree with you - when you mmap a file, once it's mapped you see the data without any lock anyway. So it's all kinds of pointless to serialize the page fault, because that's simply not relevant. The lock will be gone by the time the user actually sees the data. But hey, the XFS people have their opinions. Linus 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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 04FC8C4361B for ; Wed, 9 Dec 2020 21:05:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B0CE72388B for ; Wed, 9 Dec 2020 21:05:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0CE72388B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/kPn5+CJNylfiJQfZcQcAZaXtBhejmCbtBqTG7/01hQ=; b=wVbEyDOWfCJMMfgBQ+PSfWkn0 /d9BIpy/aZrjs9KMgoiMX6r6hmfCI9Y5HpShokP7IkQAEYB7lj1QvgTkwots5GVMSW7nPygBO3BnS WlmHginoYNBKY87ibEy+n2n9jXQc8mqFdV1IhHzrDadnArD5XFr9aFue86yB3MU1DmRmoyRnKzyVx uCGVjKM15APfBrU9Bo3o25JhtxO0CTCohHboyXYsYrL1Rhc02eoKl6qWvmZb5e5vVseLXs3yh0c1Z IDTcdaSlfkLL9sYP2aeth6G78X2OPjPJRn8vIYFio39pu4l0yN0RvEzLz5FbS6E1jqiCT3iiG3REh ToWtlv1FQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kn6dl-0002MV-4u; Wed, 09 Dec 2020 21:04:49 +0000 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kn6dg-0002K1-MV for linux-arm-kernel@lists.infradead.org; Wed, 09 Dec 2020 21:04:46 +0000 Received: by mail-lf1-x141.google.com with SMTP id a9so5087621lfh.2 for ; Wed, 09 Dec 2020 13:04:44 -0800 (PST) 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=WwSKHrmHmEJGWwO8q35qAr+m2UELcccwDz7jvO6KV+0=; b=IGmsBh+7AADorFbyaW+61TYjRjnM3bZ+NPiz+O5Dtl9xXc7x2VzpA6Qi+F5WOMjgq6 uMLjKW4msweI0isgQir1zt5KsIkczApET555uk/vdNU6Y07CL9TzUCflnfZuK/y+iqje yIw7qBjbKEo3ew5HYtrYmvAXUyDO9SGwq8BK8= 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=WwSKHrmHmEJGWwO8q35qAr+m2UELcccwDz7jvO6KV+0=; b=GMgcPqazv+8j3MpUFdrB/rUNlEFtRIpZfFh2HPe2muuIJn9k9oFt+TvQQ6vMSZcbn3 ZD/ADIRw4z/h0vLqmlqXfXFrXadf8lescxkKu0RnO9HxJ5ZFZZuIFHUFo6Y4V7QOQgrQ mDn91ir21nBDZyY+5qjdYc1IWiVYYtLK+Q2mpsViIm4ymckneBwpiwA99xchXVwOKDJZ 94yOc2MZhVfDMC1GHtgsGuAsMjGcXvNK5AJv1sLPjyGrRhBXEoLxc9/k77emShrVKdcP q3ULDJwPsgprfGljbN6xYRdTDQTUftYezyPcg/8VusUdK1Ocza1UUFrWAFQldrTgeWE2 1QoQ== X-Gm-Message-State: AOAM533tqZ2WS5KPpEwWN45VPoztau79iQggB3yTOg/u/S/dhk1Spoq5 Goz1IVliyeEi/+/ocVpQJYovbzK89CqN/w== X-Google-Smtp-Source: ABdhPJyhNE551+pEQRXI7xf1vLJUSAa/A9/3H2mCeZJdiNMS7SbIfi/J9vOiX2CjNZ6TLMMUUlOHNA== X-Received: by 2002:ac2:59c6:: with SMTP id x6mr1619199lfn.82.1607547882480; Wed, 09 Dec 2020 13:04:42 -0800 (PST) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id j7sm284940lfg.114.2020.12.09.13.04.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Dec 2020 13:04:39 -0800 (PST) Received: by mail-lj1-f172.google.com with SMTP id j10so4126258lja.5 for ; Wed, 09 Dec 2020 13:04:39 -0800 (PST) X-Received: by 2002:a2e:6f17:: with SMTP id k23mr1768604ljc.411.1607547879048; Wed, 09 Dec 2020 13:04:39 -0800 (PST) MIME-Version: 1.0 References: <20201209163950.8494-1-will@kernel.org> <20201209163950.8494-2-will@kernel.org> <20201209184049.GA8778@willie-the-truck> <20201209203203.GU7338@casper.infradead.org> In-Reply-To: <20201209203203.GU7338@casper.infradead.org> From: Linus Torvalds Date: Wed, 9 Dec 2020 13:04:22 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] mm: Allow architectures to request 'old' entries when prefaulting To: Matthew Wilcox X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201209_160444_833545_B4662E8D X-CRM114-Status: GOOD ( 12.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Android Kernel Team , Jan Kara , Minchan Kim , Catalin Marinas , Linux Kernel Mailing List , Linux-MM , Vinayak Menon , "Kirill A . Shutemov" , Andrew Morton , Will Deacon , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 9, 2020 at 12:32 PM Matthew Wilcox wrote: > > If a filesystem has put an Uptodate page into the page cache, the > rest of the kernel can read it without telling the filesystem. XFS does the same thing for xfs_file_read_iter() too. Not that I disagree with you - when you mmap a file, once it's mapped you see the data without any lock anyway. So it's all kinds of pointless to serialize the page fault, because that's simply not relevant. The lock will be gone by the time the user actually sees the data. But hey, the XFS people have their opinions. Linus _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel