<div>Hi, </div><div><br></div><div>I am looking into suspend to RAM on a Freescale MX51 running a 2.6.31 kernel. The</div><div>system suspends and resumes OK except when an SD card is mounted.</div><div><br></div><div>What happens then is that it finds a page which is being written to disk (writeback flag is set), so it waits forever in uninterruptible state for the write to finish, which never happens.</div>
<div><br></div><div>I was expecting the filesystem sync previous to the tasks freezing to have written all page caches to disk.</div><div><br></div><div>Any suggestion as to how to debug this forward?</div><div><br></div>
<div>Thanks in advance, </div><div>Alex </div><div><br></div><div>INFO: task sh:595 blocked for more than 120 seconds. </div><div>"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. </div>
<div>sh D c02be320 0 595 1 0x00000000 </div><div>[<c02be320>] (schedule+0x300/0x344) from [<c02be388>] (io_schedule+0x24/0x40) </div><div>[<c02be388>] (io_schedule+0x24/0x40) from [<c006fe18>] (sync_page+0x38/0x40) </div>
<div>[<c006fe18>] (sync_page+0x38/0x40) from [<c02be68c>] (__wait_on_bit+0x54/0x9c) </div><div>[<c02be68c>] (__wait_on_bit+0x54/0x9c) from [<c0070070>] (wait_on_page_bit+0xb4/0xcc) </div><div>[<c0070070>] (wait_on_page_bit+0xb4/0xcc) from [<c0075fc8>] (write_cache_pages+0x1fc/0x37c) </div>
<div>[<c0075fc8>] (write_cache_pages+0x1fc/0x37c) from [<c00761ac>] (do_writepages+0x3c/0x54) </div><div>[<c00761ac>] (do_writepages+0x3c/0x54) from [<c0070a80>] (__filemap_fdatawrite_range+0x64/0x6c) </div>
<div>[<c0070a80>] (__filemap_fdatawrite_range+0x64/0x6c) from [<c00714c4>] (filemap_fdatawrite+0x28/0x30) </div><div>[<c00714c4>] (filemap_fdatawrite+0x28/0x30) from [<c00714e4>] (filemap_write_and_wait+0x18/0x3c) </div>
<div>[<c00714e4>] (filemap_write_and_wait+0x18/0x3c) from [<c00b2e68>] (fsync_bdev+0x18/0x38) </div><div>[<c00b2e68>] (fsync_bdev+0x18/0x38) from [<c013d3bc>] (invalidate_partition+0x18/0x34) </div>
<div>[<c013d3bc>] (invalidate_partition+0x18/0x34) from [<c00ca6e0>] (del_gendisk+0x28/0xc8) </div><div>[<c00ca6e0>] (del_gendisk+0x28/0xc8) from [<c01e4c88>] (mmc_blk_remove+0x20/0x3c) </div><div>
[<c01e4c88>] (mmc_blk_remove+0x20/0x3c) from [<c01e0688>] (mmc_bus_remove+0x18/0x20) </div><div>[<c01e0688>] (mmc_bus_remove+0x18/0x20) from [<c01872f8>] (__device_release_driver+0x64/0xa4) </div>
<div>
[<c01872f8>] (__device_release_driver+0x64/0xa4) from [<c01873dc>] (device_release_driver+0x1c/0x28) </div><div>[<c01873dc>] (device_release_driver+0x1c/0x28) from [<c01869f8>] (bus_remove_device+0x9c/0xac) </div>
<div>[<c01869f8>] (bus_remove_device+0x9c/0xac) from [<c01852d0>] (device_del+0x110/0x16c) </div><div>[<c01852d0>] (device_del+0x110/0x16c) from [<c01e073c>] (mmc_remove_card+0x4c/0x60) </div><div>
[<c01e073c>] (mmc_remove_card+0x4c/0x60) from [<c01e1b70>] (mmc_sd_remove+0x24/0x30) </div><div>[<c01e1b70>] (mmc_sd_remove+0x24/0x30) from [<c01e001c>] (mmc_suspend_host+0xc4/0x188) </div><div>[<c01e001c>] (mmc_suspend_host+0xc4/0x188) from [<c01e6860>] (sdhci_suspend+0x58/0x120) </div>
<div>[<c01e6860>] (sdhci_suspend+0x58/0x120) from [<c0188378>] (platform_pm_suspend+0x48/0x54) </div><div>[<c0188378>] (platform_pm_suspend+0x48/0x54) from [<c018a098>] (pm_op+0x30/0x7c) </div><div>
[<c018a098>] (pm_op+0x30/0x7c) from [<c018a86c>] (dpm_suspend_start+0x3ac/0x50c) </div><div>[<c018a86c>] (dpm_suspend_start+0x3ac/0x50c) from [<c006b560>] (suspend_devices_and_enter+0x3c/0x1c4) </div>
<div>[<c006b560>] (suspend_devices_and_enter+0x3c/0x1c4) from [<c006b7a0>] (enter_state+0xb8/0x118) </div><div>[<c006b7a0>] (enter_state+0xb8/0x118) from [<c006afbc>] (state_store+0xa0/0xbc) [<c006afbc>] (state_store+0xa0/0xbc) from [<c0146cd4>] (kobj_attr_store+0x18/0x1c) </div>
<div>[<c0146cd4>] (kobj_attr_store+0x18/0x1c) from [<c00cbd24>] (sysfs_write_file+0x108/0x13c) </div><div>[<c00cbd24>] (sysfs_write_file+0x108/0x13c) from [<c008f7cc>] (vfs_write+0xac/0x128) [<c008f7cc>] (vfs_write+0xac/0x128) from [<c008f8f4>] (sys_write+0x3c/0x68) </div>
<div>[<c008f8f4>] (sys_write+0x3c/0x68) from [<c0025e80>] (ret_fast_</div>