public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Christoph Hellwig <hch@infradead.org>,
	Andrew Morton <akpm@osdl.org>,
	Arjan van de Ven <arjanv@infradead.org>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch] Voluntary Kernel Preemption, 2.6.12-rc4-mm2
Date: Tue, 24 May 2005 17:09:50 +0200	[thread overview]
Message-ID: <20050524150950.GA10736@elte.hu> (raw)
In-Reply-To: <20050524145636.GA15943@infradead.org>


* Christoph Hellwig <hch@infradead.org> wrote:

> I still disagree with this one violently. [...]

(then you must be disagreeing with CONFIG_PREEMPT too to a certain 
degree i guess?)

> [...] If you want a cond_resched() add it where nessecary, but don't 
> hide it behind might_sleep - there could be quite a lot might_sleeps 
> in common codepathes and they should stay purely a debug aid.

The recent prolifation of might_sleep() points was a direct result of 
the -VP patch. I _did_ measure and lay out the might_sleep()s so that 
key latency paths get cut. If we did what you propose we'd end up
duplicating 95% of the current might_sleep() invocations. So instead of
sprinking the source with cond_resched()s, we implicitly get them via
might_sleep().

there's another argument as well: if a function truly might sleep, it's 
in most cases complex enough to not worry about one extra need_resched() 
check. So might_sleep() and cond_resched() pair better than one would 
think.

(it is also a debugging helper: by actually sleeping at might_sleep() 
points we truly explore whether preemption at that point is safe.)

or if you think we can get away with using just a couple of 
cond_resched()s then you are my guest to prove me wrong: take the -RT 
kernel it has both -VP and the latency measurement tools integrated, and 
remove the cond_resched() from might_sleep() and try to find the points 
that are necessary to cut down latencies so that they fall into the 
1msec range on typical hw.

	Ingo

  reply	other threads:[~2005-05-24 15:10 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-24 12:15 [patch] remove set_tsk_need_resched() from init_idle() Ingo Molnar
2005-05-24 13:21 ` [patch] Voluntary Kernel Preemption, 2.6.12-rc4-mm2 Ingo Molnar
2005-05-24 14:56   ` Christoph Hellwig
2005-05-24 15:09     ` Ingo Molnar [this message]
2005-05-24 15:21       ` Nick Piggin
2005-05-24 15:33         ` Arjan van de Ven
2005-05-24 15:34           ` Nick Piggin
2005-05-24 15:39         ` Ingo Molnar
2005-05-24 15:59           ` Nick Piggin
2005-05-24 16:11             ` Ingo Molnar
2005-05-25 19:48       ` Christoph Hellwig
2005-05-24 14:06 ` [patch] remove set_tsk_need_resched() from init_idle() Ingo Molnar
2005-05-24 15:02   ` Nick Piggin
2005-05-24 15:05     ` Ingo Molnar
2005-05-24 15:24       ` Nick Piggin
2005-05-24 15:27         ` Ingo Molnar
2005-05-24 15:42           ` Ingo Molnar
2005-05-24 16:00             ` Nick Piggin
2005-05-25 12:24             ` Andrew Morton
2005-05-25 13:51               ` Ingo Molnar
2005-05-25 13:58                 ` Ingo Molnar
2005-05-28 16:32                 ` Russell King
2005-05-28 18:51                   ` Ingo Molnar
2005-05-29  4:05                     ` Nick Piggin
2005-05-29  6:01                       ` Ingo Molnar

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=20050524150950.GA10736@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=arjanv@infradead.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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