lkml.org 
[lkml]   [2009]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] writeback: merely wakeup flusher thread if work allocation fails for WB_SYNC_NONE
> +	/*
> + * WB_SYNC_NONE is opportunistic writeback. If this allocation fails,
> + * bdi_queue_work() will wake up the thread and flush old data. This
> + * should ensure some amount of progress in freeing memory.
> + */
> + if (wbc->sync_mode != WB_SYNC_ALL) {
> + struct bdi_work *w = bdi_alloc_work(wbc);
>
> + bdi_queue_work(wbc->bdi, w);
> + } else {
> + struct bdi_work work;
>
> + bdi_work_init(&work, wbc);
> + work.state |= WS_ONSTACK;
>
> + bdi_queue_work(wbc->bdi, &work);
> + bdi_wait_on_work_clear(&work);

That's even nice than my version, great.



\
 
 \ /
  Last update: 2009-09-11 20:01    [W:0.081 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site