[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090911175930.GA19598@infradead.org>
Date: Fri, 11 Sep 2009 13:59:30 -0400
From: Christoph Hellwig <hch@...radead.org>
To: Jens Axboe <jens.axboe@...cle.com>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
chris.mason@...cle.com, hch@...radead.org, tytso@....edu,
akpm@...ux-foundation.org, jack@...e.cz, trond.myklebust@....uio.no
Subject: Re: [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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists