From patchwork Tue Apr 1 02:29:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swarna Prabhu X-Patchwork-Id: 14034308 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DEDFC3600C for ; Tue, 1 Apr 2025 02:30:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 20EFB280002; Mon, 31 Mar 2025 22:30:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1BD82280001; Mon, 31 Mar 2025 22:30:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 05DA0280002; Mon, 31 Mar 2025 22:30:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id DD0F2280001 for ; Mon, 31 Mar 2025 22:30:04 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 142DF160774 for ; Tue, 1 Apr 2025 02:30:06 +0000 (UTC) X-FDA: 83283895212.15.D25DB9F Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf03.hostedemail.com (Postfix) with ESMTP id 3835120004 for ; Tue, 1 Apr 2025 02:30:04 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=XIi3D1At; spf=pass (imf03.hostedemail.com: domain of sw.prabhu6@gmail.com designates 209.85.216.48 as permitted sender) smtp.mailfrom=sw.prabhu6@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743474604; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=JOUHkYETfeYPlrfgUGhvuwroRGucs+Rm6+GwIDzHnL8=; b=d3b7FKr2SnnM0pC6EWLeDK0mZZm+MtSSP+7tpcn7GtFlFqYEIHpuSiuWZd4eRFlXwH+zfW +tqztP19BvpQ4RQQ+PH3BM1emnFkukD6ZbTM+1IZoR+nf57PLueTX05XjGOY+bs6rc2O2M 0AaU/7GNifK6Nxf3iAlZML2QtRh9K/4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743474604; a=rsa-sha256; cv=none; b=0Lv6xevs+/PV65wDxosguijbKo5MSfLZadx4OvLpIBGPOfayF+Yi7U0EQHOULIo2ANKRG4 txELpkQCcdgu2M22RQRWN2+CNPuIs3Oh/Kx83tbZd7rhQ/yi0rvfE3m2cVjaHv77kTCPKp wC9oQy/83aGdiEWcCvjxnlE4pG7rDU8= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=XIi3D1At; spf=pass (imf03.hostedemail.com: domain of sw.prabhu6@gmail.com designates 209.85.216.48 as permitted sender) smtp.mailfrom=sw.prabhu6@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-30332dfc820so8872994a91.2 for ; Mon, 31 Mar 2025 19:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743474603; x=1744079403; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JOUHkYETfeYPlrfgUGhvuwroRGucs+Rm6+GwIDzHnL8=; b=XIi3D1At0rgJ9QjWFctylsJ7DYWbS2+LYGDZtJUS+3jzqcJijLAnoloRmC1lQQ1HbN U/zOcvvjc+KiABbDF28BvzqlDjk6JgxEylGXDynq6Pt7HDhEip4qVu+VImi22+N3hTOc zy0eRr43VtQ//2QmFHD2D+0axXW7ehPJyY38T7BeUCETuHJuPdcXFwcB9bK0kV5jqiN+ U9oEpnqfp3Cp3ShxN0YIR6EcuNfB0De4DvbNCAqPbUeiFkFOaHdOPrz4z3SKa06wi9qX dqiwBHvJ8EetOuPTR9qWG6hUe1Pu3f6qjFvLgD7lf0ui9kTC5oGhfAdObvqyEAODiZiR 7cZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743474603; x=1744079403; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JOUHkYETfeYPlrfgUGhvuwroRGucs+Rm6+GwIDzHnL8=; b=RRqwIKtBMoWN8Gbdx+ba23GagKlLNwoxG9AJjRCKLHQ7v8fy7MsI1cPFSfpE8s2B3m 27epgEmG5kQRZ++8Njnrd5/YISQZ+ARkGYmndVI5hqwv/VC3bI9S9Pek90Wb8Z3wl/aj 0svuLt4oJrfy+5Dqe7PSNLKXfkvSbgGk3zrGGsB+sPTBgG1RYS54WDtTaROCXGnicGLM 7m9uWvUcphH0uE/VLRNU9KKl1kdXbrpPiNIDiCP+FtSEESId2Zt6FYlBJ85+1eTEF5zH SDRTAnKahVf7MBLpqOGikZx3t71KIgxSxV5/xdtlR1UrZ3jxLCZ8zWnv6sEd6sked4sB ECMw== X-Forwarded-Encrypted: i=1; AJvYcCUJpmpduulEqQKYzusiBTLqJ8ubxlIfQDM3BQV0PlxvUIiverX6YiWibMU13V6u9Wvfg2/NyScZYg==@kvack.org X-Gm-Message-State: AOJu0YxWIUzY6TuaDrgWRnl2UpqbE5M/PafsOnStXqlAVJY2CjGtDenX Rr7R9r020yLrR63iStaQQfC+ixXqVu3mO0tTQBhqrqsMgU78lFTL X-Gm-Gg: ASbGncsQcyFzIzycjJ6xeYg5uxIOkfsDOiC6dC6w/3jiq8ofkoEIuh9jjwlukeGpke0 SF4fhDicZtkE6teH2iFTCT3TxPWhNcg6tyvRDoE8o0kHthS5RONMnpgZi0ksSfuMYTtR7GXi8df vKc81VNCrM3ylo4lQmOi3joMRMFUyvBu4Y8hNP3yJ780gVy39zrCwHh3SeeBKcRMKs0Upw4NK9v 9YrgAJGgyUN0S4woajXELgHIcLeUXE++n82u5bt8Djr27noDqPWBM4AA32cpk5AA2GltdFAI1Sj dBSbSrHLpTYCzWKiRWOGDmrl7AfY4saZpKAKkDfJm5cLrvTmNEGL4mZ/jJ0Eda0+ X-Google-Smtp-Source: AGHT+IEB0G2OAa0GElWwPece4cn1mGoI/Q9XaFxX+v953Ea03pxcHznVory5eAjLwxHMOkYTehrrXA== X-Received: by 2002:a17:90b:33cb:b0:2ee:d024:e4fc with SMTP id 98e67ed59e1d1-3053215c6ccmr19674215a91.33.1743474602963; Mon, 31 Mar 2025 19:30:02 -0700 (PDT) Received: from deb-101020-bm01.dtc.local ([149.97.161.244]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-305170e1b9esm8032843a91.36.2025.03.31.19.30.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 19:30:02 -0700 (PDT) From: Swarna Prabhu X-Google-Original-From: Swarna Prabhu To: patches@lists.linux.dev, fstests@vger.kernel.org, linux-mm@kvack.org Cc: linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, xiang@kernel.org, david@redhat.com, huang.ying.caritas@gmail.com, willy@infradead.org, jack@suse.cz, mcgrof@kernel.org, p.raghav@samsung.com, da.gomez@samsung.com, dave@stgolabs.net, gost.dev@samsung.com, Swarna Prabhu Subject: [PATCH] generic/750 : add missing _fixed_by_git_commit line to the test Date: Tue, 1 Apr 2025 02:29:21 +0000 Message-ID: <20250401022921.983259-1-s.prabhu@samsung.com> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 X-Stat-Signature: 5azy4mgzbsamgmykpotzax1hnkemx7sk X-Rspam-User: X-Rspamd-Queue-Id: 3835120004 X-Rspamd-Server: rspam08 X-HE-Tag: 1743474604-18754 X-HE-Meta: U2FsdGVkX18xy0j6S6UOblbyCAlI6KoiIsKURHod+fhuf3ubrhmXQAY48iES99W85jdyIRy4vNzH/uKA4dVXv1pxukdAzZSKBSnq8J93+inBk26rddwDPkvWeudeCADTe6YA++YpF7WxgvxVZ5ivq/JJ1AVzvVaAA4tjv8Y2DEuknIE+msCNzrmvnsbI9/bGNwQWnLvNsTHGPx3xycU0ZJafcEGPWokszDyY+vqY2hIOvhrAKhVcAmx0JDqU+9YWBMP0ZPF+B43GKUIAKuMMwxj5Vkc4+QzWnH3Mfb8EtS6oyxLMc2k8udHONyC2nSZcUBLmBczhFnRGPUbygOZAWmWYIbP00f8PvZ718GMEXHR2503YQ/zauk0IRxANX41qKHmdI15s6f5XE7msgVRig3jkwlydkm2dQv7IlfWJm9//aa4DOzDVBYAiAh7tU4abMoA73jDq4EjLEyT2c5L0RRO8xRShTSqsf3CKNF4fuTvdHxMVHycIzzPATfKwGgDZjaPNVsqwrmJitr5DfMkDBkICgTWBsywg1T+WS3/Cn6BkWvqHkhOgXdcJD7a5SeTL1O1+odGZzGYcIU05USHKZYhDtdgEAcv9MQq3daq8vz3t+fapekoHfLenBjnqI+B18L9iZ26kwx0R1vEjcBmb639f8ba02IIhHvI4SLs4V6E73TZiuA2bAQ0D8BmeEjryQRB5FJz0z5c+DobfkAkBSWZAB+r6QvOlCvVwIe4giD0abTYNgM9Ha9xdoq3As1Pl41FEjpWF3PnhbceTh6m75UnABt9E3d/B/lcZ23YrXs4c6SsWuJ/qbXCt6UfJh7sbdz776a4Cwe9Hm61jAmyWL/AWXHbryLrOal698THwbWBndA69jkxgwd/kISMQMTpUg20DTqvfUExQbTgbsJMArCcczPOZ7PtXZKxQerz3Ziz93Q/1EULVVaRKY/i5D901sS5Hoxbr0SWmb8Izq5e VKeDNR3A TT1Tz2PJ8H4xTAVwDJBBHDy8cxgtZlQJvGiIYhOyghA3jFlFKkFPpDj5wCUf5cYx2W9qwfTbDapEC27mKmKoJ7GAdLg3H61y2CDU1yEZ5FJifGVQw/0uH/EYSlBn2uIxWt798FBPgDjH/dPBHKsbVypadcr1C7m87HrNqeOqIAr6p+xeUe5LXpDarriyRDM9XRkP5UUs6SvSYRIgVcuAMLUMEY59vrgkyCOEiGOucejdeKircNoO0iAnaggXUJQViVxdGbuq01URxEsdLNv/STNYjcLxan10/LzDoI26PEb32rJHMtST9LMFOvaE5hqECRk/PUPKIsvfU+0jGmcBhAN1nV4gSZHAsBGo+3jOxDOA0vJmMS1aE4lNMmtSK38zTGKB91k9Gr+wicn1zGNLeDV6M8j7fW2pIX/uP7QyAiP8K9S/eeKObE5iWwdm8taKvjvzh50/J1Qlhk8lMxcMH7eKOpOMjB3N+I2XqfTV83LaquhQ= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Testing generic/750 with older kernels indicated that more work has to be done, since we were able to reproduce a hang with v6.10-rc7 with 2.5 hours soak duration. We tried to reproduce the same issue on v6.12 and could no longer reproduce the original hang. This motivated us to identify the commit 2e6506e1c4ee ("mm/migrate: fix deadlock in migrate_pages_batch() on large folios") that fixes the originally reported deadlock hang annotated as pending work to evaluate on generic/750. Hence if you are using kernel older than v6.11-rc4 this commit is needed. Below is the kernel trace collected on v6.10-rc7 without the above commit and CONFGI_PROVE_LOCKING enabled: [ 8942.920967] ret_from_fork_asm+0x1a/0x30 [ 8942.921450] [ 8942.921711] INFO: task 750:2532 blocked for more than 241 seconds. [ 8942.922413] Not tainted 6.10.0-rc7 #9 [ 8942.922894] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 8942.923770] task:750 state:D stack:0 pid:2532 tgid:2532 ppid:2349 flags:0x00004002 [ 8942.924820] Call Trace: [ 8942.925109] [ 8942.925362] __schedule+0x465/0xe10 [ 8942.925756] schedule+0x39/0x140 [ 8942.926114] io_schedule+0x42/0x70 [ 8942.926493] folio_wait_bit_common+0x10e/0x330 [ 8942.926986] ? __pfx_wake_page_function+0x10/0x10 [ 8942.927506] migrate_pages_batch+0x765/0xeb0 [ 8942.927986] ? __pfx_compaction_alloc+0x10/0x10 [ 8942.928488] ? __pfx_compaction_free+0x10/0x10 [ 8942.928983] migrate_pages+0xbfd/0xf50 [ 8942.929377] ? __pfx_compaction_alloc+0x10/0x10 [ 8942.929838] ? __pfx_compaction_free+0x10/0x10 [ 8942.930553] compact_zone+0xa4d/0x11d0 [ 8942.930936] ? rcu_is_watching+0xd/0x40 [ 8942.931332] compact_node+0xa9/0x120 [ 8942.931704] sysctl_compaction_handler+0x71/0xd0 [ 8942.932177] proc_sys_call_handler+0x1b8/0x2d0 [ 8942.932641] vfs_write+0x281/0x530 [ 8942.932993] ksys_write+0x67/0xf0 [ 8942.933381] do_syscall_64+0x69/0x140 [ 8942.933822] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 8942.934415] RIP: 0033:0x7f8a460215c7 [ 8942.934843] RSP: 002b:00007fff75cf7bb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 [ 8942.935720] RAX: ffffffffffffffda RBX: 00007f8a45f8f740 RCX: 00007f8a460215c7 [ 8942.936550] RDX: 0000000000000002 RSI: 000055e89e3a7790 RDI: 0000000000000001 [ 8942.937405] RBP: 000055e89e3a7790 R08: 0000000000000000 R09: 0000000000000000 [ 8942.938236] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000002 [ 8942.939068] R13: 00007f8a4617a5c0 R14: 00007f8a46177e80 R15: 0000000000000000 [ 8942.939902] [ 8942.940169] Future hung task reports are suppressed, see sysctl kernel.hung_task_warnings [ 8942.941150] INFO: lockdep is turned off. With the commit cherry picked to v6.10-rc7 , the test passes successfully without any hang/deadlock, however with CONFIG_PROVE_LOCKING enabled we do see the below trace for the passing case: BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low! turning off the locking correctness validator. CPU: 1 PID: 2959 Comm: kworker/u34:5 Not tainted 6.10.0-rc7+ #12 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 2024.11-5 01/28/2025 Workqueue: btrfs-endio-write btrfs_work_helper [btrfs] Call Trace: dump_stack_lvl+0x68/0x90 __lock_acquire.cold+0x186/0x1b1 lock_acquire+0xd6/0x2e0 ? btrfs_get_alloc_profile+0x27/0x90 [btrfs] seqcount_lockdep_reader_access+0x70/0x90 [btrfs] ? btrfs_get_alloc_profile+0x27/0x90 [btrfs] btrfs_get_alloc_profile+0x27/0x90 [btrfs] btrfs_reserve_extent+0xa9/0x290 [btrfs] btrfs_alloc_tree_block+0xa5/0x520 [btrfs] ? lockdep_unlock+0x5e/0xd0 ? __lock_acquire+0xc6f/0x1fa0 btrfs_force_cow_block+0x111/0x5f0 [btrfs] btrfs_cow_block+0xcc/0x2d0 [btrfs] btrfs_search_slot+0x502/0xd00 [btrfs] ? stack_depot_save_flags+0x24/0x8a0 btrfs_lookup_file_extent+0x48/0x70 [btrfs] btrfs_drop_extents+0x108/0xce0 [btrfs] ? _raw_spin_unlock_irqrestore+0x35/0x60 ? __create_object+0x5e/0x90 ? rcu_is_watching+0xd/0x40 ? kmem_cache_alloc_noprof+0x280/0x320 insert_reserved_file_extent+0xea/0x3a0 [btrfs] ? btrfs_init_block_rsv+0x51/0x60 [btrfs] btrfs_finish_one_ordered+0x3ea/0x840 [btrfs] btrfs_work_helper+0x103/0x4b0 [btrfs] ? lock_release+0x177/0x2e0 process_one_work+0x21a/0x590 ? lock_is_held_type+0xd5/0x130 worker_thread+0x1bf/0x3c0 ? __pfx_worker_thread+0x10/0x10 kthread+0xdd/0x110 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2d/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 Started fstests-check.scope - [systemd-run] /usr/bin/bash -c "exit 77". fstests-check.scope: Deactivated successfully. Signed-off-by: Swarna Prabhu Reviewed-by: Luis Chamberlain --- tests/generic/750 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/generic/750 b/tests/generic/750 index a0828b50..abce6a59 100755 --- a/tests/generic/750 +++ b/tests/generic/750 @@ -26,11 +26,13 @@ _cleanup() _require_scratch _require_vm_compaction -# We still deadlock with this test on v6.10-rc2, we need more work. -# but the below makes things better. _fixed_by_git_commit kernel d99e3140a4d3 \ "mm: turn folio_test_hugetlb into a PageType" +#merged on v6.11-rc4 +_fixed_by_git_commit kernel 2e6506e1c4ee \ + "mm/migrate: fix deadlock in migrate_pages_batch() on large folios" + echo "Silence is golden" _scratch_mkfs > $seqres.full 2>&1