From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 099E835C1A6; Tue, 21 Jul 2026 19:42:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662973; cv=none; b=Oc6gY9627rc2XeVxxpoaQZcYHdjzz7nX+W8awiW5q7ILAsePTenRY8uVUBTcgDCKL/SFOs3B5wFiaCcdSAWNrQ/qTMuIDVjedg6prDvwep8bi12tu/Z+K0mXhYz+PwdTIJv1GTmK/pxZT9cJRFjeDRei8ScQ917ZTq5qeFbz8+M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662973; c=relaxed/simple; bh=trd4HD80PSHahcLHgla24fOw7ZCPD+czst0O69lI4I8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AkReoX49PPHkotBERXfG4tppx8uQRRYlFAErk5GeGcUMcI74Ygse1BNbto4fdc2Sb8i+YgT35evRLsev92pAKF7gjTziXciqAhZiCGdPQStejstIX7nsaEeqBH1/kHE95wF6HArkiH3z5lzAT1D48NjadoEuUyCksjBRp+7edzw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=j88VcU/4; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="j88VcU/4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72A371F000E9; Tue, 21 Jul 2026 19:42:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784662971; bh=uA7F4kdoGOi41eNrwpUrq2N41JQuPbiXo4KLsjm3bwg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=j88VcU/4g0xniDekPqYS3xFKJo/CSIn3PIHoldUMuBuSe7TC7EMxH7g/YcftVCmp7 4RTzSrKldwOp8BJiIWz0CefZYhx0TVSKN2/zOb6vrEOuGHJIwjnSjO04Vtnpr/X6U0 7eDEgsOp4DXBuXtZXv/3w2JxYBo+3eYGxtiKUCtw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sayali Patil , Venkat Rao Bagalkote , "David Hildenbrand (Arm)" , Dev Jain , Liam Howlett , Miaohe Lin , Michal Hocko , Oscar Salvador , "Ritesh Harjani (IBM)" , Shuah Khan , Zi Yan , Andrew Morton , Sasha Levin Subject: [PATCH 6.12 0604/1276] selftests/mm: clarify alternate unmapping in compaction_test Date: Tue, 21 Jul 2026 17:17:27 +0200 Message-ID: <20260721152459.627900149@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152446.065700225@linuxfoundation.org> References: <20260721152446.065700225@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sayali Patil [ Upstream commit 69ba1d76d93ab818245333cf400928477ba72053 ] Add a comment explaining that every other entry in the list is unmapped to intentionally create fragmentation with locked pages before invoking check_compaction(). Link: https://lore.kernel.org/da5e0a8d5152e54152c0d2f456aac2fac35af291.1779296493.git.sayalip@linux.ibm.com Fixes: bd67d5c15cc1 ("Test compaction of mlocked memory") Signed-off-by: Sayali Patil Tested-by: Venkat Rao Bagalkote Cc: David Hildenbrand (Arm) Cc: Dev Jain Cc: Liam Howlett Cc: Miaohe Lin Cc: Michal Hocko Cc: Oscar Salvador Cc: "Ritesh Harjani (IBM)" Cc: Shuah Khan Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Sasha Levin --- tools/testing/selftests/mm/compaction_test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c index 9bc4591c7b1699..be226ead936fd5 100644 --- a/tools/testing/selftests/mm/compaction_test.c +++ b/tools/testing/selftests/mm/compaction_test.c @@ -261,6 +261,9 @@ int main(int argc, char **argv) mem_fragmentable_MB -= MAP_SIZE_MB; } + /* Unmap every other entry in the list to create fragmentation with + * locked pages before invoking check_compaction(). + */ for (entry = list; entry != NULL; entry = entry->next) { munmap(entry->map, MAP_SIZE); if (!entry->next) -- 2.53.0