public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: Andrea Arcangeli <andrea@suse.de>
Cc: "Dieter Nützel" <Dieter.Nuetzel@hamburg.de>,
	"Andrew Morton" <akpm@zip.com.au>, "Chris Mason" <mason@suse.com>,
	"Beau Kuiper" <kuib-kl@ljbc.wa.edu.au>,
	"Linux Kernel List" <linux-kernel@vger.kernel.org>,
	"ReiserFS List" <reiserfs-list@namesys.com>
Subject: Re: [PATCH] Significant performace improvements on reiserfs systems
Date: 20 Sep 2001 19:41:45 -0400	[thread overview]
Message-ID: <1001029314.6941.19.camel@phantasy> (raw)
In-Reply-To: <20010921011514.M729@athlon.random>
In-Reply-To: <20010920170812.CCCACE641B@ns1.suse.com> <3BAA29C2.A9718F49@zip.com.au> <1001019170.6090.134.camel@phantasy> <200109202112.f8KLCXG16849@zero.tech9.net> <1001024694.6048.246.camel@phantasy> <20010921003742.I729@athlon.random> <1001026597.6048.278.camel@phantasy>  <20010921011514.M729@athlon.random>

On Thu, 2001-09-20 at 19:15, Andrea Arcangeli wrote:
> All I'm saying is that you should check for >= 0, not == 0.

And I am saying we already keep track of that, we have a preemption
counter.

> But anwyays it's pretty depressing to see such a costly check needed to
> get latency right with the preemptive kernel approch, with
> non-preemptive kernel we'd need to just check need_resched and a call
> schedule in the unlikely case so it would be even lighter :) and no
> fixed costs in UP spinlocks, per-cpu datastrctures etc... The point of
> preemptive kernel would be just to prevent us to put such kind of
> explicit (costly) checks in the code. My theory was that the cpu-costly
> loops are mostly protected by some lock anyways and the fact you're
> writing such horrid (but helpful) code is a kind of proof.

Well, with the preemptive kernel we already account for 90% of the high
latency areas.

Doing the "horrid" solution may solve some other issues, but agreeably
you are right its not the prettiest solution.

I don't agree, however, that its that much more costly, and maybe I am
missing something.  Assuming we are SMP (and thus have locks), where is
there a lot more overhead?  We check current->need_resched (which we
dont _have_ to), call unlock_kernel() and then call lock_kernel(), with
preemption happening automatically in between.  The preemption code
merely checks a counter and calls preempt_schedule() if needed.

Now, yes, this is not ideal.  Ideally we don't need any of this muck. 
Ideally preemption provides everything we need.  So, towards the future,
we can work towards that.  For very short locks, we could just disable
interrupts (a lot less overhead).  For long-held locks, we can replace
them with a more efficient lock -- spin-then-sleep or a
priority-inheriting mutex lock, for example.

I don't want to confuse the above, which is perhaps an ideal system for
inclusion in 2.5, with trying to lower latency further for those who
care via conditional scheduling and the such.

We already have average latency of <1ms with peaks 10-50ms.

-- 
Robert M. Love
rml at ufl.edu
rml at tech9.net


  reply	other threads:[~2001-09-20 23:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010920170812.CCCACE641B@ns1.suse.com>
2001-09-20 17:19 ` [PATCH] Significant performace improvements on reiserfs systems Chris Mason
2001-09-20 17:39   ` Andrew Morton
2001-09-20 20:52     ` Robert Love
2001-09-20 21:11       ` Dieter Nützel
     [not found]       ` <200109202112.f8KLCXG16849@zero.tech9.net>
2001-09-20 22:24         ` Robert Love
2001-09-20 22:37           ` Andrea Arcangeli
2001-09-20 22:56             ` Robert Love
2001-09-20 23:15               ` Andrea Arcangeli
2001-09-20 23:41                 ` Robert Love [this message]
2001-09-21  0:37                 ` george anzinger
2001-09-21  1:20                   ` Andrew Morton
2001-09-21  3:14                     ` Robert Love
2001-09-21  9:32                     ` [reiserfs-list] " Nikita Danilov
2001-09-21 12:18                       ` Alan Cox
2001-09-21 12:31                         ` Nikita Danilov
2001-09-23 23:49                         ` Rusty Russell
2001-09-20 18:47   ` Andrea Arcangeli
2001-09-20 18:58     ` Andrew Morton
2001-09-20 19:13       ` Andrea Arcangeli
     [not found] <200109201708.f8KH8sG15617@zero.tech9.net>
2001-09-20 20:48 ` Robert Love
2001-09-20 17:08 Dieter Nützel

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=1001029314.6941.19.camel@phantasy \
    --to=rml@tech9.net \
    --cc=Dieter.Nuetzel@hamburg.de \
    --cc=akpm@zip.com.au \
    --cc=andrea@suse.de \
    --cc=kuib-kl@ljbc.wa.edu.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@suse.com \
    --cc=reiserfs-list@namesys.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