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 805A7C433DB for ; Tue, 29 Dec 2020 20:54:54 +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 28A7421D1B for ; Tue, 29 Dec 2020 20:54:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28A7421D1B 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=+HG95cd3HPLUZ1ftndOY87pDiJOgGBc7k2r4XwQTdTU=; b=aM8RrpDLWlL81Idmp+iNW+fd8 6z5CV17mvY7zYr9nTeETgp2JR0MNsd6fDrzY3MdrPQV3YS/OesDuuS8jN20I2NBPOq/efzMZN9fCV WUpGEfzckUawKWWhpPig5HviUjayl3zMZkbDDXFNQirkNSaXk51gDxUqmSFDfX5fa3VC8+PVk/n1o DVavExrdd/5NVLgFjVHMLVi06MVJWEi4yj7+0DI45Dc2EzbIwQIhcaF1R+rmHO5EuKNpXVm/hOsTG kf+slmOH9bl/U1MVx0aDOKjNiKq7LdemJX24WpWDtcPDfqam6BWJAi2pzHw2P03gWaNzXQVSqWKCw vO7U9tQJg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kuLze-0006a5-TH; Tue, 29 Dec 2020 20:53:22 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kuLzb-0006Yv-Ip for linux-arm-kernel@lists.infradead.org; Tue, 29 Dec 2020 20:53:21 +0000 Received: by mail-lf1-x12c.google.com with SMTP id a12so33469119lfl.6 for ; Tue, 29 Dec 2020 12:53:19 -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=dX68ilDXqjy1fUBrgW9VQ3uuQmcUVgu3Z6hs0+zxIIQ=; b=a7wrY1O1/RN5nqFj+D0sSZcwTHnPS+6PSYnz1H9gUqvKMTfoLcKsnadMRpS1VAe7Gb 2yuzNGMoVPr0fpElXREonWdunB/Skoh9fNn9Rbft22u05UDRbxuQEdwAZM8o24/8t8RS uV26HhsyamQZTdN492hG4xq57TiZr2bLR9/KU= 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=dX68ilDXqjy1fUBrgW9VQ3uuQmcUVgu3Z6hs0+zxIIQ=; b=YTjpzrf61ZWszaEem+fyR0IeUB6qcFwgA1zfUo2hciqvgrJB4y5z1sjrriexR0Bg7B RMceCSduJihHw+pxyUP3YbgfcjkcRJvUj6tpC/sUNTnAaDkPnJIOKLh+kFGOSo0+iH/Z VEegELww75IBAtdz0JpHNvdpAqyb6juTABw0sLbwID8GoxaLOLCcCS1aM1rnFQLmxf0X lwk5Foz8ZCRuat9wRl1JXuQvfXcEH6iaj0cdOyDEyn4cNqmJ1ZWIU5oGkjTZsYarR6jm oI7gYvuFxa8KTaXLRBnFazZLgn5i/SQa58TQN2KZ4MiKVc3dsSa9Lv6A/GsmZKjeehAM grbw== X-Gm-Message-State: AOAM53209G8vngVNTcrTbPM2p/2R9Tev7VrUaEwoivAvzVkAvyOSps8o UWlBWXeu4D49aA98XhNjfiJHfGxNbMZW4A== X-Google-Smtp-Source: ABdhPJzwKw39rwIMwHVObL95g+uiQGBWltXtkC7ue6eU0TYs2XuBqHtFCmXPq9FZsIrGu94cndhAaA== X-Received: by 2002:a19:4c44:: with SMTP id z65mr9537459lfa.315.1609275197150; Tue, 29 Dec 2020 12:53:17 -0800 (PST) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com. [209.85.167.54]) by smtp.gmail.com with ESMTPSA id n8sm5759729lfi.48.2020.12.29.12.53.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Dec 2020 12:53:15 -0800 (PST) Received: by mail-lf1-f54.google.com with SMTP id o19so33541353lfo.1 for ; Tue, 29 Dec 2020 12:53:15 -0800 (PST) X-Received: by 2002:a2e:8995:: with SMTP id c21mr23846649lji.251.1609275194794; Tue, 29 Dec 2020 12:53:14 -0800 (PST) MIME-Version: 1.0 References: <20201226224016.dxjmordcfj75xgte@box> <20201227234853.5mjyxcybucts3kbq@box> <20201228125352.phnj2x2ci3kwfld5@box> <20201229132819.najtavneutnf7ajp@box> In-Reply-To: <20201229132819.najtavneutnf7ajp@box> From: Linus Torvalds Date: Tue, 29 Dec 2020 12:52:58 -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" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201229_155319_756670_C35259BD X-CRM114-Status: GOOD ( 17.70 ) 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 , Hugh Dickins , Linux Kernel Mailing List , Matthew Wilcox , Linux-MM , Vinayak Menon , Linux ARM , Andrew Morton , Will Deacon , "Kirill A. Shutemov" 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 Tue, Dec 29, 2020 at 5:28 AM Kirill A. Shutemov wrote: > > I reworked do_fault_around() so it doesn't touch vmf->address and pass > original address down to ->map_pages(). No need in the new argument in > ->map_pages. filemap_map_pages() calculates address based on pgoff of the > page handled. So I really like how the end result looks, but it worries me how many problems this patch has had, and I'd love to try to make it more incremental. In particular, I really liked your re-write of the loop in filemap_map_pages(), and how you separated out the pmd case to be a separate early case. I think that was some of the nicest part of the patch. And I really like how you changed the vmf->address meaning in this latest version, and pass the real address down, and pass the range just in the start/end_pgoff. That just looks like the RightThing(tm) to do. But I think these nice cleanups could and should be independent of some of the other changes. The unlocking change, for example, that changed the return type from void to vm_fault_t, also looks like a nice cleanup, but that's also the one that caused the last series of odd problems for Hugh. The fix for that then also caused that ugly "goto out" mess, which undid some of the "this looks really nice" effects. I don't even see the need for that "goto out". Yes, it resets the 'vmf->address' back to what it should be (so that __do_fault() fallback can work right), but the two first "goto out" cases haven't actually changed it (or ther mmap_miss), so why did they need to do that? Anyway, I really like how it all looks (apart from that odd "goto out" detail - nitpicking here) but it does worry me that it changes so much and had so many small problems.. Linus _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel