From patchwork Wed Apr 2 18:30:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swarna Prabhu X-Patchwork-Id: 14036374 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 AABD4C28B20 for ; Wed, 2 Apr 2025 18:30:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7C8A8280007; Wed, 2 Apr 2025 14:30:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 77947280006; Wed, 2 Apr 2025 14:30:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5F392280007; Wed, 2 Apr 2025 14:30:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 43206280006 for ; Wed, 2 Apr 2025 14:30:48 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id B557CC0408 for ; Wed, 2 Apr 2025 18:30:49 +0000 (UTC) X-FDA: 83289945018.03.CB363FF Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by imf05.hostedemail.com (Postfix) with ESMTP id C2F85100015 for ; Wed, 2 Apr 2025 18:30:47 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="NNOX/S67"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf05.hostedemail.com: domain of sw.prabhu6@gmail.com designates 209.85.214.170 as permitted sender) smtp.mailfrom=sw.prabhu6@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743618647; 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=rn8oma1oVfEpH5Tkl+SwVuQnB82UdbanCKRmFjYR/qA=; b=ookKxr0/JU6JWRHO4S4dutaSdjbkvRjcjS3hxaNeH2SkgvCMTx0wEiLapBQvizVK8mUTC6 LYLsOYp4Yc1vZqMETNEuYgHr09H/AMqUB+FsLFKH8dNErrEMmuldXrfNskirmi5cEjghDI eMY9ta8CHLoQbfdJeNvJz1D1uuBqSIQ= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="NNOX/S67"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf05.hostedemail.com: domain of sw.prabhu6@gmail.com designates 209.85.214.170 as permitted sender) smtp.mailfrom=sw.prabhu6@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743618647; a=rsa-sha256; cv=none; b=IdrUQM6FnKt2d5H5YLCxCy/q15wVOuGdgss2lpaTeCMPEBA+dat4rzevN65rNjvxR3APLK S+D2DTcWXTTu2Q0WO7WSP+CthIAifoVW1xzBaRlK3zIENwGkYyLiW6gvDMYr06s57HIU6k 8lb20qv91bwjW0pwEChsGHr5e/NY57U= Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-224019ad9edso2027265ad.1 for ; Wed, 02 Apr 2025 11:30:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743618646; x=1744223446; 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=rn8oma1oVfEpH5Tkl+SwVuQnB82UdbanCKRmFjYR/qA=; b=NNOX/S670qzBUeHZzLIEb316ObiFDyPQ3ob1/eGwBRw5HGxfljq4lASgcI0nCyWo0g azI5G6iZ+dkXEYE7sN+AZu/Mcljdf+KPI09ri3vfy/WMn7I1ZD1bD113b+6pA0lPzIOJ jR1XyHLrC2aB1i1I1wyEpmhrhEOGPYFbBkSEBZjqi2PC0e4fewfI7GfxycmdtIjErJ1V jgrPvjfRTeNtwYAwZIJ6SgmO2tZYfPIy1vVVGS2U8P+Iy0d5LsU3r5Vl5EWqwFEP35SZ tdDM/J1txoQPPJE+Ti0mlI1LoDPjXDiJ1QGKz4TF5SEPmgZ7dp3fUvSozAnpH+TJQgSh 6u5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743618646; x=1744223446; 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=rn8oma1oVfEpH5Tkl+SwVuQnB82UdbanCKRmFjYR/qA=; b=WYVxV0r2ngU2gHmy5a9A/HAAFVSQsXY16B64H8MgqhsuuxVgJ6fOwlnBwWr+cjPAqb ZLDXAR1KJpRrOux37UuKgxWldNa7F4Cx3aIN5hj9ZIgXDxvHRKC8k6Z85MIj777TdEK0 0otYudx1+W3zWiKzXfv2mPgnMTB2N7HbHdgnHFoYH//4+qq7tB/M25icpJnwcZsEeNbp su+ffsGmAxtWRTDmNX/4s5G52Sk/sULZ9lT42xeui7kOKKKKPYFe4tk2el7SaDTIQ85d +QSDJGcWezyguB6KK8f2IE3o/97LQc1vrXMOUwy8TSX4KrVK6WX0/lsmzxVPrQdnjIVX HM0A== X-Forwarded-Encrypted: i=1; AJvYcCVV329So5LB/8l1PIIFHeVqqQ91zQACKEbG80xJAfRdGe3wN5HvjjUWuuJYzM8B/fYi0+foJxgFsg==@kvack.org X-Gm-Message-State: AOJu0YzzxH5R/t8vyhMcb4TDB7znDAyNGlBW+J/WUCtcg5BfXCxf5fU9 8mS3jOSX6BD3p+paxe7S+7ZhDPiRAiczFMIxk/JdFhjQvRd5H2n9 X-Gm-Gg: ASbGncsff/TyHZztF3psL9Pz5dVMSOIKV9D15ImK1jv/AiWmzB4XdmruwabyWcFzVPp 0vAZvbMWzZYwD11IKEUG+Y6QlXwhDpOKGcnmRKU9qFjhqPL9MmjUjFGOmeWBkY/PigBZXB/7SgW Ib2Yfa4hTc8rFWxU9lMJp3+pzp1FNPbFNCAkcE+Up08v9/0MKVZg6pDz6BG83hYWOQm41RxohnF yWwX6CD5hDJeCo6+RTyBY0stM/148Ady+dKAVESjFa3+Hzeijhp/+frJZicXFHuoRVEjDZNV2YN l00SfDUGhlhmkqHOJPy/6rpPm6lOsD/AqBIdFo0jeOv29B3ivdDnRv7+or+0g+f7 X-Google-Smtp-Source: AGHT+IFlodV5atdixW6g8XhG2y808h6V4Y6H1em+6G+wGPpHH4a4gTVZIdNpHOFLnhE9SCdZ3XY68w== X-Received: by 2002:a17:902:db04:b0:220:d078:eb33 with SMTP id d9443c01a7336-2296c85d9c0mr39636725ad.36.1743618646422; Wed, 02 Apr 2025 11:30:46 -0700 (PDT) Received: from deb-101020-bm01.dtc.local ([149.97.161.244]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2291f1f5774sm111211645ad.214.2025.04.02.11.30.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Apr 2025 11:30:45 -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 v2] generic/750 : add missing _fixed_by_git_commit line to the test Date: Wed, 2 Apr 2025 18:30:34 +0000 Message-ID: <20250402183034.2334125-1-s.prabhu@samsung.com> X-Mailer: git-send-email 2.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nCWy85hV2hgH5UVlrycwMo94zONwHE2ejL7n4B 4jPdaHt3 RjFA7KJgjdrwODGQzGKynx9CLtylHqRbIEgc3wBrdb+apQU7pKDb8bTchMpS1G5O3aev//arlPFTuvyxyFaqmb+pmzhZy0BQ5tovhzk4iH8qcqAjy5GAZL72yrPnMLyJVI2zv++k/g2CbsnIp7lNCYhK1ob3vjGkdA4cj1WgeGZU/00Ilmy8N/rc4zmaZAXP4oGbABgL0tuoI06I0iysOWQ5lrxfVv+22QBXYqpyRa6h1AQcYXqabPLl7vj/wxoH/wnVkBIV0WjtRDnpubh6GWrOZCxI3gse6famVwwgpl8NFH4iSR05J2cGRdXiwLb5zjDWRjI9SnVWFfEGI3wORxomAlGoHqSx+j2FsMZbRkTmEkej0GhSk37Jv6C5rkvedPxrOvjx0MHwhV+ueKRH7DWEHyq8PqmxsNaFqPzAHXi0oePEjQfokuvK/UC4alIPw28+4LQoS7D3iSILqh6GLLk/uikVdjIRzQz99hNSZDhN6ZmexqpDK3U15bRQdnHL58H/jI2mipBrP5D9cDiyfWwzI27zeZI0jjt3ibGw5Yyz48nXfjcC1Dpb2PspUbT5iDa0A0h7CAalZtSWY/EauszCNT6fECmHjd+jb 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/generic/750 b/tests/generic/750 index a0828b50..6606593c 100755 --- a/tests/generic/750 +++ b/tests/generic/750 @@ -26,11 +26,12 @@ _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" +_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