From: "Kyungmin Park" <kmpark@infradead.org>
To: "'Thomas Petazzoni'" <thomas.petazzoni@free-electrons.com>
Cc: "'Linux Filesystem Mailing List'" <linux-fsdevel@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: RE: Question about synchronous write on SSD
Date: Tue, 19 Feb 2008 18:39:43 +0900 [thread overview]
Message-ID: <002f01c872db$69c854c0$1fa9580a@swcenter.sec.samsung.co.kr> (raw)
In-Reply-To: <20080219091608.1da174c1@crazy>
> Le Tue, 19 Feb 2008 14:48:18 +0900,
> "Kyungmin Park" <kmpark@infradead.org> a écrit :
>
> > + /* Write synchronous */
> > + bio->bi_rw |= (1 << BIO_RW_SYNC);
>
> Adding BIO_RW_SYNC doesn't make generic_make_request() synchronous as
> in "generic_make_request() returns only after write completion".
> BIO_RW_SYNC only asks the I/O layer to unplug immediatly. But
> generic_make_request() still returns before the completion of the I/O,
> and the completion is notified asynchronously.
>
Agree, however see the following sequence.
__generic_make_request call q->make_request_fn(q, bio);
It was set by blk_init_queue_node with __make_request.
There are two ways in __make_request.
Case 1, get_rq
Case 2, out or merged (otherwise you mean unplug case)
In case 1, if the BIO_RW_SYNC is set, the request gets the REQ_RW_SYNC
And REQ_RW_SYNC says
"include/linux/blkdev.h":112: __REQ_RW_SYNC, /* request is sync (O_DIRECT) */
It means it acts as O_DIRECT flag. Is it right?
And it also is same as case 2. Unplug the device.
So next time it hasn't chance to merge???
Is it right?
BR,
Kyungmin Park
next prev parent reply other threads:[~2008-02-19 9:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 5:48 Kyungmin Park
2008-02-19 8:16 ` Thomas Petazzoni
2008-02-19 9:39 ` Kyungmin Park [this message]
2008-02-19 9:43 ` Jens Axboe
2008-02-19 9:55 ` Kyungmin Park
2008-02-19 10:00 ` 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='002f01c872db$69c854c0$1fa9580a@swcenter.sec.samsung.co.kr' \
--to=kmpark@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
/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
all inboxes | Powered by JetHome®