Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp967859img; Tue, 26 Feb 2019 11:41:01 -0800 (PST) X-Google-Smtp-Source: AHgI3IZZBHg8XYop+zn/edyXZPQeWFq63wK4XwXuVgFCR/LnVQAZwmFSOhAkhL+k5CohPMQb7BKo X-Received: by 2002:a17:902:bd43:: with SMTP id b3mr28116845plx.186.1551210061600; Tue, 26 Feb 2019 11:41:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551210061; cv=none; d=google.com; s=arc-20160816; b=ec9d4gEykw7PYfifqHYQE42+YEHrS4Qs6bdVz2eydtAOz7SNq8QrGy27nHSWiRbYPY W3xjc3o6kHBekAjxLGlkoAimcX1LkD/+fR9o0lEl4vPw78N/BD8v0VPJVslDAGX6/gqV jCBTJPuft6xA3bVQhtbSRO0NEmPTWVG3mWnW7k0evK2hsO9eW9WBnHi9qHur5yXw9/2k mrqlt8VYZ7Nkva0f47KycoUAfqE4vrkimGdyA9loI/Qy7WPtVYdUehywoxb6wRMMsNDC 5OjpRH0wgcUEZgtp6TgdGUjQC1BGcvGJFVnGTYZ+EnHXuStXAFijEG7Z6PUzEeuNSaWu GMdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=AvolvAcxXioNyvTz5UGFY/cvO3UIu3EClNqVmLReyxQ=; b=B5YZsypd+Lpc+GdL4wSiugjeMhu9nOfdWuBr2ks18UjFG6qQ2kkttr7wEQaiU7R1gD 8QFE3XA5e/0PfMC79mw3J/kjwCBzIDN+VUUofbu2u/GrQWMyLgD1Pkvcbu9/U1cde76a WzqY3cAP1I5oJNahKFVsb7565RzlCnou0RNovkVxSwPs4kVTItf05gDkeVPlfP9M8+Si 0xUeaXF3L4M4ViwfuvqZ9U/YbzT+A/HB6hJmU22pml9Gl4Kdxhv5zkRFjhMPmdTdjEV2 ITawWijMTzcx6moo8rcMu2guJ640N9Gg/Q5niMPZiIdoYy23iWqPj9UcKZOkwnhSelTH W6MA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f74si14108269pfh.38.2019.02.26.11.40.46; Tue, 26 Feb 2019 11:41:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728673AbfBZTk0 (ORCPT + 99 others); Tue, 26 Feb 2019 14:40:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:35830 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727054AbfBZTk0 (ORCPT ); Tue, 26 Feb 2019 14:40:26 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F32DDAEF3; Tue, 26 Feb 2019 19:40:24 +0000 (UTC) Date: Tue, 26 Feb 2019 20:40:24 +0100 From: Michal Hocko To: Qian Cai Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/hotplug: fix an imbalance with DEBUG_PAGEALLOC Message-ID: <20190226194024.GI10588@dhcp22.suse.cz> References: <20190225191710.48131-1-cai@lca.pw> <20190226123521.GZ10588@dhcp22.suse.cz> <4d4d3140-6d83-6d22-efdb-370351023aea@lca.pw> <20190226142352.GC10588@dhcp22.suse.cz> <1551203585.6911.47.camel@lca.pw> <20190226181648.GG10588@dhcp22.suse.cz> <20190226182007.GH10588@dhcp22.suse.cz> <1551208782.6911.51.camel@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1551208782.6911.51.camel@lca.pw> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 26-02-19 14:19:42, Qian Cai wrote: > On Tue, 2019-02-26 at 19:20 +0100, Michal Hocko wrote: > > Btw. what happens if the offlined pfn range is removed completely? Is > > the range still mapped? What kind of consequences does this have? > > Well, the pages are still marked as reserved as well, so it is up to the > physically memory hotplug handler to free kernel direct mapping pagetable, > virtual memory mapping pages, and virtual memory mapping pagetable as by design, > although I have no way to test it. > > > Also when does this tweak happens on a completely new hotplugged memory > > range? > > I suppose it will call online_pages() which in-turn call > kernel_unmap_linear_page() which may or may not have the same issue, but I have > no way to test that path. It seems you have missed the point of my question. It simply doesn't make much sense to have offline memory mapped. That memory is not accessible in general. So mapping it at the offline time is dubious at best. Also you do not get through the offlining phase on a newly hotplugged (and not yet onlined) memory. So the patch doesn't look correct to me and it all smells like the bug you are seeing is a wrong reporting. I might be wrong here of course, because I didn't really get to study the code very deeply. But then the changelog needs to elaborate much more than, it bugs on so we make it to not bug. -- Michal Hocko SUSE Labs