From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 811D5175A8E for ; Fri, 13 Mar 2026 00:16:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773360999; cv=none; b=ryDGm3PqK3taffTfCvK4cCEjWWPpu6FTmMQmhAcv4eDwQOKjWTYghAa1UHQmbFy/AsHG3+dftbfRILKqSKHjz8wz9gbsBOL/41kVV8v31U2nW6OFdt8QaECci5S+OjLm0Q6d+eNETFwcENLCdFY4ftRYm+13aAVPymZUtIwI2q4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773360999; c=relaxed/simple; bh=kxl9iEtW6aK2kkcioT9fyhzhn0YAaFkzT5zpiNmeZjA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZM45xiWPDbz+VKogUs98DdSrV7tzrNGLpm+C8Y5QgxL7FcjHWWoxcQ4i2OKNrCktwS/4ZgQRIbOMlAgM4iJrRuo8nIUtyFH9cteF7ukPjFli/v3HFYHVxR4J8I/aGee6duELlq1zK2lSsoBuJAynwl3bjcQJckGC//1snVZIOMg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kojrPeUx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kojrPeUx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B72F6C4CEF7; Fri, 13 Mar 2026 00:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773360999; bh=kxl9iEtW6aK2kkcioT9fyhzhn0YAaFkzT5zpiNmeZjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kojrPeUxA17rgHtPYsXoyrZJG3a9/hQhygq5TnTfpxEgTYl6FZ6TDmQh1SE7cmgaZ +JJbLl0hePVs4amoZQLuFgekaROkwmF+nBK5VM15NFdfvMWZzcPuZn21hTAqHKiw5m pYJqy400PqsDBUV/2D3JTvbLDcqUvFRAO7BqSU+4qW5T3wCQVInSqoCpLwB03gSHFY cjE10PuULCEUuD0AFdeNQu7AV76ddG9L3E1MxjSao1uPevwuTzpt6LxSjvRofrbenN TuvuxRmIIn/bHJrZJRd4MwAWEFrggaboRPPuuQMNIThCVHPOCKP9RbK+AE4JIIHLnH 5CdmRXqNuzMDA== From: SeongJae Park To: Usama Arif Cc: SeongJae Park , Andrew Morton , npache@redhat.com, david@kernel.org, ziy@nvidia.com, willy@infradead.org, linux-mm@kvack.org, matthew.brost@intel.com, joshua.hahnjy@gmail.com, hannes@cmpxchg.org, rakie.kim@sk.com, byungchul@sk.com, gourry@gourry.net, ying.huang@linux.alibaba.com, apopple@nvidia.com, linux-kernel@vger.kernel.org, kernel-team@meta.com, richard.weiyang@gmail.com Subject: Re: [PATCH v3] mm: migrate: requeue destination folio on deferred split queue Date: Thu, 12 Mar 2026 17:16:30 -0700 Message-ID: <20260313001630.80081-1-sj@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260312104723.1351321-1-usama.arif@linux.dev> 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 On Thu, 12 Mar 2026 03:47:23 -0700 Usama Arif wrote: > During folio migration, __folio_migrate_mapping() removes the source > folio from the deferred split queue, but the destination folio is never > re-queued. This causes underutilized THPs to escape the shrinker after > NUMA migration, since they silently drop off the deferred split list. > > Fix this by recording whether the source folio was on the deferred split > queue and its partially mapped state before move_to_new_folio() unqueues > it, and re-queuing the destination folio after a successful migration if > it was. > > By the time migrate_folio_move() runs, partially mapped folios without a > pin have already been split by migrate_pages_batch(). So only two cases > remain on the deferred list at this point: > 1. Partially mapped folios with a pin (split failed). > 2. Fully mapped but potentially underused folios. > The recorded partially_mapped state is forwarded to deferred_split_folio() > so that the destination folio is correctly re-queued in both cases. > > Reported-by: Johannes Weiner > Fixes: dafff3f4c850 ("mm: split underused THPs") Seems the commit is merged in 6.12. And I assume the user impact on THP-shrinker enabled systems is visible. If so, should we Cc stable@ ? > Acked-by: Zi Yan > Acked-by: David Hildenbrand (Arm) > Signed-off-by: Usama Arif Acked-by: SeongJae Park Thanks, SJ [...]