From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout12.his.huawei.com (canpmsgout12.his.huawei.com [113.46.200.227]) (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 52BCB3016E9 for ; Fri, 15 May 2026 02:35:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.227 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778812518; cv=none; b=jh1wQi61y+GLCFhr/ZK/UxvSbJ7czVFc5NbBpeeXjeLLUJF038PPDm1DpWl/jHgCTr2fLk09BlufAXGyeVL7KKhaAzy0i5b0qxWCkhJOo0Hno3bxRqPLcNEsBQwTFBPFCFHGhpju4cnGQOhgLGj7FaCNuSmyej0CEFrpGPJ/J1c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778812518; c=relaxed/simple; bh=KESRWW/MiuBykgSYIqyMuv2Sri2JksDi+JZfs4851lA=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=fZbB8Ak2FYWDcsrGvKt/1zO46qBKDc8MT5fObz1RjiEYiWZNT1Pf99EONWMRVJIWVH2K+sqAj9ZvjPTZv607l8X0RA/3WizyOoe0jRm32uTOR4WgPq9jAbdc0nbeYi4V/UioaAvaIPmIL0JNAE+SeB1jh2nUItxb1quvtoBlFLk= 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=uU7Xozkq; arc=none smtp.client-ip=113.46.200.227 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="uU7Xozkq" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=UJuI5cWrLjqZSC4epLlJmsrMKuvGRGnaD22IsmKq7IU=; b=uU7Xozkqz53qyBulJ2VsTWTzWin2hHPdatulQ5prdouo5zABK+pvcV1+ZXCrTJNebatf2jd0N PE+eBlXg1iMgx/T2pXxUuWm1dX4wY98ETBfhG382mqOHW/mtgwWFqDZw2lvbJa4xADrFQR82KdU gkp4rdPKBNNat9tw2LR9uzc= Received: from mail.maildlp.com (unknown [172.19.163.214]) by canpmsgout12.his.huawei.com (SkyGuard) with ESMTPS id 4gGrhm4GcSznTVq; Fri, 15 May 2026 10:28:08 +0800 (CST) Received: from dggemv706-chm.china.huawei.com (unknown [10.3.19.33]) by mail.maildlp.com (Postfix) with ESMTPS id 639E040571; Fri, 15 May 2026 10:35:10 +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; Fri, 15 May 2026 10:35:06 +0800 Received: from [10.173.124.160] (10.173.124.160) 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; Fri, 15 May 2026 10:35:05 +0800 Subject: Re: [PATCH] mm/memory-failure: Use zone_pcp_disable() for poison handling To: Kaitao Cheng CC: , , Kaitao Cheng , , References: <20260514085754.84097-1-kaitao.cheng@linux.dev> From: Miaohe Lin Message-ID: Date: Fri, 15 May 2026 10:35:05 +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: <20260514085754.84097-1-kaitao.cheng@linux.dev> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To kwepemq500010.china.huawei.com (7.202.194.235) On 2026/5/14 16:57, Kaitao Cheng wrote: > From: Kaitao Cheng > > __page_handle_poison() used drain_all_pages() instead of > zone_pcp_disable() because dissolve_free_hugetlb_folio() could restore > HVO vmemmap pages and decrement hugetlb_optimize_vmemmap_key. That static > key update took cpu_hotplug_lock through static_key_slow_dec(), while > zone_pcp_disable() holds pcp_batch_high_lock. CPU hotplug takes the locks > in the opposite order through page_alloc_cpu_online/dead(), so the > combination could deadlock. > > That dependency no longer exists. Commit da3e2d1ca43d ("mm/hugetlb: > remove hugetlb_optimize_vmemmap_key static key") removed the HVO static > key and the static_branch_dec() from hugetlb_vmemmap_restore_folio(). > The dissolve_free_hugetlb_folio() path no longer reaches > static_key_slow_dec(). > > Use zone_pcp_disable() again while dissolving the hugetlb folio and > taking the target page off the buddy allocator. This prevents the drained > PCP lists from being refilled before take_page_off_buddy() runs, making > the page isolation deterministic. > > Signed-off-by: Kaitao Cheng Acked-by: Miaohe Lin Thanks. .