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.8 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 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 1116DC433DB for ; Mon, 28 Dec 2020 23:36:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 84B8A20829 for ; Mon, 28 Dec 2020 23:36:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84B8A20829 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 AD9188D0021; Mon, 28 Dec 2020 18:36:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A61E48D0018; Mon, 28 Dec 2020 18:36:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9295E8D0021; Mon, 28 Dec 2020 18:36:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id 77F838D0018 for ; Mon, 28 Dec 2020 18:36:44 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 3EC9E181AC9CB for ; Mon, 28 Dec 2020 23:36:44 +0000 (UTC) X-FDA: 77644303128.23.hot40_4f0260f27497 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 2307337606 for ; Mon, 28 Dec 2020 23:36:44 +0000 (UTC) X-HE-Tag: hot40_4f0260f27497 X-Filterd-Recvd-Size: 4805 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Mon, 28 Dec 2020 23:36:43 +0000 (UTC) Received: by mail-lf1-f44.google.com with SMTP id h205so27271876lfd.5 for ; Mon, 28 Dec 2020 15:36: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=XYFP2ulc60ot4/NC1efgeH0hQlOhvsC8IPEDkooBvEs=; b=PnzaIY0WevdN1LX4x77XkAqdCbHnILaK8s5lgAa0OpFX4yGYQetICtSErEbnRqJyF2 df1IdnigAMWBVb78TsJfEZX+2u+q70jwsNoCzYhAOeHQSolJsz4xefb3lBQb/IMqWPfX LLsh+emoPQ9elejcOAXkRap3sj2sF/7th9mgE= 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=XYFP2ulc60ot4/NC1efgeH0hQlOhvsC8IPEDkooBvEs=; b=BzJidioKnJPFNY0gVJhKkIuZ2//nsBfaMI6OkXjV5ai5p8kDx/yz8Sw6saZdxmg+Jy wgsbs6NPJLbg9GBGgisLWQ5oK09magoLQo5CtzztTEIqK5wfqzKeNYElmK8FQ3gIFEnt nCoQw1Efs0ACPpkkC/O9lsy3lnasWqXWZOTRxvqAdbSUPlfiODYZkTvm28PATbOJAUEY t+kQN019EUolEvhrNv1wmE2L+1Z4Z8T6z48YPHa1d3viw4x7mlO7zeCKfO8/tcDAVuw7 9M+nu8CzhD2LMxcES37T37cJ3OluJuXooFD/ZDH62OZdunqqRN+O524YlRlYsWp959EV qO+A== X-Gm-Message-State: AOAM532B/p7ArOch+N8dyvM7IFQisuIpEdgZISRuj4Ol6davbB7PJzYw syiScPfI4aOnIOQOU+zII9ePJj6PQbI83A== X-Google-Smtp-Source: ABdhPJxhLQnuzHHbQu82Sx++tGpxk+yamL1noRDJQzFeuWhrxfR6l7JnVQxmRqR/R8advq4ESxM8lw== X-Received: by 2002:a05:651c:1027:: with SMTP id w7mr21787900ljm.297.1609198601606; Mon, 28 Dec 2020 15:36:41 -0800 (PST) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id j20sm6643255ljc.47.2020.12.28.15.36.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Dec 2020 15:36:41 -0800 (PST) Received: by mail-lf1-f50.google.com with SMTP id h205so27271833lfd.5 for ; Mon, 28 Dec 2020 15:36:41 -0800 (PST) X-Received: by 2002:a2e:6f17:: with SMTP id k23mr23942779ljc.411.1609198119916; Mon, 28 Dec 2020 15:28:39 -0800 (PST) MIME-Version: 1.0 References: <20201226224016.dxjmordcfj75xgte@box> <20201227234853.5mjyxcybucts3kbq@box> <20201228125352.phnj2x2ci3kwfld5@box> <20201228220548.57hl32mmrvvefj6q@box> In-Reply-To: <20201228220548.57hl32mmrvvefj6q@box> From: Linus Torvalds Date: Mon, 28 Dec 2020 15:28:23 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] mm: Allow architectures to request 'old' entries when prefaulting To: "Kirill A. Shutemov" Cc: Hugh Dickins , Matthew Wilcox , "Kirill A. Shutemov" , Will Deacon , Linux Kernel Mailing List , Linux-MM , Linux ARM , Catalin Marinas , Jan Kara , Minchan Kim , Andrew Morton , 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 Mon, Dec 28, 2020 at 2:05 PM Kirill A. Shutemov wrote: > > > But I *think* we should be fine here: do_fault_around() limits start_pgoff > and end_pgoff to stay within the page table. Yeah, but I was thinking it would then update ->pte to just past the edge. But looking at that logic, you're right - it will update ->pte and ->address only just before installing the pte, so it will never go _to_ the edge, it will always stay inside. So scratch my suspicion. It looked promising mainly because that ->pte pointer update was one of the things that changed when you instead compared against the address. Linus