All of lore.kernel.org
 help / color / mirror / Atom feed
From: Werner Almesberger <wa@almesberger.net>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: [patch] sched-cleanup-2.5.69-A0
Date: Mon, 19 May 2003 13:51:44 -0300	[thread overview]
Message-ID: <20030519135144.A1432@almesberger.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0305191807260.13379-100000@localhost.localdomain>; from mingo@elte.hu on Mon, May 19, 2003 at 06:09:23PM +0200

Ingo Molnar wrote:
> hm, it should in fact have been dead code from 2.5.68 on and upwards.  
> Before that it was called quite often.

Ah, that makes sense: I hit it in 2.5.66 and haven't tried more
recent kernels yet.

> but doing stuff out of the idle thread is not nice i think, there's a fair
> amount of code that does not work out of the idle task.

Yes, that's what I'm a bit worried about. Not calling anything
that may sleep sounds fair enough to me. At least networking
(that is, ARP and TCP) seems to be okay (I'm calling netif_rx,
plus a few simple helper functions, such as flow control, and
dev_alloc_skb), but it would of course be nice to avoid future
pitfalls.

A bit of background: umlsim (http://umlsim.sourceforge.net/)
turns UML into an event-driven simulator. It sits in the idle
thread to handle timeouts (simulation time doesn't move while
there is any pending work). All this is controlled by a master
process that works as a script-driven debugger. What those
scripts do is up to the user, but there's a (currently very
small) set of "library" functions that handle some of the more
common tasks, such as moving packets from one UML to the next.

> Any reason you
> dont start some really-low-prio thread instead? (i could suggest
> SCHED_BATCH but the scheduler doesnt have it :-)

Yes, I could do that, as long as this thread gets only run if there
is really nothing else left to do, but then only this thread runs.
Which is, of course, exactly what the idle thread does.

I could make it yield if anything else is runnable (I already check
for this, but just to panic). I suppose if I just set p->static_prio
to MAX_PRIO-1, this thread that would give me only very few
activations while other processes are runnable ?

Thanks,
- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

  reply	other threads:[~2003-05-19 16:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-19  8:25 [patch] sched-cleanup-2.5.69-A0 Ingo Molnar
2003-05-19 15:13 ` Werner Almesberger
2003-05-19 16:09   ` Ingo Molnar
2003-05-19 16:51     ` Werner Almesberger [this message]
2003-05-19 17:02       ` Ingo Molnar
2003-05-19 17:46         ` Werner Almesberger

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=20030519135144.A1432@almesberger.net \
    --to=wa@almesberger.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@transmeta.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.