From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C4ABD139085 for ; Sat, 14 Jan 2017 14:46:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E328123403F; Sat, 14 Jan 2017 14:46:22 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B0E7C23403F for ; Sat, 14 Jan 2017 14:46:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 20C08340988 for ; Sat, 14 Jan 2017 14:46:21 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 816FD26C8 for ; Sat, 14 Jan 2017 14:46:19 +0000 (UTC) From: "Mike Pagano" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Pagano" Message-ID: <1484405167.4f63d91e3dadb1e5e18b235d059ad2d511d65406.mpagano@gentoo> Subject: [gentoo-commits] proj/linux-patches:4.4 commit in: / X-VCS-Repository: proj/linux-patches X-VCS-Files: 0000_README 1900_xfs-fix-suspend-to-memory.patch X-VCS-Directories: / X-VCS-Committer: mpagano X-VCS-Committer-Name: Mike Pagano X-VCS-Revision: 4f63d91e3dadb1e5e18b235d059ad2d511d65406 X-VCS-Branch: 4.4 Date: Sat, 14 Jan 2017 14:46:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 289c9858-024c-4687-8191-e1059022c11f X-Archives-Hash: 4b78dffe65aa65f822c22a5dc12a9a6d commit: 4f63d91e3dadb1e5e18b235d059ad2d511d65406 Author: Mike Pagano gentoo org> AuthorDate: Sat Jan 14 14:46:07 2017 +0000 Commit: Mike Pagano gentoo org> CommitDate: Sat Jan 14 14:46:07 2017 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=4f63d91e xfs: Make xfsaild freezeable again. See bug #575034. 0000_README | 4 ++ 1900_xfs-fix-suspend-to-memory.patch | 78 ++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/0000_README b/0000_README index 94751c6..335640e 100644 --- a/0000_README +++ b/0000_README @@ -219,6 +219,10 @@ Patch: 1510_fs-enable-link-security-restrictions-by-default.patch From: http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/ Desc: Enable link security restrictions by default. +Patch: 1900_xfs-fix-suspend-to-memory.patch +From: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/fs/xfs/xfs_trans_ail.c?id=18f1df4e00cea2eae41f3e5515b94d1e7127b2b6 +Desc: xfs: Make xfsaild freezeable again. See bug #575034. + Patch: 2700_ThinkPad-30-brightness-control-fix.patch From: Seth Forshee Desc: ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads. diff --git a/1900_xfs-fix-suspend-to-memory.patch b/1900_xfs-fix-suspend-to-memory.patch new file mode 100644 index 0000000..1383702 --- /dev/null +++ b/1900_xfs-fix-suspend-to-memory.patch @@ -0,0 +1,78 @@ +From 18f1df4e00cea2eae41f3e5515b94d1e7127b2b6 Mon Sep 17 00:00:00 2001 +From: Michal Hocko +Date: Mon, 8 Feb 2016 14:59:07 +1100 +Subject: xfs: Make xfsaild freezeable again + +Hendik has reported suspend failures due to xfsaild blocking the freezer +to settle down. +Jan 17 19:59:56 linux-6380 kernel: PM: Syncing filesystems ... done. +Jan 17 19:59:56 linux-6380 kernel: PM: Preparing system for sleep (mem) +Jan 17 19:59:56 linux-6380 kernel: Freezing user space processes ... (elapsed 0.001 seconds) done. +Jan 17 19:59:56 linux-6380 kernel: Freezing remaining freezable tasks ... +Jan 17 19:59:56 linux-6380 kernel: Freezing of tasks failed after 20.002 seconds (1 tasks refusing to freeze, wq_busy=0): +Jan 17 19:59:56 linux-6380 kernel: xfsaild/dm-5 S 00000000 0 1293 2 0x00000080 +Jan 17 19:59:56 linux-6380 kernel: f0ef5f00 00000046 00000200 00000000 ffff9022 c02d3800 00000000 00000032 +Jan 17 19:59:56 linux-6380 kernel: ee0b2400 00000032 f71e0d00 f36fabc0 f0ef2d00 f0ef6000 f0ef2d00 f12f90c0 +Jan 17 19:59:56 linux-6380 kernel: f0ef5f0c c0844e44 00000000 f0ef5f6c f811e0be 00000000 00000000 f0ef2d00 +Jan 17 19:59:56 linux-6380 kernel: Call Trace: +Jan 17 19:59:56 linux-6380 kernel: [] schedule+0x34/0x90 +Jan 17 19:59:56 linux-6380 kernel: [] xfsaild+0x5de/0x600 [xfs] +Jan 17 19:59:56 linux-6380 kernel: [] kthread+0x9b/0xb0 +Jan 17 19:59:56 linux-6380 kernel: [] ret_from_kernel_thread+0x21/0x38 + +The issue has been there for quite some time but it has been made +visible by only by 24ba16bb3d49 ("xfs: clear PF_NOFREEZE for xfsaild +kthread") because the suspend started seeing xfsaild. + +The above commit has missed that the !xfs_ail_min branch might call +schedule with TASK_INTERRUPTIBLE without calling try_to_freeze so the pm +suspend would wake up the kernel thread over and over again without any +progress. What we want here is to use freezable_schedule instead to hide +the thread from the suspend. + +While we are here also change schedule_timeout to freezable variant to +prevent from spurious wakeups by suspend. + +[dchinner: re-add set_freezeable call so the freezer will account properly + for this kthread. ] + +Reported-by: Hendrik Woltersdorf +Signed-off-by: Michal Hocko +Reviewed-by: Dave Chinner +Signed-off-by: Dave Chinner +--- + fs/xfs/xfs_trans_ail.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c +index 4f18fd9..d6c9c3e 100644 +--- a/fs/xfs/xfs_trans_ail.c ++++ b/fs/xfs/xfs_trans_ail.c +@@ -497,6 +497,7 @@ xfsaild( + long tout = 0; /* milliseconds */ + + current->flags |= PF_MEMALLOC; ++ set_freezable(); + + while (!kthread_should_stop()) { + if (tout && tout <= 20) +@@ -519,14 +520,14 @@ xfsaild( + if (!xfs_ail_min(ailp) && + ailp->xa_target == ailp->xa_target_prev) { + spin_unlock(&ailp->xa_lock); +- schedule(); ++ freezable_schedule(); + tout = 0; + continue; + } + spin_unlock(&ailp->xa_lock); + + if (tout) +- schedule_timeout(msecs_to_jiffies(tout)); ++ freezable_schedule_timeout(msecs_to_jiffies(tout)); + + __set_current_state(TASK_RUNNING); + +-- +cgit v0.12 +