From nobody Mon Feb 9 10:24:23 2026 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 247114D583; Wed, 13 Mar 2024 16:37:17 +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=1710347838; cv=none; b=CZp/omjfBjy+/8Ybs4aLzYMlSHd2Cuxg+2/sZ9KEodGzsHFWWhzKOyJrgoSoRC3YO0qhftmMT2rJ4ITFDCl8cRIT1AoWUgAbljTQQmOI2sYCNm6hhNI0eNOHD2xyUk9vpYjBw+IEqUICP7SFeOROcIaOt/CC7dvWYtxy6PGm6P0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347838; c=relaxed/simple; bh=i6QID6+SkDYvTWTlSTyWSw1sfimeDrT5dJe8XN/TIQE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B84gpg5WTIDMshasRXXwTCLjEgzCUjCSobxFv04IopVbCZnctvk+4cOGrwPVqSePvG4XLpWuwfajJxLsn+ah3eOai/mkurZSyf1/c6/t5jLqCbAfm2xCQ1WxaQxkg+BJAFSqWdtQY8rPSObADdHSvovK1BiKQqIqOA75AsrtL1Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EZem/hgZ; 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="EZem/hgZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67EA2C433C7; Wed, 13 Mar 2024 16:37:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710347837; bh=i6QID6+SkDYvTWTlSTyWSw1sfimeDrT5dJe8XN/TIQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EZem/hgZJ2E+vi/ahi/+kaNaZ8FdwbGvVYA1OSRAniw1mH9FUldUMAyk76wTgb5f9 3oXL6bOQDpNeTYmA7KEygJdxI+LDjDwP+LSiXuIQploavq6AH0XHgcSOGEB+elSdko X8cZUdBLaU+cLTbphUPEMGotAeOPQrKMqOuHiqaRJU61gZO8eAjL2JSnvxosYq1ZMJ n1u3Gdob9avuAFUqRzPEac0xOVzGL88CeBX2UYgVEiA+e/7NwEp5NDMnt9VtU1sXsl dgeoW7A3jxouKAaxk6acLVJpB06yODPC+d7xNuJhs4mkGCmhg8uVCPUh9nFuVZzNaG hXB4CrkHpc3hQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Kefeng Wang , Matthew Wilcox , "Huang, Ying" , David Hildenbrand , Hugh Dickins , Mike Kravetz , Zi Yan , Andrew Morton , Sasha Levin Subject: [PATCH 6.6 06/60] mm: migrate: remove THP mapcount check in numamigrate_isolate_page() Date: Wed, 13 Mar 2024 12:36:13 -0400 Message-ID: <20240313163707.615000-7-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313163707.615000-1-sashal@kernel.org> References: <20240313163707.615000-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.22-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-6.6.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 6.6.22-rc1 X-KernelTest-Deadline: 2024-03-15T16:36+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Kefeng Wang [ Upstream commit 728be28fae8c838d52c91dce4867133798146357 ] The check of THP mapped by multiple processes was introduced by commit 04fa5d6a6547 ("mm: migrate: check page_count of THP before migrating") and refactor by commit 340ef3902cf2 ("mm: numa: cleanup flow of transhuge page migration"), which is out of date, since migrate_misplaced_page() is now using the standard migrate_pages() for small pages and THPs, the reference count checking is in folio_migrate_mapping(), so let's remove the special check for THP. Link: https://lkml.kernel.org/r/20230913095131.2426871-3-wangkefeng.wang@hu= awei.com Signed-off-by: Kefeng Wang Suggested-by: Matthew Wilcox (Oracle) Reviewed-by: "Huang, Ying" Cc: David Hildenbrand Cc: Hugh Dickins Cc: Mike Kravetz Cc: Zi Yan Signed-off-by: Andrew Morton Stable-dep-of: 2774f256e7c0 ("mm/vmscan: fix a bug calling wakeup_kswapd() = with a wrong zone index") Signed-off-by: Sasha Levin --- mm/migrate.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 6f8ad6b64c9bc..c9fabb960996f 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2506,10 +2506,6 @@ static int numamigrate_isolate_page(pg_data_t *pgdat= , struct page *page) int nr_pages =3D thp_nr_pages(page); int order =3D compound_order(page); =20 - /* Do not migrate THP mapped by multiple processes */ - if (PageTransHuge(page) && total_mapcount(page) > 1) - return 0; - /* Avoid migrating to a node that is nearly full */ if (!migrate_balanced_pgdat(pgdat, nr_pages)) { int z; --=20 2.43.0