Messages in this thread Patch in this message | | | From | Nigel Cunningham <> | Subject | [Suspend2][ 07/32] [Suspend2] Wait for bio completion. | Date | Tue, 27 Jun 2006 08:37:31 +1000 |
| |
Submit any outstanding batched I/O, kick kblockd, io_schedule() and see what we can cleanup.
Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
kernel/power/suspend_block_io.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/kernel/power/suspend_block_io.c b/kernel/power/suspend_block_io.c index cfff687..6f8b29e 100644 --- a/kernel/power/suspend_block_io.c +++ b/kernel/power/suspend_block_io.c @@ -310,3 +310,26 @@ static void suspend_cleanup_some_complet spin_unlock_irqrestore(&ioinfo_ready_lock, flags); } +/* do_bio_wait + * + * Actions taken when we want some I/O to get run. + * + * Submit any I/O that's batched up (if we're not already doing + * that, unplug queues, schedule and clean up whatever we can. + */ +static void do_bio_wait(int caller) +{ + int num_submitted = 0; + + nr_schedule_calls[caller]++; + + /* Don't want to wait on I/O we haven't submitted! */ + num_submitted = submit_batched(); + + kblockd_flush(); + + io_schedule(); + + suspend_cleanup_some_completed_io(); +} + -- Nigel Cunningham nigel at suspend2 dot net - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |