lkml.org 
[lkml]   [2006]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[Suspend2][ 07/32] [Suspend2] Wait for bio completion.
    Date
    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/

    \
     
     \ /
      Last update: 2006-06-27 01:20    [W:0.021 / U:3.052 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site