Prev: kernel : USB sound problem
Next: [PATCH 1/2] jsm: IRQ handlers doesn't need to have IRQ_DISABLED enabled
From: Linus Torvalds on 2 Oct 2009 11:20 On Fri, 2 Oct 2009, Jens Axboe wrote: > > Mostly they care about throughput, and when they come running because > some their favorite app/benchmark/etc is now 2% slower, I get to hear > about it all the time. So yes, latency is not ignored, but mostly they > yack about throughput. The reason they yack about it is that they can measure it. Give them the benchmark where it goes the other way, and tell them why they see a 2% deprovement. Give them some button they can tweak, because they will. But make the default be low-latency. Because everybody cares about low latency, and the people who do so are _not_ the people who you give buttons to tweak things with. > I agree, we can easily make CFQ be very about about latency. If you > think that is fine, then lets just do that. Then we'll get to fix the > server side up when the next RHEL/SLES/whatever cycle is honing in on a > kernel, hopefully we wont have to start over when that happens. I really think we should do latency first, and throughput second. It's _easy_ to get throughput. The people who care just about throughput can always just disable all the work we do for latency. If they really care about just throughput, they won't want fairness either - none of that complex stuff. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Vivek Goyal on 2 Oct 2009 11:40 On Fri, Oct 02, 2009 at 05:27:55PM +0200, Corrado Zoccolo wrote: > On Fri, Oct 2, 2009 at 2:49 PM, Vivek Goyal <vgoyal(a)redhat.com> wrote: > > On Fri, Oct 02, 2009 at 12:55:25PM +0200, Corrado Zoccolo wrote: > > > > Actually I am not touching this code. Looking at the V10, I have not > > changed anything here in idling code. > > I based my analisys on the original patch: > http://lkml.indiana.edu/hypermail/linux/kernel/0907.1/01793.html > Oh.., you are talking about fairness for seeky process patch. I thought you are talking about current IO controller patches. Actually they both have this notion of "fairness=1" parameter but do different things in patches, hence the confusion. Thanks Vivek > Mike, can you confirm which version of the fairness patch did you use > in your tests? > > Corrado > > > Thanks > > Vivek > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Corrado Zoccolo on 2 Oct 2009 11:40 On Fri, Oct 2, 2009 at 2:49 PM, Vivek Goyal <vgoyal(a)redhat.com> wrote: > On Fri, Oct 02, 2009 at 12:55:25PM +0200, Corrado Zoccolo wrote: > > Actually I am not touching this code. Looking at the V10, I have not > changed anything here in idling code. I based my analisys on the original patch: http://lkml.indiana.edu/hypermail/linux/kernel/0907.1/01793.html Mike, can you confirm which version of the fairness patch did you use in your tests? Corrado > Thanks > Vivek > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Mike Galbraith on 2 Oct 2009 11:40 On Fri, 2009-10-02 at 17:27 +0200, Corrado Zoccolo wrote: > On Fri, Oct 2, 2009 at 2:49 PM, Vivek Goyal <vgoyal(a)redhat.com> wrote: > > On Fri, Oct 02, 2009 at 12:55:25PM +0200, Corrado Zoccolo wrote: > > > > Actually I am not touching this code. Looking at the V10, I have not > > changed anything here in idling code. > > I based my analisys on the original patch: > http://lkml.indiana.edu/hypermail/linux/kernel/0907.1/01793.html > > Mike, can you confirm which version of the fairness patch did you use > in your tests? That would be this one-liner. o CFQ provides fair access to disk in terms of disk time used to processes. Fairness is provided for the applications which have their think time with in slice_idle (8ms default) limit. o CFQ currently disables idling for seeky processes. So even if a process has think time with-in slice_idle limits, it will still not get fair share of disk. Disabling idling for a seeky process seems good from throughput perspective but not necessarily from fairness perspecitve. 0 Do not disable idling based on seek pattern of process if a user has set /sys/block/<disk>/queue/iosched/fairness = 1. Signed-off-by: Vivek Goyal <vgoyal(a)redhat.com> --- block/cfq-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6/block/cfq-iosched.c =================================================================== --- linux-2.6.orig/block/cfq-iosched.c +++ linux-2.6/block/cfq-iosched.c @@ -1953,7 +1953,7 @@ cfq_update_idle_window(struct cfq_data * enable_idle = old_idle = cfq_cfqq_idle_window(cfqq); if (!atomic_read(&cic->ioc->nr_tasks) || !cfqd->cfq_slice_idle || - (cfqd->hw_tag && CIC_SEEKY(cic))) + (!cfqd->cfq_fairness && cfqd->hw_tag && CIC_SEEKY(cic))) enable_idle = 0; else if (sample_valid(cic->ttime_samples)) { if (cic->ttime_mean > cfqd->cfq_slice_idle) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Vivek Goyal on 2 Oct 2009 11:50
On Fri, Oct 02, 2009 at 05:32:00PM +0200, Mike Galbraith wrote: > On Fri, 2009-10-02 at 17:27 +0200, Corrado Zoccolo wrote: > > On Fri, Oct 2, 2009 at 2:49 PM, Vivek Goyal <vgoyal(a)redhat.com> wrote: > > > On Fri, Oct 02, 2009 at 12:55:25PM +0200, Corrado Zoccolo wrote: > > > > > > Actually I am not touching this code. Looking at the V10, I have not > > > changed anything here in idling code. > > > > I based my analisys on the original patch: > > http://lkml.indiana.edu/hypermail/linux/kernel/0907.1/01793.html > > > > Mike, can you confirm which version of the fairness patch did you use > > in your tests? > > That would be this one-liner. > Ok. Thanks. Sorry, I got confused and thought that you are using "io controller patches" with fairness=1. In that case, Corrado's suggestion of refining it further and disabling idling for seeky process only on non-rotational media (SSD and hardware RAID), makes sense to me. Thanks Vivek > o CFQ provides fair access to disk in terms of disk time used to processes. > Fairness is provided for the applications which have their think time with > in slice_idle (8ms default) limit. > > o CFQ currently disables idling for seeky processes. So even if a process > has think time with-in slice_idle limits, it will still not get fair share > of disk. Disabling idling for a seeky process seems good from throughput > perspective but not necessarily from fairness perspecitve. > > 0 Do not disable idling based on seek pattern of process if a user has set > /sys/block/<disk>/queue/iosched/fairness = 1. > > Signed-off-by: Vivek Goyal <vgoyal(a)redhat.com> > --- > block/cfq-iosched.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux-2.6/block/cfq-iosched.c > =================================================================== > --- linux-2.6.orig/block/cfq-iosched.c > +++ linux-2.6/block/cfq-iosched.c > @@ -1953,7 +1953,7 @@ cfq_update_idle_window(struct cfq_data * > enable_idle = old_idle = cfq_cfqq_idle_window(cfqq); > > if (!atomic_read(&cic->ioc->nr_tasks) || !cfqd->cfq_slice_idle || > - (cfqd->hw_tag && CIC_SEEKY(cic))) > + (!cfqd->cfq_fairness && cfqd->hw_tag && CIC_SEEKY(cic))) > enable_idle = 0; > else if (sample_valid(cic->ttime_samples)) { > if (cic->ttime_mean > cfqd->cfq_slice_idle) > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |