Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp8149346pxu; Sat, 26 Dec 2020 18:41:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsXPtFe7O37ISXp5TNx/o3UOU2iyQN7TFnfTyk4oRdE78a6sf/PTpwND0gi09JHfS+nsxE X-Received: by 2002:a17:906:f1c8:: with SMTP id gx8mr37435591ejb.524.1609036900256; Sat, 26 Dec 2020 18:41:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609036900; cv=none; d=google.com; s=arc-20160816; b=I4D02lRqQ2juC4/yyRZTPKdiieeE2zjf/ezmghlMkvwnoSejFfJokIL4ShdFnOcgo6 6dZTeQ+hBfoL77QAHDH0wNf+b11g3TiF+QswPb8ENZJimQgitc1fER2yh5lOtl9v96fm HFgsFxkTIrtItMELbUs2IW/cgBAH+OutcxyAC/oWwz5gCYZabs6HU5oP6Vx+o1H9GUIm zYNY8O9LBNCYfyhgF5U5wL/uVPOUMjLJlmcJlhSgrT6Ze9dVU5vDGJ5uyE2TzPMIS03g LTOqWRYW1Lg4wyXXKOub6zxNUlsNc39IJyzRPP1asgzrEa0wcyz+W9+NIeoDaoVedHup iIdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=jJLUg7udy/yoAaERlEvGNl0/n0O26KZQJfCUJLjM7zQ=; b=sUccVc+5UMRi3JR57LBhOf5pnmkFXHlRq1PQw0i+v5Pk3TYdoHdHZh5uJ1479OGtAr 9YnTibKfAWB0RlGL7z2+yJ7wLa4vGYjZrYb3J5R2DErlLpgi6Gx4QXm0BepfUzYuJGlf RnfEYIOGOpp8D1vmOJH9cDKameEGh8rBMNEtLagZzQJhIlrcDHPPrDkDFfILis9p3vy9 VXXcdNQ1Fh7zL5OXrxV3YoD9RqVYlKLvHPb0TyCnxQFjNzdc2zTUwW96lvzG42jTDDsG W9so5NNenhdPus9LwO4lDQR7MBHdylH07Q3KFdUu+YK2Pp9tRmxnbbmCYeV0Wou1JuB8 QA9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BRjGmLlt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k7si9842422edi.32.2020.12.26.18.41.02; Sat, 26 Dec 2020 18:41:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BRjGmLlt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726148AbgL0Cja (ORCPT + 99 others); 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-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