All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@mvista.com>
To: Andrea Arcangeli <andrea@suse.de>
Cc: "J.A. Magallon" <jamagallon@able.es>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] updated O(1) scheduler for 2.4
Date: 29 May 2002 11:03:14 -0700	[thread overview]
Message-ID: <1022695394.985.13.camel@sinai> (raw)
In-Reply-To: <20020529151552.GJ31701@dualathlon.random>

On Wed, 2002-05-29 at 08:15, Andrea Arcangeli wrote:

> I merged it and I've almost finished moving everything on top of it but
> I've a few issues.
> 
> can you elaborate why you __save_flags in do_fork? do_fork is even a
> blocking operation. fork_by_hand runs as well with irq enabled.
> I don't like to safe flags in a fast path if it's not required.

s/you/Ingo/ ;)

We save flags for two reasons: First, we touch task->time_slice which is
touched from an interrupt handler (timer/idle/scheduler_tick) and second
because we may call scheduler_tick which must be called with interrupts
off.  Note we restore them just a few lines later...

Or, hm, are you asking why not just cli/sti?  I don't know the answer to
that... I would think we always enter do_fork with interrupts enabled,
but maybe Ingo thought otherwise.

> Then there are longstanding bugs that aren't yet fixed and I ported the
> fixed on top of it (see the parent-timeslice patch in -aa).
> 
> the child-run first approch in o1 is suspect, it seems the parent will
> keep running just after a wasteful reschedule, a sched yield instead
> should be invoked like in -aa in the share-timeslice patch in order to
> roll the current->run_list before the schedule is invoked while
> returning to userspace after fork.

I do not see this...

> another suspect thing I noticed is the wmb() in resched_task. Can you
> elaborate on what is it trying to serialize (I hope not the read of
> p->need_resched with the stuff below)? Also if something it should be a
> smp_wmb(), same smp_ prefix goes for the other mb() in schedule.

I suspect you may be right here.  I believe the wmb() is to serialize
the reading of need_resched vs the writing of need_resched below it vs
whatever may happen to need_resched elsewhere.

But resched_task is the only bit from 2.5 I have not fully back
ported...take a look at resched_task in 2.5: I need to bring that to
2.4.  I suspect idle polling is broken in 2.4, too.

> thanks,

You are welcome ;)

	Robert Love



  reply	other threads:[~2002-05-29 18:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-21  0:06 [PATCH] updated O(1) scheduler for 2.4 Robert Love
2002-05-24 16:02 ` J.A. Magallon
2002-05-29  2:57   ` Robert Love
2002-05-29 15:15     ` Andrea Arcangeli
2002-05-29 18:03       ` Robert Love [this message]
2002-05-29 19:13         ` Andrea Arcangeli
2002-05-29 19:58           ` Robert Love

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=1022695394.985.13.camel@sinai \
    --to=rml@mvista.com \
    --cc=andrea@suse.de \
    --cc=jamagallon@able.es \
    --cc=linux-kernel@vger.kernel.org \
    /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.