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=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 495D1C43461 for ; Wed, 16 Sep 2020 16:34:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D99AE22275 for ; Wed, 16 Sep 2020 16:34:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D99AE22275 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 40E676B0068; Wed, 16 Sep 2020 12:34:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 397EB6B006E; Wed, 16 Sep 2020 12:34:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2608D6B0072; Wed, 16 Sep 2020 12:34:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0031.hostedemail.com [216.40.44.31]) by kanga.kvack.org (Postfix) with ESMTP id 0C85B6B0068 for ; Wed, 16 Sep 2020 12:34:55 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C77898249980 for ; Wed, 16 Sep 2020 16:34:54 +0000 (UTC) X-FDA: 77269473708.22.roof48_28121242711b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 8C9C218038E6B for ; Wed, 16 Sep 2020 16:34:54 +0000 (UTC) X-HE-Tag: roof48_28121242711b X-Filterd-Recvd-Size: 4564 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Wed, 16 Sep 2020 16:34:53 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1EA91B459; Wed, 16 Sep 2020 16:35:08 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Date: Wed, 16 Sep 2020 18:34:52 +0200 From: osalvador@suse.de To: Aristeu Rozanski Cc: naoya.horiguchi@nec.com, akpm@linux-foundation.org, mhocko@kernel.org, tony.luck@intel.com, cai@lca.pw, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v3 0/5] HWpoison: further fixes and cleanups In-Reply-To: <9bd7ac81968a7897474804d53bfc1286@suse.de> References: <20200914101559.17103-1-osalvador@suse.de> <20200915212222.GA18315@cathedrallabs.org> <20200916072658.GA10692@linux> <20200916135358.GB17169@cathedrallabs.org> <20200916140921.GA17949@linux> <20200916144603.GC17169@cathedrallabs.org> <9bd7ac81968a7897474804d53bfc1286@suse.de> User-Agent: Roundcube Webmail Message-ID: X-Sender: osalvador@suse.de X-Rspamd-Queue-Id: 8C9C218038E6B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2020-09-16 18:30, osalvador@suse.de wrote: > On 2020-09-16 16:46, Aristeu Rozanski wrote: >> Hi Oscar, >>=20 >> On Wed, Sep 16, 2020 at 04:09:30PM +0200, Oscar Salvador wrote: >>> On Wed, Sep 16, 2020 at 09:53:58AM -0400, Aristeu Rozanski wrote: >>> Can you try the other patch I posted in response to Naoya? >>=20 >> Same thing: >>=20 >> [ 369.195056] Soft offlining pfn 0x3fb5bf at process virtual address >> 0x7ffc84350000 >> [ 369.195073] page:000000002bb131e4 refcount:1 mapcount:0 >> mapping:0000000000000000 index:0x7ffc8435 pfn:0x3fb5bf >> [ 369.195080] anon flags: >> 0x3ffff80008000e(referenced|uptodate|dirty|swapbacked) >> [ 369.202131] raw: 003ffff80008000e 5deadbeef0000100 5deadbeef0000122 >> c000003fda1c7431 >> [ 369.202137] raw: 000000007ffc8435 0000000000000000 00000001ffffffff >> c000003fd63af000 >> [ 369.202141] page dumped because: page_handle_poison >> [ 369.202145] page->mem_cgroup:c000003fd63af000 >> [ 369.215055] page_handle_poison: hugepage_or_freepage failed=EF=BF=BD= n >> [ 369.215057] __soft_offline_page: page_handle_poison -EBUSY >> [ 369.215068] page:000000002bb131e4 refcount:3 mapcount:0 >> mapping:00000000f6ca3f32 index:0x5c pfn:0x3fb5bf >> [ 369.215110] aops:xfs_address_space_operations [xfs] ino:49f9c5f >> dentry name:"messages" >> [ 369.215117] flags: 0x3ffff800002008(dirty|private) >> [ 369.215121] raw: 003ffff800002008 5deadbeef0000100 5deadbeef0000122 >> c000003fadd3daa8 >> [ 369.215127] raw: 000000000000005c c000003fd9497c20 00000003ffffffff >> c000003fd1143000 >> [ 369.215132] page dumped because: __soft_offline_page after migrate >> [ 369.215136] page->mem_cgroup:c000003fd1143000 >=20 >=20 > Ok, this is something different. > The race you saw previously is kinda normal as there is a race window > between spotting a freepage and taking it off the buddy freelists. > The retry patch should help there. >=20 > The issue you are seeing right here is due to the call to > page_handle_poison in __soft_offline_page being wrong, as we pass > hugepage_or_freepage =3D true inconditionally, which is wrong. >=20 > Should be: Fat fingers, sorry: Ok, this is something different. The race you saw previously is kinda normal as there is a race window=20 between spotting a freepage and taking it off the buddy freelists. The retry patch should help there. The issue you are seeing right here is due to the call to=20 page_handle_poison in __soft_offline_page being wrong, as we pass=20 hugepage_or_freepage =3D true inconditionally, which is wrong. I think it was caused during rebasing. Should be: @@ -1858,8 +1903,11 @@ static int __soft_offline_page(struct page *page) if (!ret) { bool release =3D !huge; - if (!page_handle_poison(page, true, release)) + if (!page_handle_poison(page, huge, release)) { + pr_info("%s: page_handle_poison=20 -EBUSY\n", __func__); + dump_page(page, "__soft_offline_page=20 after migrate"); ret =3D -EBUSY; + } Could you try that on top please? I am away from my laptop now but I will be taking a look later today. thanks