public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Aleksandar Milivojevic <amilivojevic@pbl.ca>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
	Andrea Arcangeli <andrea@novell.com>,
	Robert Love <rml@novell.com>, Roland Dreier <roland@topspin.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Preempt? (was Re: Cannot enable DMA on SATA drive (SCSI-libsata, VIA SATA))
Date: Wed, 06 Oct 2004 10:16:08 -0500	[thread overview]
Message-ID: <41640C38.8010600@pbl.ca> (raw)
In-Reply-To: <41636D8B.8020401@pobox.com>

Jeff Garzik wrote:
> You're making my point for me.  If the bandaid (preempt) is not active, 
> then the system can be accurated profiled.  If preempt is active, then 
> it is potentially hiding trouble spots.
> 
> The moral of the story is not to use preempt, as it
> * potentially hides long latency code paths
> * potentially introduces bugs, as we've seen with net stack and many 
> other pieces of code
> * is simply not needed, if all code paths are fixed

One can also look onto it from another angle:
* conviniently resolves long latency code paths that can't be avoided
* uncovers bugs that need to be fixed
* implicitly fixes code paths

It seems to me that you are mixing latency of the system, efficiency of 
the driver functions, and performance of the system in the way it suits 
your arguments.

Those three influent each other, but should be looked at and solved 
separately.

Preempt is a fix for latency.  It doesn't (and can't) fix efficiency and 
performace.  If you are using latency as a measure for efficiency and 
performance, you are mixing apples and oranges with bananas.

Unefficient driver function (or code path) will not become efficient if 
you sprinkle it with cond_resched (it will only reduce the latency of 
the system).  As you conviniently said, you are just putting band aid on 
the problem, instead of fixing it.  Not different than using preept 
kernel, really.  Only more time spent on it by developer, that might be 
used better somewhere else (like making code path more efficient).

Performance of the system might be a bit lower with preempt kernel.  But 
most of those that would notice or care (0.1% of users?  probably less) 
would probably be happier without cond_resched executed thousands a time 
per second too, and would happily sacrifice latency to high performance.

Finally, the bugs.  Bugs need to be fixed.  Period.  If bug goes away 
when somebody turns off preempt on uniprocessor system, it may as well 
hit back when you move to non-preempt SMP system in even more obscure 
ways (because than you really have code paths executed in parallel). 
Telling somebody to try with non-preempt kernel should be debugging 
step, not the solution.

-- 
Aleksandar Milivojevic <amilivojevic@pbl.ca>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7

  parent reply	other threads:[~2004-10-06 15:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4136E7EF00073144@mail-3.tiscali.it>
2004-10-06  0:30 ` Cannot enable DMA on SATA drive (SCSI-libsata, VIA SATA) Gianluca Cecchi
2004-10-06  0:54   ` Jeff Garzik
2004-10-06  1:00     ` Preempt? (was Re: Cannot enable DMA on SATA drive (SCSI-libsata, VIA SATA)) Roland Dreier
2004-10-06  1:11       ` Jeff Garzik
2004-10-06  1:28         ` Nick Piggin
2004-10-06  1:32           ` Nick Piggin
2004-10-06  1:40           ` Jeff Garzik
2004-10-06  1:52             ` Robert Love
2004-10-06  1:55               ` Jeff Garzik
2004-10-06  2:02                 ` Nick Piggin
2004-10-06  2:07                   ` Jeff Garzik
2004-10-06  2:28                     ` Nick Piggin
2004-10-06  3:17                     ` Andrea Arcangeli
2004-10-06  3:27                       ` Jeff Garzik
2004-10-06  3:43                         ` Nick Piggin
2004-10-06  3:59                           ` Jeff Garzik
2004-10-06  4:05                             ` Lee Revell
2004-10-06  4:22                             ` Nick Piggin
2004-10-06 15:16                             ` Aleksandar Milivojevic [this message]
2004-10-06  4:03                         ` Andrea Arcangeli
2004-10-06  4:08                           ` Jeff Garzik
2004-10-06  4:16                             ` Lee Revell
2004-10-06  4:26                             ` Nick Piggin
2004-10-06  4:46                             ` Andrew Morton
2004-10-06  6:04                               ` Jeff Garzik
2004-10-06  6:16                                 ` Andrew Morton
2004-10-06 13:38                                   ` Jeff Sipek
2004-10-06  4:12                         ` Lee Revell
2004-10-06  3:34                       ` Nick Piggin
2004-10-06  2:07                 ` Robert Love
2004-10-06  2:30                   ` Nick Piggin

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=41640C38.8010600@pbl.ca \
    --to=amilivojevic@pbl.ca \
    --cc=andrea@novell.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=rml@novell.com \
    --cc=roland@topspin.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