From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4D8F2701DC for ; Fri, 16 Jan 2026 14:12:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768572732; cv=none; b=hkI6vxaVaXTiUUEDw7BtIo997Ke4ALvhtjtBU0J2gra5IReyFANuzYJuX5fiRvZI3vIyEUubJc1JjTy/WHIRv5zySi/QLMigkzD97ZefRgPFgrzOrQtGd1iUiofnxe+ZqFDoI+H5a1wNKKbLDoDiHVL3YnX2ex3/Hk/Xo05TRT0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768572732; c=relaxed/simple; bh=dWZqaNqG8p4mIFnivr+40g0OFfxpp1u4Q1ficbnEoTo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QA8BwsTivnBiB1/Ka7gQpmTSfGYVgN4P/J/B+QLh3jd9uz9km4aj5XMM1T3tV0xyWhUEFzPher39LfRMBC6Za248m+ovGdcquKBba/w3LgFaiLKl+DgWiEXAeKGqBAi72QfpI832iUmb4Kh848i/lm2IaRcivEPLiqMEZxDmUR4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=delta-utec.com; spf=none smtp.mailfrom=delta-utec.com; dkim=pass (2048-bit key) header.d=delta-utec-com.20230601.gappssmtp.com header.i=@delta-utec-com.20230601.gappssmtp.com header.b=webWn8h+; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=delta-utec.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=delta-utec.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=delta-utec-com.20230601.gappssmtp.com header.i=@delta-utec-com.20230601.gappssmtp.com header.b="webWn8h+" Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-b86ed375d37so273010366b.3 for ; Fri, 16 Jan 2026 06:12:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delta-utec-com.20230601.gappssmtp.com; s=20230601; t=1768572728; x=1769177528; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2ftGOR3HCczg9PRGjML2ssDls53360eFYMzlALTxJm8=; b=webWn8h+pY+GW07gcAptq2bEC/lpFafLzvq8RxWhV45xUoY2U/gqyOjh0gGv9UPLFn z1mra1DSeRp/5b4YOnWXszDr5VSdWjZdYMXmI6MH6MDfbDxqP1PU2A+nTJu64w768RQR nP12k+UxO5jMrcx5xSfOMiQkNihg0CneG4hxX263rn+4o8/YKLYllj5c1nTslDUJO0OT d/4e0AfcXli/3hxzWXwhaz7r/Wx1WJV8SQmhv8OC4ZvCdiRy7dor4CPHeP3jMEInwVOv vM/jqo2ZHD9QX7OxXIe+0kUbzEwwN+KBh7ZHU7IzR1ZHGh/ldIm0jfxDae68YFJ/Zq2V RqMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768572728; x=1769177528; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2ftGOR3HCczg9PRGjML2ssDls53360eFYMzlALTxJm8=; b=tA2zYqLaMuf340x4YhJ7NraTXYnm/jSIoi/Z9P4crPhd4UHlzoUMAp8jj60ocDW4+f SbLnMQlJ3vL2ObOpkDWQgbXvCh/sCLoNWc46VBzBBszAP5vrmox89zrkFEKtGn89EvDY t1fJ26mv6kKvoC4zIJK3UAsdXKFJ//EGTerzSOBDwnmBy3vuh4HwjLXIQZb0ZEQIAHCJ vdu3Df5TfE+Fp0W4jQlSr3iQ0DXYhtN5fm4jjr1P5AZAfLUz//1ux9ffQol/OsBxcDqV 35Ukk/3otVVsZhBsu7yo6PekZzHh5rZ7ZRkhKx1xygQW8luBCTiTrAV7LyFPJem3etI9 1sng== X-Forwarded-Encrypted: i=1; AJvYcCXPHUPPrj56LSogBOcc3lJPv9fSblvqyZvPS8w7akh3gdgBCbUz06mXyyTM/XX9ypAwSgV7xWZHBdOaBhI=@vger.kernel.org X-Gm-Message-State: AOJu0YzF90Ie/X3cvuOK/BQl3yE+q+Dw1T4kJK8OQV/he6ea8FORAL8Q 1tKN3jUfzs9ad4IV48T4jb1MH+f8nf/a61K4d76sIBIMjNyTXZjfwXo+TauEpZmbgQ== X-Gm-Gg: AY/fxX4kI+prx0Bsx3y8ub26QNctOISr02TH5nqGqENCQRnob8wytzoN8vqqSf2BeOm XNBDj+iltNdclfDu7Yd5om/lNWwpc0A/XROZBPAK8oRDmj8YnMdnQJLg0WPLrJs4/C03Yes7KUt gw/fJKCPUha6/Sm2Jasv2XkRoMMnNtmRb8+Yc5p14TDAu5AiQtaNWSWMuI6oksggGmiO+zI0Nmn wcAvtI4y3h8GiD9KWmHpPElN8rlXkWnZePky3U6Y3T2mQpGUcR0RaWaJsCPU5BZuTbwUVGs4IvT CnvAekXPPJfBScXcqnyDpa28R2WfoZnppsxrxEmLbFIdYPLjmDul9Hx7x1epI31D1caJ8ZRDP+s 2/eSndm+WqnIOBPgc1rV7eIly0RptIhx8Q/1dk/7OSuHkVgUMDO/4w57idBYsIIaMjR9miTi8DR X34mwZLg9V7hJ97uXwZQuMN+sP3bszUgVYhHWdn8tljRUwER43tX0JwHk+LD/BAPY+pCzEZrRvj xTmNwFuX0hQkfhahOolpfkXcwQii4dVjtG6k8c= X-Received: by 2002:a17:907:845:b0:b87:778b:89ba with SMTP id a640c23a62f3a-b879300d987mr287076666b.39.1768572728262; Fri, 16 Jan 2026 06:12:08 -0800 (PST) Received: from localhost.localdomain (2001-1c00-3405-d100-b173-9aa6-05c2-3fe1.cable.dynamic.v6.ziggo.nl. [2001:1c00:3405:d100:b173:9aa6:5c2:3fe1]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-654535c49dbsm2583543a12.32.2026.01.16.06.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jan 2026 06:12:07 -0800 (PST) From: Boudewijn van der Heide To: jiaqiyan@google.com Cc: akpm@linux-foundation.org, boudewijn@delta-utec.com, hannes@cmpxchg.org, jackmanb@google.com, linmiaohe@huawei.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@suse.com, nao.horiguchi@gmail.com, osalvador@suse.de, surenb@google.com, vbabka@suse.cz, ziy@nvidia.com Subject: Re: [PATCH] mm/page_alloc: Fix freeing of failed-split poisoned compound pages Date: Fri, 16 Jan 2026 15:11:57 +0100 Message-ID: <20260116141157.29578-1-boudewijn@delta-utec.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. For THP I would need to trace the failed-split paths more carefully, to check where the equivalent path for THP would be. If there is work needed for THP, I'm happy to help. Would you prefer I work on THP support as a separate follow-up patch, after yours is merged, or do you prefer to integrate it in your patch series? > > > > [1]: https://lore.kernel.org/all/20260112004923.888429-1-jiaqiyan@google.com/ > > > > Thanks. > > . Thanks, Boudewijn