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,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 60E72C433DB for ; Tue, 29 Dec 2020 20:54:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D44E21D7F for ; Tue, 29 Dec 2020 20:54:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726247AbgL2UyA (ORCPT ); Tue, 29 Dec 2020 15:54:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbgL2Ux7 (ORCPT ); Tue, 29 Dec 2020 15:53:59 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78077C061574 for ; Tue, 29 Dec 2020 12:53:19 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id l11so33530459lfg.0 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=oks+s/jOgJsdAGm2l1DIAeep2L9g5GVFveFEDCWvmYGS0/i0Yx8Z5UL3dru8ajuw4w RcMcPDNLBtHRv5MBL0W+LtI8p30Jul0z5WSxX5jPJZ3ErAegXH63VEve4Z3lzuw+bIFD 5nnEAFPVimTJAV+ChIqXSMKKWqxhyZmHRYU55ozpkg8dpdGANde0f3NqOfwgQd+RGYq0 68UOSJA/iBzgTZPxOwTZXmyMz1LIZgklrWh6n8TvVjybxUSLEKZvouEF1crl+acMSSj4 67vqmUWTQswr5IiAPCuEwZMBDiphAkj+mlhkkL+qZQgICXWFnTO2aFvCyM5oVviEpp4/ 37Tw== X-Gm-Message-State: AOAM530FwJ4lwCdXBgP7kRESBuOP2WOIorcUN6HNFyc/frAFS8tpAGQg AIz/rePnm5YXZQsoNdk/6JnzCjWrPx36FQ== X-Google-Smtp-Source: ABdhPJzfYH4ITsGaafzYMy1gj0TeFjTqC92sjV9bIT71uxhttuGboz5AOzl/pRLP1A8vUmIMTnvhNQ== X-Received: by 2002:a19:d86:: with SMTP id 128mr23210417lfn.317.1609275197233; Tue, 29 Dec 2020 12:53:17 -0800 (PST) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id x8sm5756440lfn.226.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-f51.google.com with SMTP id h205so33438577lfd.5 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" 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 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,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 0622CC433DB for ; Tue, 29 Dec 2020 20:53:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6D5B320771 for ; Tue, 29 Dec 2020 20:53:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D5B320771 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 9740C8D0038; Tue, 29 Dec 2020 15:53:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 94D4A8D002C; Tue, 29 Dec 2020 15:53:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 889318D0038; Tue, 29 Dec 2020 15:53:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id 72C718D002C for ; Tue, 29 Dec 2020 15:53:20 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 38186181AEF10 for ; Tue, 29 Dec 2020 20:53:20 +0000 (UTC) X-FDA: 77647520160.25.cars94_5308d2e2749f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id ECBC71804E3A0 for ; Tue, 29 Dec 2020 20:53:19 +0000 (UTC) X-HE-Tag: cars94_5308d2e2749f X-Filterd-Recvd-Size: 5941 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Tue, 29 Dec 2020 20:53:19 +0000 (UTC) Received: by mail-lf1-f53.google.com with SMTP id l11so33530470lfg.0 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=AKPuCiNXfpaa4HAJm/xsBHDmX9qWlxSMC2xAfaLDm+WgRigsRwweAXR0BKzXtcPV8p PoDxtkEmwzmWJnhBNQeSBvrwV6/D+teF2dUcFoe8isiGvzWcPmffI8QTodQqQEVRWw9G 1lwLuE2HyNPf+gh7zFT1+IuwtGGWOP1AW/kLCX1UrjMTsIKR7AiSEGiNmEiWKSbldU8S XJbsvBAx68FXISwsyhSbma6vkeIMG1yyTrt3H2gJzMBEe88Ms0zAm8fdPSOB/LL+RxVo F0S7c3qLdFlrkI3i2lfs4g95JXgYew0HlWFf6FYT0SDlxrsgdxaioGMEhuR1xsH1BOTQ mh0Q== X-Gm-Message-State: AOAM531/A17wXyTnuaRfqJ1Mv3NTulw9BG94WzNKt+zNqQRczdOsq7ij BohnV/KW2o1RIzvnXSfvraa/XdZDB2OS9g== X-Google-Smtp-Source: ABdhPJxQta7tw03ZIW6GMNjLXSB8+vxMPXeTNuayRbU81WqUEk06rZZ5bCAaXtgwLIgMQBg/FpQJtQ== X-Received: by 2002:a2e:7803:: with SMTP id t3mr26305629ljc.213.1609275197276; Tue, 29 Dec 2020 12:53:17 -0800 (PST) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id j20sm6988496ljc.47.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-f52.google.com with SMTP id m25so33414021lfc.11 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" 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 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 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