From: Saugata Das <saugata.das@linaro.org>
To: Namhyung Kim <namhyung.kim@lge.com>
Cc: Saugata Das <saugata.das@stericsson.com>,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
tytso@mit.edu, adilger@whamcloud.com, hch@infradead.org,
arnd.bergmann@linaro.org, venkat@linaro.org
Subject: Re: [PATCH 1/2] block: add BH_Meta flag
Date: Mon, 14 May 2012 10:24:39 +0530 [thread overview]
Message-ID: <CAKLKtzfp1pue1f6Ht9vEUS4mv0sOZhrjaS4b_ONgO8j1TsGMTw@mail.gmail.com> (raw)
In-Reply-To: <87wr4f1qsm.fsf@sejong.aot.lge.com>
On 14 May 2012 07:12, Namhyung Kim <namhyung.kim@lge.com> wrote:
> Hi,
>
> On Fri, 11 May 2012 20:32:56 +0530, Saugata Das wrote:
>> From: Saugata Das <saugata.das@linaro.org>
>>
>> Today, storage devices like eMMC has special features like data tagging
>> (introduced in MMC-4.5 version) in order to improve performance of some
>> specific writes. On MMC stack, data tagging is used for all writes which
>> has REQ_META flag set. This patch adds the capability to add REQ_META flag
>> during meta data write.
>>
>
> AFAIK, the REQ_META is only for marking a bio/req to be recognized when
> using blktrace or something. You can use REQ_PRIO for the purpose but it
> applies only if your ioscheduler is CFQ.
>
> But I'm not aware how the MMC stack works, so I might be missing something.
>
Today on ext4, REQ_META or REQ_PRIO are only used during read
operation. For meta-data writes, no special flag (REQ_META or
REQ_PRIO) is set.
On eMMC, we depend on REQ_META flag to implement the "reliable write"
and "data tag" feature, which are linked with additional reliability
and performance for file system meta-data writes.
> Thanks,
> Namhyung
>
>
>> Signed-off-by: Saugata Das <saugata.das@linaro.org>
>> ---
>> fs/buffer.c | 10 ++++++++--
>> include/linux/buffer_head.h | 2 ++
>> 2 files changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/fs/buffer.c b/fs/buffer.c
>> index 36d6665..688b38b 100644
>> --- a/fs/buffer.c
>> +++ b/fs/buffer.c
>> @@ -1685,7 +1685,10 @@ static int __block_write_full_page(struct inode *inode, struct page *page,
>> do {
>> struct buffer_head *next = bh->b_this_page;
>> if (buffer_async_write(bh)) {
>> - submit_bh(write_op, bh);
>> + if (buffer_meta(bh))
>> + submit_bh(write_op | REQ_META, bh);
>> + else
>> + submit_bh(write_op, bh);
>> nr_underway++;
>> }
>> bh = next;
>> @@ -1739,7 +1742,10 @@ recover:
>> struct buffer_head *next = bh->b_this_page;
>> if (buffer_async_write(bh)) {
>> clear_buffer_dirty(bh);
>> - submit_bh(write_op, bh);
>> + if (buffer_meta(bh))
>> + submit_bh(write_op | REQ_META, bh);
>> + else
>> + submit_bh(write_op, bh);
>> nr_underway++;
>> }
>> bh = next;
>> diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
>> index ef26043..0776564 100644
>> --- a/include/linux/buffer_head.h
>> +++ b/include/linux/buffer_head.h
>> @@ -34,6 +34,7 @@ enum bh_state_bits {
>> BH_Write_EIO, /* I/O error on write */
>> BH_Unwritten, /* Buffer is allocated on disk but not written */
>> BH_Quiet, /* Buffer Error Prinks to be quiet */
>> + BH_Meta, /* Is meta */
>>
>> BH_PrivateStart,/* not a state bit, but the first bit available
>> * for private allocation by other entities
>> @@ -126,6 +127,7 @@ BUFFER_FNS(Delay, delay)
>> BUFFER_FNS(Boundary, boundary)
>> BUFFER_FNS(Write_EIO, write_io_error)
>> BUFFER_FNS(Unwritten, unwritten)
>> +BUFFER_FNS(Meta, meta)
>>
>> #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK)
>> #define touch_buffer(bh) mark_page_accessed(bh->b_page)
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-05-14 4:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 15:02 [PATCH 1/2] block: add BH_Meta flag Saugata Das
2012-05-11 15:02 ` [PATCH 2/2] ext4: annotate all meta data requests Saugata Das
2012-05-14 1:42 ` [PATCH 1/2] block: add BH_Meta flag Namhyung Kim
2012-05-14 4:54 ` Saugata Das [this message]
2012-05-16 11:57 ` Saugata Das
2012-05-16 12:32 ` Boaz Harrosh
2012-05-16 14:06 ` Saugata Das
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=CAKLKtzfp1pue1f6Ht9vEUS4mv0sOZhrjaS4b_ONgO8j1TsGMTw@mail.gmail.com \
--to=saugata.das@linaro.org \
--cc=adilger@whamcloud.com \
--cc=arnd.bergmann@linaro.org \
--cc=hch@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=namhyung.kim@lge.com \
--cc=saugata.das@stericsson.com \
--cc=tytso@mit.edu \
--cc=venkat@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).