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=-14.8 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1, USER_IN_DEF_DKIM_WL 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 7A392C433E0 for ; Sun, 27 Dec 2020 02:39:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4870C2222B for ; Sun, 27 Dec 2020 02:39:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726187AbgL0Cja (ORCPT ); Sat, 26 Dec 2020 21:39:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbgL0Cj3 (ORCPT ); Sat, 26 Dec 2020 21:39:29 -0500 Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69031C0613CF for ; Sat, 26 Dec 2020 18:38:49 -0800 (PST) Received: by mail-oi1-x22e.google.com with SMTP id w124so8202836oia.6 for ; Sat, 26 Dec 2020 18:38:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=jJLUg7udy/yoAaERlEvGNl0/n0O26KZQJfCUJLjM7zQ=; b=BRjGmLltzGMf2jWUN5xsCpSzdi6EpXYfatCEb929/2Xn5UPcu0gYjMe9ANxf9yOOfZ f/E9eBEBz6cpEpqtluCWLN1YOkR2Q81XGe0yV8vbNb4zrDxrbHo0VAE931AYb4pJubkw fwzNgmeJSvZuT2sCf1r8cdNPO2CyvMDKmsRIIefJaLp7/RNnWWYDzMLp571RlgmTo1vt h9irjn1Qk4Ss91gwxMT83gHdng7I732kI+xn6AQeWmlOk8Ay2EqPorNp3tFZBTxQba4k wh3iEtYASw8j3aFswTp2iCod/m42p0x8RoWEaaOEiXfvp/PFmiM1skpftTnf24x2X/rr WiqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=jJLUg7udy/yoAaERlEvGNl0/n0O26KZQJfCUJLjM7zQ=; b=baJqVzzpgTS/Y6i1jGivpm+2yIWxCXUe5xi4XEV+c/EDegxt5lhIj/uhaetXgr6xRZ fU7LZvw1qdrDy6/FnDVeOTpTrPe6eTFho+5pH+Gww8SyLLpnq85dE8Oq8koEnrb915gt 8hk/lGQjpPsJRqsJWOeKCZ+AKnjMX0xgCvtEsEMFcXbODhuQq8RZREWxpIPU3USAPK8J OrlUAlHfxgG8Q0ZAlp4NJ3ZsvPHH81JCMBJp4VOX7B9QK99Kndrhpw0fZFK3DNAmdpGB NJLiAKx923fAzJ8dQZnF59I14nr+m/l9Y1AS7rdkJIoPo0nAyEnVmcLDQXEE9dRw99a/ +t8A== X-Gm-Message-State: AOAM5312uu0tHCilbvcb2hgUjomerI3o47uhX4ZkogtpZ6Cg33115RZz xQTL3G7qQ931vAjVAS6twq2JYw== X-Google-Smtp-Source: ABdhPJx/Higt52PWNdsUcJjfQfMcKu/nHvTvHqVvMxioihu5iaRquA7/5/T5FqAWjEueNtQTRED/0w== X-Received: by 2002:aca:1917:: with SMTP id l23mr8728631oii.64.1609036728582; Sat, 26 Dec 2020 18:38:48 -0800 (PST) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id 8sm9109394otq.18.2020.12.26.18.38.45 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Sat, 26 Dec 2020 18:38:47 -0800 (PST) Date: Sat, 26 Dec 2020 18:38:32 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: "Kirill A. Shutemov" cc: Linus Torvalds , 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 Subject: Re: [PATCH 1/2] mm: Allow architectures to request 'old' entries when prefaulting In-Reply-To: Message-ID: References: <20201219124103.w6isern3ywc7xbur@box> <20201222100047.p5zdb4ghagncq2oe@box> <20201225113157.e7hmluffh56fszfc@box> <20201226204335.dikqkrkezqet6oqf@box> <20201226224016.dxjmordcfj75xgte@box> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 26 Dec 2020, Hugh Dickins wrote: > On Sun, 27 Dec 2020, Kirill A. Shutemov wrote: > > > > Here's the fixup I have so far. It doesn't blow up immediately, but please > > take a closer look. Who knows what stupid mistake I did this time. :/ > > It's been running fine on x86_64 for a couple of hours (but of course > my testing is deficient, in not detecting the case Linus spotted). > > But I just thought I'd try it on i386 (hadn't tried previous versions) > and this has a new disappointment: crashes when booting, in the "check > if the page fault is solved" in do_fault_around(). I imagine a highmem > issue with kmap of the pte address, but I'm reporting now before looking > into it further (but verified that current linux.git i386 boots up fine). This patch (like its antecedents) moves the pte_unmap_unlock() from after do_fault_around()'s "check if the page fault is solved" into filemap_map_pages() itself (which apparently does not NULLify vmf->pte after unmapping it, which is poor, but good for revealing this issue). That looks cleaner, but of course there was a very good reason for its original positioning. Maybe you want to change the ->map_pages prototype, to pass down the requested address too, so that it can report whether the requested address was resolved or not. Or it could be left to __do_fault(), or even to a repeated fault; but those would be less efficient. > > Maybe easily fixed: but does suggest this needs exposure in linux-next. > > Hugh 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=-14.8 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1, USER_IN_DEF_DKIM_WL 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 9404FC433E0 for ; Sun, 27 Dec 2020 02:38:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 25D7C22252 for ; Sun, 27 Dec 2020 02:38:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25D7C22252 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7364B8D0099; Sat, 26 Dec 2020 21:38:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E63B8D0080; Sat, 26 Dec 2020 21:38:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D49B8D0099; Sat, 26 Dec 2020 21:38:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0040.hostedemail.com [216.40.44.40]) by kanga.kvack.org (Postfix) with ESMTP id 4410F8D0080 for ; Sat, 26 Dec 2020 21:38:50 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 00051180AD801 for ; Sun, 27 Dec 2020 02:38:49 +0000 (UTC) X-FDA: 77637504420.08.shame80_130c2e827487 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id D75E21819E76B for ; Sun, 27 Dec 2020 02:38:49 +0000 (UTC) X-HE-Tag: shame80_130c2e827487 X-Filterd-Recvd-Size: 5665 Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Sun, 27 Dec 2020 02:38:49 +0000 (UTC) Received: by mail-oi1-f179.google.com with SMTP id p5so8195019oif.7 for ; Sat, 26 Dec 2020 18:38:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=jJLUg7udy/yoAaERlEvGNl0/n0O26KZQJfCUJLjM7zQ=; b=BRjGmLltzGMf2jWUN5xsCpSzdi6EpXYfatCEb929/2Xn5UPcu0gYjMe9ANxf9yOOfZ f/E9eBEBz6cpEpqtluCWLN1YOkR2Q81XGe0yV8vbNb4zrDxrbHo0VAE931AYb4pJubkw fwzNgmeJSvZuT2sCf1r8cdNPO2CyvMDKmsRIIefJaLp7/RNnWWYDzMLp571RlgmTo1vt h9irjn1Qk4Ss91gwxMT83gHdng7I732kI+xn6AQeWmlOk8Ay2EqPorNp3tFZBTxQba4k wh3iEtYASw8j3aFswTp2iCod/m42p0x8RoWEaaOEiXfvp/PFmiM1skpftTnf24x2X/rr WiqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=jJLUg7udy/yoAaERlEvGNl0/n0O26KZQJfCUJLjM7zQ=; b=sPHgAYhvlqaf9djROMjQwqE9nDLgxXcM36xA7GpyLmBf6r+01Fq3XPMmVow93PJm1Q UwNaDcHzoEGAPERWAEf0jDEyDtNuvGzPkSiiR6n7JLdYj0BBClvrL0xXxH7PgG6fkyYi dDP2BifznIJdgLgOY5+91xlUxcKefmxaUQs2YfoXn3CixFJ7wtvS+GF9IMa5RbMNDmLR CJajSycJlH7NztIzGQNwMqt1lDoH31tR5h/CCZujfozcQ20tkREpRVKtYX42jtmRLdF4 EUFvWtSq1A6Xdzdyn7R5EIn38sYf9AyfOL8XKXm3itgZggvMY4s3SLJj2R0YlSHQ6QbF Vrag== X-Gm-Message-State: AOAM531HInSwz4TFFH73UURnbOOeiXsxftTJADYeg/Qckaq7b5Xp4BTT ptR6xHRr23VKI+9kgiGUcZVeAw== X-Google-Smtp-Source: ABdhPJx/Higt52PWNdsUcJjfQfMcKu/nHvTvHqVvMxioihu5iaRquA7/5/T5FqAWjEueNtQTRED/0w== X-Received: by 2002:aca:1917:: with SMTP id l23mr8728631oii.64.1609036728582; Sat, 26 Dec 2020 18:38:48 -0800 (PST) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id 8sm9109394otq.18.2020.12.26.18.38.45 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Sat, 26 Dec 2020 18:38:47 -0800 (PST) Date: Sat, 26 Dec 2020 18:38:32 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: "Kirill A. Shutemov" cc: Linus Torvalds , 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 Subject: Re: [PATCH 1/2] mm: Allow architectures to request 'old' entries when prefaulting In-Reply-To: Message-ID: References: <20201219124103.w6isern3ywc7xbur@box> <20201222100047.p5zdb4ghagncq2oe@box> <20201225113157.e7hmluffh56fszfc@box> <20201226204335.dikqkrkezqet6oqf@box> <20201226224016.dxjmordcfj75xgte@box> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Sat, 26 Dec 2020, Hugh Dickins wrote: > On Sun, 27 Dec 2020, Kirill A. Shutemov wrote: > > > > Here's the fixup I have so far. It doesn't blow up immediately, but please > > take a closer look. Who knows what stupid mistake I did this time. :/ > > It's been running fine on x86_64 for a couple of hours (but of course > my testing is deficient, in not detecting the case Linus spotted). > > But I just thought I'd try it on i386 (hadn't tried previous versions) > and this has a new disappointment: crashes when booting, in the "check > if the page fault is solved" in do_fault_around(). I imagine a highmem > issue with kmap of the pte address, but I'm reporting now before looking > into it further (but verified that current linux.git i386 boots up fine). This patch (like its antecedents) moves the pte_unmap_unlock() from after do_fault_around()'s "check if the page fault is solved" into filemap_map_pages() itself (which apparently does not NULLify vmf->pte after unmapping it, which is poor, but good for revealing this issue). That looks cleaner, but of course there was a very good reason for its original positioning. Maybe you want to change the ->map_pages prototype, to pass down the requested address too, so that it can report whether the requested address was resolved or not. Or it could be left to __do_fault(), or even to a repeated fault; but those would be less efficient. > > Maybe easily fixed: but does suggest this needs exposure in linux-next. > > Hugh 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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 DCF62C433E0 for ; Sun, 27 Dec 2020 02:41:36 +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 8CAA62222B for ; Sun, 27 Dec 2020 02:41:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8CAA62222B Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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:MIME-Version:References:Message-ID:In-Reply-To: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LU0YbiM0I0VCCMeAdxunpb6IimJFyWQyVxHF+ActIAM=; b=EPdpQiwPSKXlf82yDq+fWrvWx 4ove5u9AgRpvGmqI8rQGVYGI0edMzbeQ8LE4TnfGDeO2zrwqMxUm08LU38BLoB+s4oJ1JFF6GY4uH JBZbtWcpyMenbfLQzX/B3UhyzIR3y+23GcVaKOxnqBMssAUzYD0clk89bjrNH20ocOmXodePR6Uci SYtxjtqRCrYsJq3z4vZJOqrYQ6M6qEasq1p+iSgB4+G4taoYjiN3MYkdbsFh3E9QTR7s1K/yXp264 UCgEkb5+zYY2ruZPWnA1KBUwOvaqNjqR3zzC/i5JfhshFdE0rES2Srm3aRBm8+6HfNH/mJuOsfZpq A4AhGrJFQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktLxO-0005m3-Lj; Sun, 27 Dec 2020 02:38:54 +0000 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktLxL-0005l3-Uj for linux-arm-kernel@lists.infradead.org; Sun, 27 Dec 2020 02:38:52 +0000 Received: by mail-oi1-x231.google.com with SMTP id q205so8151411oig.13 for ; Sat, 26 Dec 2020 18:38:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=jJLUg7udy/yoAaERlEvGNl0/n0O26KZQJfCUJLjM7zQ=; b=BRjGmLltzGMf2jWUN5xsCpSzdi6EpXYfatCEb929/2Xn5UPcu0gYjMe9ANxf9yOOfZ f/E9eBEBz6cpEpqtluCWLN1YOkR2Q81XGe0yV8vbNb4zrDxrbHo0VAE931AYb4pJubkw fwzNgmeJSvZuT2sCf1r8cdNPO2CyvMDKmsRIIefJaLp7/RNnWWYDzMLp571RlgmTo1vt h9irjn1Qk4Ss91gwxMT83gHdng7I732kI+xn6AQeWmlOk8Ay2EqPorNp3tFZBTxQba4k wh3iEtYASw8j3aFswTp2iCod/m42p0x8RoWEaaOEiXfvp/PFmiM1skpftTnf24x2X/rr WiqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=jJLUg7udy/yoAaERlEvGNl0/n0O26KZQJfCUJLjM7zQ=; b=ltJ492zk9xMiPbdSZ1LAowVD3pLAsk62NzH9zjHjGcd2BKnAIpASaZ6HeLoTYbVg2x wcgkrneD/fUgtp77ILlq3czvdMqDGhCYAKFdUbePwjoc065a1XWpTb49EH5IGEQRiXat 5xvgLHkh8T8mHIPFHbNYDnhGXSF69vveK5B/QpDnuxwq09G7vDQK+Kspx+XKzDJU7Gmk j0YMHdipOUdCnXPXtzILVFHX1JqQCfAQYlkc1eF2cGR3FTaAfORDP+uX1NMghgOwPYnD S27UonpnF3IBuMCR1R79PW0SRQgKgHAJ/H0H9GS0XDheFFfNrLJyc8l0vpJeQCWZcKB+ Kc9Q== X-Gm-Message-State: AOAM533o1ICoToE2KjHtKPgmJj0lhCrgN4MVv+IPBERTtRrMWj6p9vkP PQJNOI924GiRp9BVW1OQ6UnT/Q== X-Google-Smtp-Source: ABdhPJx/Higt52PWNdsUcJjfQfMcKu/nHvTvHqVvMxioihu5iaRquA7/5/T5FqAWjEueNtQTRED/0w== X-Received: by 2002:aca:1917:: with SMTP id l23mr8728631oii.64.1609036728582; Sat, 26 Dec 2020 18:38:48 -0800 (PST) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id 8sm9109394otq.18.2020.12.26.18.38.45 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Sat, 26 Dec 2020 18:38:47 -0800 (PST) Date: Sat, 26 Dec 2020 18:38:32 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: "Kirill A. Shutemov" Subject: Re: [PATCH 1/2] mm: Allow architectures to request 'old' entries when prefaulting In-Reply-To: Message-ID: References: <20201219124103.w6isern3ywc7xbur@box> <20201222100047.p5zdb4ghagncq2oe@box> <20201225113157.e7hmluffh56fszfc@box> <20201226204335.dikqkrkezqet6oqf@box> <20201226224016.dxjmordcfj75xgte@box> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201226_213852_019018_5F251457 X-CRM114-Status: GOOD ( 22.22 ) 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 , Linus Torvalds , Hugh Dickins , Linux Kernel Mailing List , Matthew Wilcox , Linux-MM , Vinayak Menon , Linux ARM , Catalin Marinas , 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 Sat, 26 Dec 2020, Hugh Dickins wrote: > On Sun, 27 Dec 2020, Kirill A. Shutemov wrote: > > > > Here's the fixup I have so far. It doesn't blow up immediately, but please > > take a closer look. Who knows what stupid mistake I did this time. :/ > > It's been running fine on x86_64 for a couple of hours (but of course > my testing is deficient, in not detecting the case Linus spotted). > > But I just thought I'd try it on i386 (hadn't tried previous versions) > and this has a new disappointment: crashes when booting, in the "check > if the page fault is solved" in do_fault_around(). I imagine a highmem > issue with kmap of the pte address, but I'm reporting now before looking > into it further (but verified that current linux.git i386 boots up fine). This patch (like its antecedents) moves the pte_unmap_unlock() from after do_fault_around()'s "check if the page fault is solved" into filemap_map_pages() itself (which apparently does not NULLify vmf->pte after unmapping it, which is poor, but good for revealing this issue). That looks cleaner, but of course there was a very good reason for its original positioning. Maybe you want to change the ->map_pages prototype, to pass down the requested address too, so that it can report whether the requested address was resolved or not. Or it could be left to __do_fault(), or even to a repeated fault; but those would be less efficient. > > Maybe easily fixed: but does suggest this needs exposure in linux-next. > > Hugh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel