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