[Top] [All Lists]

Re: XFS and ACPI sleep states compat in 2.5

To: Karol Kozimor <sziwan@xxxxxxxxxxx>
Subject: Re: XFS and ACPI sleep states compat in 2.5
From: Eric Sandeen <sandeen@xxxxxxx>
Date: Tue, 18 Feb 2003 20:43:02 -0600 (CST)
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20030218222854.GA8829@hell.org.pl>
Sender: linux-xfs-bounce@xxxxxxxxxxx
Hi Karol - 

I have actually never looked at this, but just doing some
hacking-by-pattern-matching looks like maybe this is all that is needed
in 2.5, assuming the patch for 2.4 works correctly:

--- /usr/tmp/TmpDir.23920-0/linux/fs/xfs/pagebuf/page_buf.c_1.94        Tue Feb 
18 20:43:38 2003
+++ linux/fs/xfs/pagebuf/page_buf.c     Tue Feb 18 20:34:50 2003
@@ -57,6 +57,7 @@
 #include <linux/sysctl.h>
 #include <linux/proc_fs.h>
 #include <linux/workqueue.h>
+#include <linux/suspend.h>
 #include <support/debug.h>
 #include <support/kmem.h>
@@ -1591,6 +1592,9 @@
        do {
+               if (current->flags & PF_FREEZE)
+                       refrigerator(PF_IOTHREAD);
                if (pbd_active == 1) {
                        pb_daemon_timer.expires = jiffies +


On Tue, 18 Feb 2003, Karol Kozimor wrote:

> Hi,
> It seems that the XFS code (probably page_buf.c) doesn't have any support
> for ACPI sleep states (S3 a.k.a. Suspend-To-RAM, and S4 a.k.a.
> Suspend-To-Disk, or software suspend - swsusp). 
> The problem seems to concentrate on pagebufd (and pagebuf/0) not beeing
> able to enter refrigerator (suspend) properly. Upon entering the S4 state, 
> 2.5.59-61 (as well as 2.4.x-xfs) suspend subsystem fails to stop those 
> kernel threads, and refuses to suspend. After such a trial, pagebufd seems 
> to start sucking up the CPU power greatly, but otherwise works correctly 
> (at least I think so, I failed to notice any filesystem corruption). The S3
> state (only supported in 2.5) actually disregards the warnings of not being
> able to stop pagebufd (part of dmesg attached) and works smoothly, but 
> after resume the pagebufd still uses up the processor.
> I wouldn't bother the list, if the swsusp and ACPI sleep code wasn't
> integrated into the official kernel. Anyway, there exist some patches for
> 2.4.20 kernels and a recent version of XFS that deal with that issue
> perfectly (at least for me, I haven't ecountered any XFS-related problems
> so far using those). One I'm currently using is here:
> http://www.sfo.jp/debian/patch/swsusp/swsusp18.xfs-1.2pre4.patch
> The patch seems trivial (as most patches for swsusp + journalled 
> filesystems are), but alas, I'm no kernel hacker and the structure of
> page_buf.c in 2.5 has changed substantially, so I'm not able to patch it by
> myself. Thanks in advance for any help or hints,
> Best regards,
> -- 
> Karol 'sziwan' Kozimor
> sziwan@xxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>