Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp662138img; Tue, 26 Feb 2019 06:36:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IbEFJl/FYnmp2jJrTPJGPRCmb6/pDfr2HojsOiFoTf8X3OFTZH84KycnHepGNn1mAoX1Ss6 X-Received: by 2002:a17:902:784c:: with SMTP id e12mr26082612pln.117.1551191801011; Tue, 26 Feb 2019 06:36:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551191801; cv=none; d=google.com; s=arc-20160816; b=mvsXYIZs6P2GhhQaSJIbXIdZdViHwxtZFROyfirtu0uU0rmF6tkhWm5bOYQgqD02dH uLr3BmEwGSe0RLfyFCR8/KGVdrIj3YB7cPPpWGyGqSXlOF7XS5IDGSs36YT4kxTKcLq7 9+z7w5O6lrKW4mtIICHR7dU+cB0ABiUS0eWb1gl1lmteLUdv2lnNKG4ki9Q8O+WtyvXk 5fdDMTHmjuW0eCfgZBsxq2DaOFGBfake3hAUITvUzFmAcMD4ZY3FccFTTqNWR9ArtdHk HDc8hLDJ3ujAnlKCgVC6i9FGY8x9XggSzaTq/QSYPvNZnepQDY7EmT2/mzrDKx9XJIhK HqcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id; bh=GtdpFM9VJfibiIRcE0dYG5hwsfFVvTTjoa0tjxpgkY4=; b=SN1EoMRB8nF/0f1xAnae3Fem7DLpBdcgQogudVi6o/lYEwJWWW83oW5GEaCTkpqeOT KNAS/SNc1ytKVmbj/pCaUffLtKpvZDB4bGqFoaLS3/iKLCKaEmHmFgjhVeOMYWdAt9v8 UflR8W6TQtkAqLRiXhJQ736/LzlrqzaoGbnC14xcLzy6HouE71iayIGputRzrjr1Hl/5 h7SU/MqVIUB5WT0RYK51eE3CtLuVxtgh4AMtZpcwP/Oece7lP2VeCVgdzP7v5jIU7DVa skMh+8A9QdNz6RzeD6Zae63FkjXkr8mULWIKR4+2XeGRuH6rJRvR15BTyB3M6U0SFSaj wV2A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i185si11761546pge.125.2019.02.26.06.36.23; Tue, 26 Feb 2019 06:36:40 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727203AbfBZOel (ORCPT + 99 others); Tue, 26 Feb 2019 09:34:41 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:40912 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725977AbfBZOel (ORCPT ); Tue, 26 Feb 2019 09:34:41 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 84FAC77CDBC0C7823188; Tue, 26 Feb 2019 22:34:34 +0800 (CST) Received: from [127.0.0.1] (10.177.29.68) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Tue, 26 Feb 2019 22:34:33 +0800 Message-ID: <5C754E78.4050804@huawei.com> Date: Tue, 26 Feb 2019 22:34:32 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: "Kirill A. Shutemov" CC: , , , , , , Subject: Re: [PATCH] mm: hwpoison: fix thp split handing in soft_offline_in_use_page() References: <1551179880-65331-1-git-send-email-zhongjiang@huawei.com> <20190226135156.mifspmbdyr6m3hff@kshutemo-mobl1> In-Reply-To: <20190226135156.mifspmbdyr6m3hff@kshutemo-mobl1> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/2/26 21:51, Kirill A. Shutemov wrote: > On Tue, Feb 26, 2019 at 07:18:00PM +0800, zhong jiang wrote: >> From: zhongjiang >> >> When soft_offline_in_use_page() runs on a thp tail page after pmd is plit, > s/plit/split/ > >> we trigger the following VM_BUG_ON_PAGE(): >> >> Memory failure: 0x3755ff: non anonymous thp >> __get_any_page: 0x3755ff: unknown zero refcount page type 2fffff80000000 >> Soft offlining pfn 0x34d805 at process virtual address 0x20fff000 >> page:ffffea000d360140 count:0 mapcount:0 mapping:0000000000000000 index:0x1 >> flags: 0x2fffff80000000() >> raw: 002fffff80000000 ffffea000d360108 ffffea000d360188 0000000000000000 >> raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 >> page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0) >> ------------[ cut here ]------------ >> kernel BUG at ./include/linux/mm.h:519! >> >> soft_offline_in_use_page() passed refcount and page lock from tail page to >> head page, which is not needed because we can pass any subpage to >> split_huge_page(). > I don't see a description of what is going wrong and why change will fixed > it. From the description, it appears as it's cosmetic-only change. > > Please elaborate. When soft_offline_in_use_page runs on a thp tail page after pmd is split, and we pass the head page to split_huge_page, Unfortunately, the tail page can be free or count turn into zero. Thanks, zhong jiang