From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BF175B1EB for ; Wed, 28 Jan 2026 02:45:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769568343; cv=none; b=rWtvbvPSoEkEuOK1qx2afUHhpG4QFOtbJARgsIDgEKqTuqYiMWnynneHflrH0z4JdpN3wPfrAAGQ3N3LiN9+rX7yitW5QloIST3M41QObcItyJ5aazNZjnVF5EO5uWNm3+FzNYhH4i5mRkE3dVHjkAo0QX8OAtkZjR7GZm4AhbM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769568343; c=relaxed/simple; bh=GHPKNljsg3B0PLV6vfSXSkMXA2VQGNkvCtVZMZO0iE4=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=rb/R5Qog+T9Nu9s9W3U0/VXujIBshFL8WP34JeJ9rR0vMT5WrS6tz1RV5mgFV8KRsYw3Hc5DHdHWUXTomGiDXW2OUYfbR0bDmjNt4+0gF/1ErRoRNLsGs4Jf6pq1IZ05auyGql9xZeFxRMIfFesyVRj0l4Z+n+j51nYgsgQozNM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=VgKSZkqv; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=VgKSZkqv; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="VgKSZkqv"; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="VgKSZkqv" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=Di8cZJ5cc8VbrR7T2nMJ6z1aTcg0ByBxctmpLWPm4y8=; b=VgKSZkqvSDQAOgdPwRZLAbVqlZ19Hnk19J8msr8OrxyEA/Oghz4KDorgKRnDscCUSXi+YHRqf /NdbSMTPfXEeT5Kggxb5CEIpPcDwmqw0N0dCkZBXeuTGx2x99cTEuybNWiiB1qVdl+Bs+SYv+LO Tidu2PHAZX8uX7fet1nL8bU= Received: from canpmsgout11.his.huawei.com (unknown [172.19.92.148]) by szxga01-in.huawei.com (SkyGuard) with ESMTPS id 4f167c1rzDz1BGD9 for ; Wed, 28 Jan 2026 10:45:00 +0800 (CST) dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=Di8cZJ5cc8VbrR7T2nMJ6z1aTcg0ByBxctmpLWPm4y8=; b=VgKSZkqvSDQAOgdPwRZLAbVqlZ19Hnk19J8msr8OrxyEA/Oghz4KDorgKRnDscCUSXi+YHRqf /NdbSMTPfXEeT5Kggxb5CEIpPcDwmqw0N0dCkZBXeuTGx2x99cTEuybNWiiB1qVdl+Bs+SYv+LO Tidu2PHAZX8uX7fet1nL8bU= Received: from mail.maildlp.com (unknown [172.19.163.15]) by canpmsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4f16410f2nzKm4R; Wed, 28 Jan 2026 10:41:53 +0800 (CST) Received: from dggemv706-chm.china.huawei.com (unknown [10.3.19.33]) by mail.maildlp.com (Postfix) with ESMTPS id 956094056D; Wed, 28 Jan 2026 10:45:21 +0800 (CST) Received: from kwepemq500010.china.huawei.com (7.202.194.235) by dggemv706-chm.china.huawei.com (10.3.19.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 28 Jan 2026 10:45:21 +0800 Received: from [10.173.125.37] (10.173.125.37) by kwepemq500010.china.huawei.com (7.202.194.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 28 Jan 2026 10:45:20 +0800 Subject: Re: [PATCH] mm/page_alloc: Fix freeing of failed-split poisoned compound pages To: Jiaqi Yan , Boudewijn van der Heide , CC: , , , , , , , , , References: <20260116141157.29578-1-boudewijn@delta-utec.com> From: Miaohe Lin Message-ID: <3ec3f4de-2c38-5ec4-4b4a-d7a801efe558@huawei.com> Date: Wed, 28 Jan 2026 10:45:20 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: kwepems500001.china.huawei.com (7.221.188.70) To kwepemq500010.china.huawei.com (7.202.194.235) On 2026/1/24 12:42, Jiaqi Yan wrote: > On Fri, Jan 16, 2026 at 6:12 AM Boudewijn van der Heide > wrote: >> >> Thanks Jiaqi for the feedback, that is very helpful. >> (and thanks Miaohe for connecting the issues.) >> >> After going through the memory_failure(), >> I can see it indeed puts the PG_HWPoison flag on the specific subpage pointer, >> and therefore my fix won't work as-is. >> >>>> >>>> Yes, this is also a problematic scenario for Hugetlb HugePage. And Jiaqi works on >>>> it now [1]. I think Jiaqi's patches might apply to THP scenario too. Add @Jiaqi to >>>> verify this. >>> >>> Yep, I think my work will also help solve the concern when >>> try_to_split_thp_page() fails. >> >> Your fix makes a lot of sense for hugetlb, >> as it linearly scans through all the pages. >> From my understanding, >> your fix also provides the perfect architecture for also checking THP, >> though it doesn't yet cover the in-use THP case outlined. > > Oh, sorry I went ahead myself and assumed the split-failed folio would > eventually be released to the buddy allocator at some point when > userspace processes who owns/maps this THP are killed or exited. > > Zi and Miaohe, am I right about this? or do we need explicitly handle > in-use and split-failed THP? IMHO, it's enough to handle poisoned sub-pages when in-use or split-failed THP eventually be released to the buddy. Thanks. .