public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jaxboe@fusionio.com>
To: Kyungmin Park <kmpark@infradead.org>
Cc: Shaohua Li <shli@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"jh80.chung@samsung.com" <jh80.chung@samsung.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [RFC PATCH v2] Add new elevator ops for request hint
Date: Thu, 11 Aug 2011 11:01:22 +0200	[thread overview]
Message-ID: <4E439A62.8080201@fusionio.com> (raw)
In-Reply-To: <CAH9JG2WOrB5HTh2JiuVfPsXN2Z+R0gDGQeEoecxrrj9FpGSR+g@mail.gmail.com>

On 2011-08-11 10:56, Kyungmin Park wrote:
> On Thu, Aug 11, 2011 at 5:23 PM, Jens Axboe <jaxboe@fusionio.com> wrote:
>> On 2011-08-11 03:14, Shaohua Li wrote:
>>> 2011/8/11 Shaohua Li <shli@kernel.org>:
>>>> 2011/8/11 Kyungmin Park <kmpark@infradead.org>:
>>>>> Hi Jens
>>>>>
>>>>> Now eMMC device requires the upper layer information to improve the data
>>>>> performance and reliability.
>>>>>
>>>>> . Context ID
>>>>> Using the context information, it can sort out the data internally and improve the performance.
>>>>> The main problem is that it's needed to define "What's the context".
>>>>> Actually I expect cfq queue has own unique ID but it doesn't so decide to use the pid instead
>>>>>
>>>>> . Data Tag
>>>>> Using the Data Tag (1-bit information), It writes the data at SLC area when it's hot data. So it can make the chip more reliable.
>>>>> First I expect the REQ_META but current ext4 doesn't pass the WRITE_META. only use the READ_META. so it needs to investigate it.
>>>>>
>>>>> With these characteristics, it's helpful to teach the device. After some consideration. it's needed to pass out these information at request data structure.
>>>>>
>>>>> Sample usage is following in drivers/mmc/card/block.c
>>>>>
>>>>>        struct elevator_queue *e = md->queue.queue->elevator;
>>>>>        struct request_hint hint;
>>>>>        int ret;
>>>>>
>>>>>        if (e->ops->elevator_get_req_hint_fn && req)
>>>>>                ret = e->ops->elevator_get_req_hint_fn(req, &hint);
>>>> please put this to blkdev.h or similar. directly using it here
>>>> is abnormal.
>>> BTW, we can add a (rq->cmd_flags & REQ_ELVPRIV) check here to make
>>> sure the request is at io scheduler.
>>
>> Yep, that should all go inside elv_get_request_context() or whatever is
>> a good name. I don't want the hint structure, the caller can just check
>> the request flags himself.
> Okay I see, it has to modify the filesystem to send the meta request,
> REQ_META flags to know it from device drivers.

Right, the submitter if the IO is the one that has to decide what is hot
or not.

>> So something like:
>>
>> int elv_get_request_context(struct request_queue *q, struct request *rq)
>> {
>>        struct elevator_queue *e = q->elevator;
>>
>>        if (!(rq->cmd_flags & REQ_ELVPRIV))
>>                return -1;
> Also need to check the !rq case, mmc send the NULL request to wait the
> previous request wait.

No, that would be a usage bug.

-- 
Jens Axboe


  reply	other threads:[~2011-08-11  9:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11  0:42 [RFC PATCH v2] Add new elevator ops for request hint Kyungmin Park
2011-08-11  1:10 ` Shaohua Li
2011-08-11  1:14   ` Shaohua Li
2011-08-11  8:23     ` Jens Axboe
2011-08-11  8:56       ` Kyungmin Park
2011-08-11  9:01         ` Jens Axboe [this message]
2011-08-11 13:33 ` Vivek Goyal
2011-08-11 13:41   ` Jens Axboe
2011-08-11 14:09     ` Vivek Goyal
2011-08-12  2:27       ` Kyungmin Park

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=4E439A62.8080201@fusionio.com \
    --to=jaxboe@fusionio.com \
    --cc=arnd@arndb.de \
    --cc=jh80.chung@samsung.com \
    --cc=kmpark@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shli@kernel.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