linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A thought about IO scheduler in linux kernel for SSD
@ 2013-10-23  0:47 韩磊
  2013-10-23 10:59 ` Jan Kara
  0 siblings, 1 reply; 8+ messages in thread
From: 韩磊 @ 2013-10-23  0:47 UTC (permalink / raw)
  To: linux-kernel

Nowadays,the IO schedulers in linux kernel have four types:

deadline,noop,Anticiptory and CFQ.CFQ is the default scheduler.But CFQ is

not a good scheduler for SSD,dealine may be a good choice.
When deadline runs,it has a mount of computation about merging and

sorting.Merge has three types: front_merge,no_merge and back_merge.
Why don't have  another type: merge based same sector.For example,it have

two bios in a request list,theyboth have the same bi->sector,the bi->size

maybe not equal. Whether can we put the latter bio replace the former?What

do you find that significant?Or the other levels in OS has finished this
function?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: A thought about IO scheduler in linux kernel for SSD
  2013-10-23  0:47 A thought about IO scheduler in linux kernel for SSD 韩磊
@ 2013-10-23 10:59 ` Jan Kara
  2013-10-25  3:10   ` 韩磊
  2013-10-25  4:02   ` Ming Lei
  0 siblings, 2 replies; 8+ messages in thread
From: Jan Kara @ 2013-10-23 10:59 UTC (permalink / raw)
  To: 韩磊; +Cc: linux-kernel

On Wed 23-10-13 08:47:44, 韩磊 wrote:
> Nowadays,the IO schedulers in linux kernel have four types:
> 
> deadline,noop,Anticiptory and CFQ.CFQ is the default scheduler.But CFQ is
> not a good scheduler for SSD,dealine may be a good choice.

> When deadline runs,it has a mount of computation about merging and
> sorting.Merge has three types: front_merge,no_merge and back_merge.
> Why don't have  another type: merge based same sector.For example,it have
> two bios in a request list,theyboth have the same bi->sector,the bi->size
> maybe not equal. Whether can we put the latter bio replace the former?What
> do you find that significant?Or the other levels in OS has finished this
> function?
  That doesn't make much sense to me. If there are two bios in flight for
some sector, results are undefined. Thus we usually avoid such situation
(usually we want to have defined contents of the disk :). The exclusion is
usually achieved at higher level using page locking etc. So adding code
speeding up such requests doesn't seem worth it.

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: A thought about IO scheduler in linux kernel for SSD
  2013-10-23 10:59 ` Jan Kara
@ 2013-10-25  3:10   ` 韩磊
  2013-10-25  8:20     ` Jan Kara
  2013-10-25  4:02   ` Ming Lei
  1 sibling, 1 reply; 8+ messages in thread
From: 韩磊 @ 2013-10-25  3:10 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-kernel

2013/10/23 Jan Kara <jack@suse.cz>:
> On Wed 23-10-13 08:47:44, 韩磊 wrote:
>> Nowadays,the IO schedulers in linux kernel have four types:
>>
>> deadline,noop,Anticiptory and CFQ.CFQ is the default scheduler.But CFQ is
>> not a good scheduler for SSD,dealine may be a good choice.
>
>   That doesn't make much sense to me. If there are two bios in flight for
> some sector, results are undefined. Thus we usually avoid such situation
> (usually we want to have defined contents of the disk :). The exclusion is
> usually achieved at higher level using page locking etc. So adding code
> speeding up such requests doesn't seem worth it.
>
>                                                                 Honza
> --
> Jan Kara <jack@suse.cz>
> SUSE Labs, CR

Do you mean that the probability of two bios have the same start
sector in request list at this level is very low??Discuss with you
is a kind of enjoyment.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: A thought about IO scheduler in linux kernel for SSD
  2013-10-23 10:59 ` Jan Kara
  2013-10-25  3:10   ` 韩磊
@ 2013-10-25  4:02   ` Ming Lei
  2013-10-25  5:00     ` 韩磊
  1 sibling, 1 reply; 8+ messages in thread
From: Ming Lei @ 2013-10-25  4:02 UTC (permalink / raw)
  To: Jan Kara; +Cc: 韩磊, Linux Kernel Mailing List

On Wed, Oct 23, 2013 at 6:59 PM, Jan Kara <jack@suse.cz> wrote:
> On Wed 23-10-13 08:47:44, 韩磊 wrote:
>> Nowadays,the IO schedulers in linux kernel have four types:
>>
>> deadline,noop,Anticiptory and CFQ.CFQ is the default scheduler.But CFQ is
>> not a good scheduler for SSD,dealine may be a good choice.
>
>> When deadline runs,it has a mount of computation about merging and
>> sorting.Merge has three types: front_merge,no_merge and back_merge.
>> Why don't have  another type: merge based same sector.For example,it have
>> two bios in a request list,theyboth have the same bi->sector,the bi->size
>> maybe not equal. Whether can we put the latter bio replace the former?What
>> do you find that significant?Or the other levels in OS has finished this
>> function?
>   That doesn't make much sense to me. If there are two bios in flight for
> some sector, results are undefined. Thus we usually avoid such situation
> (usually we want to have defined contents of the disk :). The exclusion is
> usually achieved at higher level using page locking etc. So adding code
> speeding up such requests doesn't seem worth it.

The situation might be triggered when same file is read from two tasks,
one is read via page cache, and another one is read by O_DIRECT.

But still not sure if that makes sense.

Thanks,
-- 
Ming Lei

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: A thought about IO scheduler in linux kernel for SSD
  2013-10-25  4:02   ` Ming Lei
@ 2013-10-25  5:00     ` 韩磊
  0 siblings, 0 replies; 8+ messages in thread
From: 韩磊 @ 2013-10-25  5:00 UTC (permalink / raw)
  To: Ming Lei; +Cc: Jan Kara, Linux Kernel Mailing List

Thanks for your thought!  It may not make much sense. Because I think
the probability of two bios have the same start sector and the
situation mentioned by Ming Lei is too low.
Thanks ,
Bonben

2013/10/25 Ming Lei <tom.leiming@gmail.com>:
> On Wed, Oct 23, 2013 at 6:59 PM, Jan Kara <jack@suse.cz> wrote:
>> On Wed 23-10-13 08:47:44, 韩磊 wrote:
>>> Nowadays,the IO schedulers in linux kernel have four types:
>>>
>>> deadline,noop,Anticiptory and CFQ.CFQ is the default scheduler.But CFQ is
>>> not a good scheduler for SSD,dealine may be a good choice.
>>
>>> When deadline runs,it has a mount of computation about merging and
>>> sorting.Merge has three types: front_merge,no_merge and back_merge.
>>> Why don't have  another type: merge based same sector.For example,it have
>>> two bios in a request list,theyboth have the same bi->sector,the bi->size
>>> maybe not equal. Whether can we put the latter bio replace the former?What
>>> do you find that significant?Or the other levels in OS has finished this
>>> function?
>>   That doesn't make much sense to me. If there are two bios in flight for
>> some sector, results are undefined. Thus we usually avoid such situation
>> (usually we want to have defined contents of the disk :). The exclusion is
>> usually achieved at higher level using page locking etc. So adding code
>> speeding up such requests doesn't seem worth it.
>
> The situation might be triggered when same file is read from two tasks,
> one is read via page cache, and another one is read by O_DIRECT.
>
> But still not sure if that makes sense.
>
> Thanks,
> --
> Ming Lei

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: A thought about IO scheduler in linux kernel for SSD
  2013-10-25  3:10   ` 韩磊
@ 2013-10-25  8:20     ` Jan Kara
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Kara @ 2013-10-25  8:20 UTC (permalink / raw)
  To: 韩磊; +Cc: Jan Kara, linux-kernel

On Fri 25-10-13 11:10:22, 韩磊 wrote:
> 2013/10/23 Jan Kara <jack@suse.cz>:
> > On Wed 23-10-13 08:47:44, 韩磊 wrote:
> >> Nowadays,the IO schedulers in linux kernel have four types:
> >>
> >> deadline,noop,Anticiptory and CFQ.CFQ is the default scheduler.But CFQ is
> >> not a good scheduler for SSD,dealine may be a good choice.
> >
> >   That doesn't make much sense to me. If there are two bios in flight for
> > some sector, results are undefined. Thus we usually avoid such situation
> > (usually we want to have defined contents of the disk :). The exclusion is
> > usually achieved at higher level using page locking etc. So adding code
> > speeding up such requests doesn't seem worth it.
> >
> >                                                                 Honza
> > --
> > Jan Kara <jack@suse.cz>
> > SUSE Labs, CR
> 
> Do you mean that the probability of two bios have the same start
> sector in request list at this level is very low?
  Yes, that's exactly what I mean. As Ming Lei notes, there are ways how it
could happen (most notably any direct IO user can generate arbitrary number
of bios with the same start sectors). But in none of these cases
performance matters, it is usually a bug in application if that happens.

							Bye
								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 8+ messages in thread

* A thought about IO scheduler in linux kernel for SSD
@ 2013-10-22 13:44 韩磊
  0 siblings, 0 replies; 8+ messages in thread
From: 韩磊 @ 2013-10-22 13:44 UTC (permalink / raw)
  To: linux-kernel

Nowadays,the IO schedulers in linux kernel have four types:

deadline,noop,Anticiptory and CFQ.CFQ is the default scheduler.But CFQ is

not a good scheduler for SSD,dealine may be a good choice.
When deadline runs,it has a mount of computation about merging and

sorting.Merge has three types: front_merge,no_merge and back_merge.
Why don't have  another type: merge based same sector.For example,it have

two bios in a request list,theyboth have the same bi->sector,the bi->size

maybe not equal. Whether can we put the latter bio replace the former?What

do you find that significant?Or the other levels in OS has finished this
function?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* A thought about IO scheduler in linux kernel for SSD
@ 2013-10-22 13:40 韩磊
  0 siblings, 0 replies; 8+ messages in thread
From: 韩磊 @ 2013-10-22 13:40 UTC (permalink / raw)
  To: linux-kernel

Nowadays,the IO schedulers in linux kernel have four types:
deadline,noop,Anticiptory and CFQ.CFQ is the default scheduler.But CFQ
is not a good scheduler for SSD,dealine may be a good choice.
When deadline runs,it has a mount of computation about merging and
sorting.Merge has three types: front_merge,no_merge and back_merge.
Why don't have  another type: merge based same sector.For example,it
have two bios in a request list,theyboth have the same bi->sector,the
bi->size maybe not equal. Whether can we put the latter bio replace
the former?What do you find that significant?Or the other levels in OS
has finished this
function?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-10-25  8:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-23  0:47 A thought about IO scheduler in linux kernel for SSD 韩磊
2013-10-23 10:59 ` Jan Kara
2013-10-25  3:10   ` 韩磊
2013-10-25  8:20     ` Jan Kara
2013-10-25  4:02   ` Ming Lei
2013-10-25  5:00     ` 韩磊
  -- strict thread matches above, loose matches on Subject: below --
2013-10-22 13:44 韩磊
2013-10-22 13:40 韩磊

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).