linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Daeho Jeong <daeho.jeong@samsung.com>
To: axboe@kernel.dk, tytso@mit.edu, adilger.kernel@dilger.ca,
	jack@suse.com, linux-block@vger.kernel.org, linux-mm@kvack.org,
	linux-ext4@vger.kernel.org
Cc: Daeho Jeong <daeho.jeong@samsung.com>
Subject: [RFC 3/3] ext4: tag asynchronous writeback io
Date: Wed, 17 Aug 2016 14:20:45 +0900	[thread overview]
Message-ID: <1471411245-5186-4-git-send-email-daeho.jeong@samsung.com> (raw)
In-Reply-To: <1471411245-5186-1-git-send-email-daeho.jeong@samsung.com>

Set the page with PG_asyncwb and PG_plugged, and set the bio with
BIO_ASYNC_WB when submitting asynchronous writeback I/O in order to
mark which pages are flushed as asynchronous writeback I/O and which
one stays in the plug list.

Signed-off-by: Daeho Jeong <daeho.jeong@samsung.com>
---
 fs/ext4/page-io.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index 2a01df9..5912e59 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -370,6 +370,10 @@ static int io_submit_init_bio(struct ext4_io_submit *io,
 	bio->bi_private = ext4_get_io_end(io->io_end);
 	io->io_bio = bio;
 	io->io_next_block = bh->b_blocknr;
+#ifdef CONFIG_BOOST_URGENT_ASYNC_WB
+	if (io->io_wbc->sync_mode == WB_SYNC_NONE)
+		bio->bi_flags |= (1 << BIO_ASYNC_WB);
+#endif
 	return 0;
 }
 
@@ -416,6 +420,13 @@ int ext4_bio_write_page(struct ext4_io_submit *io,
 	BUG_ON(!PageLocked(page));
 	BUG_ON(PageWriteback(page));
 
+#ifdef CONFIG_BOOST_URGENT_ASYNC_WB
+	if (wbc->sync_mode == WB_SYNC_NONE) {
+		SetPagePlugged(page);
+		SetPageAsyncWB(page);
+	}
+#endif
+
 	if (keep_towrite)
 		set_page_writeback_keepwrite(page);
 	else
-- 
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      parent reply	other threads:[~2016-08-17  5:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17  5:20 [RFC 0/3] Add the feature of boosting urgent asynchronous writeback I/O Daeho Jeong
2016-08-17  5:20 ` [RFC 1/3] block, mm: add support for boosting urgent asynchronous writeback io Daeho Jeong
2016-08-17  5:20 ` [RFC 2/3] cfq: add cfq_find_async_wb_req Daeho Jeong
2016-08-17  5:20 ` Daeho Jeong [this message]

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=1471411245-5186-4-git-send-email-daeho.jeong@samsung.com \
    --to=daeho.jeong@samsung.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=axboe@kernel.dk \
    --cc=jack@suse.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --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