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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 A7CD6C43461 for ; Thu, 17 Sep 2020 13:09:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 363B9221E7 for ; Thu, 17 Sep 2020 13:09:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 363B9221E7 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 7E1506B0003; Thu, 17 Sep 2020 09:09:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 791DC6B0037; Thu, 17 Sep 2020 09:09:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6CDFD6B0055; Thu, 17 Sep 2020 09:09:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0044.hostedemail.com [216.40.44.44]) by kanga.kvack.org (Postfix) with ESMTP id 59FE96B0003 for ; Thu, 17 Sep 2020 09:09:57 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0B4383630 for ; Thu, 17 Sep 2020 13:09:57 +0000 (UTC) X-FDA: 77272586034.03.error24_490844927122 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id CDDE428A4E9 for ; Thu, 17 Sep 2020 13:09:56 +0000 (UTC) X-HE-Tag: error24_490844927122 X-Filterd-Recvd-Size: 2614 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Thu, 17 Sep 2020 13:09:56 +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 AF53EACB0; Thu, 17 Sep 2020 13:10:28 +0000 (UTC) Date: Thu, 17 Sep 2020 15:09:52 +0200 From: Oscar Salvador To: HORIGUCHI =?utf-8?B?TkFPWUEo5aCA5Y+j44CA55u05LmfKQ==?= Cc: "akpm@linux-foundation.org" , "aris@ruivo.org" , "mhocko@kernel.org" , "tony.luck@intel.com" , "cai@lca.pw" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH v4 0/7] HWpoison: further fixes and cleanups Message-ID: <20200917130948.GA1812@linux> References: <20200917081049.27428-1-osalvador@suse.de> <20200917113920.GA19898@hori.linux.bs1.fc.nec.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200917113920.GA19898@hori.linux.bs1.fc.nec.co.jp> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: CDDE428A4E9 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 Thu, Sep 17, 2020 at 11:39:21AM +0000, HORIGUCHI NAOYA(=E5=A0=80=E5=8F= =A3 =E7=9B=B4=E4=B9=9F) wrote: > Thanks for the update. > This patchset triggers the following BUG_ON() with Aristeu's workload: I just took a look, but I found more oddities. The patchset you sent seems to be a bit buggy and it is missing some thin= gs my patchset contains, e.g: static __always_inline bool free_pages_prepare(struct page *page, unsigned int order, bool check_free) { ... if (unlikely(PageHWPoison(page)) && !order) { ... return false; } Moreover, in page_handle_poison, you managed it wrong because: static bool page_handle_poison(struct page *page, bool hugepage_or_freepa= ge, bool release) { if (release) { put_page(page); drain_all_pages(page_zone(page)); } ... SetPageHWPoison(page); page_ref_inc(page); 1) You are freeing the page first, which means it goes to buddy 2) Then you set it as poisoned and you update its refcount. Now we have a page sitting in Buddy with a refcount =3D 1 and poisoned, a= nd that is quite wrong. Honestly, I do not know how your patchset diverged so much from mine, but= is not right. I will go over my patchset and yours and compare/fix things. --=20 Oscar Salvador SUSE L3