Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1286713ybg; Fri, 18 Oct 2019 15:15:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzY5pP4HN0wWPd6oK06ej983J0KJQR7na+ttet8Nu77xccnIdXjisbzjhmQxTn+c7tv6NAn X-Received: by 2002:a05:6402:1548:: with SMTP id p8mr12281244edx.43.1571436907871; Fri, 18 Oct 2019 15:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571436907; cv=none; d=google.com; s=arc-20160816; b=bigHuXVIwTmGLrEsaMUCVP9NGYQOaI/awG4xD4leHRVvikH/d/zqYvvaKR5q+3XFRP Xi4c7NlhpNUY812Bknr+wAelIAAI1b4Ia6lMYU1nDTRQDb1yg6ZDcEHtRZupu/DHQyxC JyvlziVc7ly2DG6fVzfElZWZdi4M1LlaH6E88b6jMX9QVCjpvxapGF/F3j5A6NTMgrIH rQohmZVdwNun7RO1uOZp9nYV6gOrz+BV5eSLUWir7y5KIsMn5oUObR7BcdynTMQt1M0k vrihQUBdzXJzgj7zWNHzt5Q0VD7vzxV3tg9scAYpLiHiprVjTTOuwyiu9w+S4MIKS3/U YkqA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=j7Rro3E7c//Z+zFL5LdZBkBNE0WR3QruRex814N9joo=; b=yZfNbFuMsaNgAdRc2zngWgu+dFgeUFsTUC41mvvQul+dlAPYgHKRYaDgQpYM+b9vDg U0SLevFmRofPJBq7+HY8OhiZ+31ZGoZw1q2vrNAiRlQt3yy7TldUVWEXHa6uaeUK0TRs BrBgILNxeE/ESlfYHvLRuVCHSBcShPwgT6yIrWzkwcy9PYU0u0Oed7bz9OhIH8yNnSKg 9sNunrWPgTpU2/ewZ4L5c11eFmPpNXGsJ8Eesufh+sLQgi/esOsGOjjlwulNf0opDlZ4 Qq6Fn/hHZFDut1ehpR7IXAaiNdUQ5Y3iKkiaFUNxFJy2nhNjlHH8E680jS3mscs7MjxJ nEQw== 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 l26si4605468edb.258.2019.10.18.15.14.45; Fri, 18 Oct 2019 15:15:07 -0700 (PDT) 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 S2390511AbfJQS2D (ORCPT + 99 others); Thu, 17 Oct 2019 14:28:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:42866 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727235AbfJQS2D (ORCPT ); Thu, 17 Oct 2019 14:28:03 -0400 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 E878FB47D; Thu, 17 Oct 2019 18:28:01 +0000 (UTC) Date: Thu, 17 Oct 2019 20:27:59 +0200 From: Michal Hocko To: Naoya Horiguchi Cc: Qian Cai , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , David Hildenbrand , Mike Kravetz Subject: Re: memory offline infinite loop after soft offline Message-ID: <20191017182759.GN24485@dhcp22.suse.cz> References: <1570829564.5937.36.camel@lca.pw> <20191014083914.GA317@dhcp22.suse.cz> <20191017093410.GA19973@hori.linux.bs1.fc.nec.co.jp> <20191017100106.GF24485@dhcp22.suse.cz> <1571335633.5937.69.camel@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1571335633.5937.69.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 Thu 17-10-19 14:07:13, Qian Cai wrote: > On Thu, 2019-10-17 at 12:01 +0200, Michal Hocko wrote: > > On Thu 17-10-19 09:34:10, Naoya Horiguchi wrote: > > > On Mon, Oct 14, 2019 at 10:39:14AM +0200, Michal Hocko wrote: > > > > [...] > > > > diff --git a/mm/page_isolation.c b/mm/page_isolation.c > > > > index 89c19c0feadb..5fb3fee16fde 100644 > > > > --- a/mm/page_isolation.c > > > > +++ b/mm/page_isolation.c > > > > @@ -274,7 +274,7 @@ __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn, > > > > * simple way to verify that as VM_BUG_ON(), though. > > > > */ > > > > pfn += 1 << page_order(page); > > > > - else if (skip_hwpoisoned_pages && PageHWPoison(page)) > > > > + else if (skip_hwpoisoned_pages && PageHWPoison(compound_head(page))) > > > > /* A HWPoisoned page cannot be also PageBuddy */ > > > > pfn++; > > > > else > > > > > > This fix looks good to me. The original code only addresses hwpoisoned 4kB-page, > > > we seem to have this issue since the following commit, > > > > Thanks a lot for double checking Naoya! > > > > > commit b023f46813cde6e3b8a8c24f432ff9c1fd8e9a64 > > > Author: Wen Congyang > > > Date: Tue Dec 11 16:00:45 2012 -0800 > > > > > > memory-hotplug: skip HWPoisoned page when offlining pages > > > > > > and extension of LTP coverage finally discovered this. > > > > Qian, could you give the patch some testing? > > Unfortunately, this does not solve the problem.?It looks to me that in > soft_offline_huge_page(), set_hwpoison_free_buddy_page() will only set > PG_hwpoison for buddy pages, so the even the compound_head() has no PG_hwpoison > set. > > if (PageBuddy(page_head) && page_order(page_head) >= order) { > if (!TestSetPageHWPoison(page)) > hwpoisoned = true; This is more than unexpected. How are we supposed to find out that the page is poisoned? Any idea Naoya? -- Michal Hocko SUSE Labs