From: Christoph Hellwig <hch@infradead.org>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
chris.mason@oracle.com, hch@infradead.org, tytso@mit.edu,
akpm@linux-foundation.org, jack@suse.cz,
trond.myklebust@fys.uio.no
Subject: Re: [PATCH 1/4] writeback: merely wakeup flusher thread if work allocation fails for WB_SYNC_NONE
Date: Fri, 11 Sep 2009 13:59:30 -0400 [thread overview]
Message-ID: <20090911175930.GA19598@infradead.org> (raw)
In-Reply-To: <1252669832-13553-2-git-send-email-jens.axboe@oracle.com>
> + /*
> + * 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.
next prev parent reply other threads:[~2009-09-11 17:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 11:50 [PATCH 0/4] Post merge per-bdi writeback patches Jens Axboe
2009-09-11 11:50 ` [PATCH 1/4] writeback: merely wakeup flusher thread if work allocation fails for WB_SYNC_NONE Jens Axboe
2009-09-11 17:59 ` Christoph Hellwig [this message]
2009-09-11 11:50 ` [PATCH 2/4] Assign bdi in super_block Jens Axboe
2009-09-11 18:01 ` Christoph Hellwig
2009-09-11 18:12 ` Jens Axboe
2009-09-11 18:16 ` Christoph Hellwig
2009-09-11 11:50 ` [PATCH 3/4] writeback: only use bdi_writeback_all() for WB_SYNC_NONE writeout Jens Axboe
2009-09-11 18:09 ` Christoph Hellwig
2009-09-11 18:14 ` Jens Axboe
2009-09-13 18:20 ` Jens Axboe
2009-09-11 11:50 ` [PATCH 4/4] writeback: use RCU to protect bdi_list Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090911175930.GA19598@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=chris.mason@oracle.com \
--cc=jack@suse.cz \
--cc=jens.axboe@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=trond.myklebust@fys.uio.no \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome