From: Andrea Arcangeli <andrea@suse.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4.19pre10aa3
Date: Thu, 20 Jun 2002 16:40:33 +0200 [thread overview]
Message-ID: <20020620144033.GL10718@dualathlon.random> (raw)
In-Reply-To: <Pine.LNX.4.44.0206201546510.4390-100000@e2>
On Thu, Jun 20, 2002 at 04:05:54PM +0200, Ingo Molnar wrote:
>
> On Thu, 20 Jun 2002, Andrea Arcangeli wrote:
>
> > This fixes the o1 sched bits (so in turn breaks alpha :-/ any patch
> > fixing alpha is welcome of course). Also not yet sure if DaveM is ok
> > with the removal of prepare_to_switch, his last comment on that is
> > negative as far I could see. [...]
>
> his last comment was that it's ok. All prepare_to_switch() functionality
> can be put into prepare_arch_switch() just fine.
>
> The -A4 backport sched.c should pretty much work on Alpha out of box, as
I didn't meant it was difficult to fix, just one more breakage to fix
that is unfixed at the moment so alpha won't compile, just in case
somebody wondered why they couldn't compile on alpha.
> long as you have the 3-argument switch_to() that the vanilla kernel has,
> and use the same _arch_ defines that x86 does - but add the
> prepare_to_switch code to prepare_arch_switch().
>
> > Only in 2.4.19pre10aa3: 21_o1-A4-aa-1
> >
> > Some more incremental O1 cleanup on top of Ingo's changes (note:
> > not all of them, in particular rejected the sched_yield changes
> > that wrongly waits the timeslice to expire before giving the
> > cpu to the next task in the runqueue). [...]
>
> the gradual decreasing of timeslices is intentional, although in the
> simple cases it might not make much of a difference (besides yielding more
> before giving up). But if there is some sort of bouncing around between
> yielding tasks that happen to be at the lowest priority level already then
> we should not be too abrupt about punishing tasks by taking away all their
> timeslices.
>
> the 'extra' yielding done does not matter much, since an expired task will
> likely wait alot of time (many milliseconds) before running again - so the
> extra yielding is amortized greatly.
I will think more about this, however the "besides yielding more
before giving up" is the part I didn't like of it, it should giveup the
cpu immediatly IMHO, no matter if there's only total bouncing, however
while giving up the cpu it also must not lose its timeslice, but that
looked ok before you apparently decreased it in -A4. again, I may be
wrong, need more time to check those bits.
> > [...] Also the rq_lock rejected,
> > see the comment on the patch, -preempt is a no-way for 2.4, so
> > we can a bit more efficient thanks to it.
>
> you mean this_rq_lock()? Note that your 21_o1-A4-aa-1 patch does not do
> what is listed, those changes appear to be included in
> 20_o1-sched-updates-A4-1.
correct, this part of the comment really applied to the
20_o1-sched-updates-A4-1, not to 21_o1-A4-aa-1, I wrote it there just
because it was still an o1 topic and I forgot to mention it in the
previous point (should had gone up a few lines before writing it).
> wrt. this_rq_lock(), the only difference should be the ordering of cli vs.
> the assignment of rq - ie. there should be no efficiency difference.
well the microoptimization is to reduce of a few cycles the cli
protected sections, I just didn't see the point in growing them.
however I noticed an smp bug in my changes, I was too aggressive
removing the loop in task_rq_lock, not that such bug ever triggered yet
but the rq may change under us while we take the lock if the task is
getting migrated to another cpu.
You may also want to review the irq-balance changes I made while
integrating it.
thanks,
Andrea
next prev parent reply other threads:[~2002-06-20 14:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-20 5:59 2.4.19pre10aa3 Andrea Arcangeli
2002-06-20 6:04 ` 2.4.19pre10aa3 David S. Miller
2002-06-20 6:30 ` 2.4.19pre10aa3 Andrea Arcangeli
2002-06-20 11:44 ` 2.4.19pre10aa3 Andrey Nekrasov
2002-06-20 13:19 ` 2.4.19pre10aa3 Andrea Arcangeli
2002-06-20 17:03 ` 2.4.19pre10aa3 Andrea Arcangeli
2002-06-20 13:05 ` 2.4.19pre10aa3 J.A. Magallon
2002-06-20 13:32 ` 2.4.19pre10aa3 Andrea Arcangeli
2002-06-20 14:07 ` 2.4.19pre10aa3 Andrea Arcangeli
2002-06-20 14:05 ` 2.4.19pre10aa3 Ingo Molnar
2002-06-20 14:40 ` Andrea Arcangeli [this message]
2002-06-20 14:44 ` 2.4.19pre10aa3 Andrea Arcangeli
2002-06-20 15:40 ` 2.4.19pre10aa3 Heinz Diehl
2002-06-20 22:48 ` 2.4.19pre10aa3 J.A. Magallon
2002-06-21 4:31 ` 2.4.19pre10aa3 Andrea Arcangeli
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=20020620144033.GL10718@dualathlon.random \
--to=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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