Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp539253img; Tue, 26 Feb 2019 04:35:58 -0800 (PST) X-Google-Smtp-Source: AHgI3IbwCVCLpFyxU0oxAzLQghLd2Py2h5n4CcTzIRqTsZOcyL7YYpGoUe4OXNm8v0BWcxyejnlT X-Received: by 2002:a63:6b45:: with SMTP id g66mr15432525pgc.301.1551184558311; Tue, 26 Feb 2019 04:35:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551184558; cv=none; d=google.com; s=arc-20160816; b=e3178D7oKNR9j5b4gbezF6/uXB4dTZmuFULN2ciNRG1fDg6Vv4gmzsFS1ZGepIicX+ ifeR3Elqq/loTVSnd1I6ftw0iFlVsYIWCj862y/Zo7dvtQvgfqmmuFVJskrbqb9rFceS kRGI/POGC2/TuJOiLxbwpeAkS7xeajl9fEOXkh/GN8C+bReO847h1fkB2KYWfcMEkdOk wyf/L/W0oKOovE7mvMwUs7YFbXBzdcTkNsIsyhDEmI2gHgCc+TsTfRFc7V5gqplCETdp Iq/QR+sPtUzijtkrAjjHRodbFoXTtX5FchPkJMAOih8K8DiycrQ/o8ql0ltyw7rCUacP 0Beg== 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=PqySPpNOMPzhLAHTb7fy2TggBB1kt/Lo9nRtUY3jyZk=; b=z/FBoKw64wPI8GTnGU6exY8rUuTCOjR/djTd+owcduB1MhV9o4gsx/Tbp49I4v9fwS 6aCnsd6vttbzoZsd+/KjkUYvF9xq0nNXF8PlIQb1Vpdk1sJoJPJ/Aq3L0TxUydduLh3w JcZ5gRsDwij4yG0aU3Wm4z+5stsaZXDMDzx7kr2zEG6dj/CG9s+V8iOuoZBvFlMAuBOS g240YoNgWSqV0wGfNn4gZ7XKwND39O+nTcHAQA63bSJEJPstK0eiEySgkMlFP6345Pv1 KSJjK5pNMGPr/Sid1M6zJSvqu4eG6izsvii+PuCkrd6dCe00ziDY1bxXIkW2TmkEK+U5 pe9w== 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 11si12470195plc.383.2019.02.26.04.35.43; Tue, 26 Feb 2019 04:35:58 -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 S1726627AbfBZMfX (ORCPT + 99 others); Tue, 26 Feb 2019 07:35:23 -0500 Received: from mx2.suse.de ([195.135.220.15]:40202 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726084AbfBZMfX (ORCPT ); Tue, 26 Feb 2019 07:35:23 -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 85013B603; Tue, 26 Feb 2019 12:35:21 +0000 (UTC) Date: Tue, 26 Feb 2019 13:35:21 +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: <20190226123521.GZ10588@dhcp22.suse.cz> References: <20190225191710.48131-1-cai@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190225191710.48131-1-cai@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 Mon 25-02-19 14:17:10, Qian Cai wrote: > When onlining memory pages, it calls kernel_unmap_linear_page(), > However, it does not call kernel_map_linear_page() while offlining > memory pages. As the result, it triggers a panic below while onlining on > ppc64le as it checks if the pages are mapped before unmapping, > Therefore, let it call kernel_map_linear_page() when setting all pages > as reserved. This really begs for much more explanation. All the pages should be unmapped as they get freed AFAIR. So why do we need a special handing here when this path only offlines free pages? -- Michal Hocko SUSE Labs