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