From: Rusty Russell <rusty@rustcorp.com.au>
To: mingo@elte.hu
Cc: Ingo Molnar <mingo@redhat.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [PATCH] I3 sched tweaks...
Date: Thu, 17 Jan 2002 14:37:09 +1100 [thread overview]
Message-ID: <E16R3MT-0004Ji-00@wagner.rustcorp.com.au> (raw)
In-Reply-To: Your message of "Wed, 16 Jan 2002 23:46:45 BST." <Pine.LNX.4.33.0201162343290.18971-100000@localhost.localdomain>
In message <Pine.LNX.4.33.0201162343290.18971-100000@localhost.localdomain> you
write:
>
> On Wed, 16 Jan 2002, Rusty Russell wrote:
>
> > > > 4) scheduler_tick needs no args (p is always equal to current).
> > >
> > > i have not taken this part. We have 'current' calculated in
> > > update_process_times(), so why not pass it along to the scheduler_tick()
> > > function?
> >
> > Because it's redundant. It's *always* p == current (and the code
> > assumes this!), but I had to grep the callers to find out.
>
> we pass pointers across functions regularly, even if the pointer could be
> calculated within the function. We do this in the timer code too.
Look at it semantically: scheduler_tick() is just a function called
regularly for scheduler maintenance. It might need the CPU number,
the runqueue length, or phase of the moon: the caller shouldn't care.
If it was a static fn, maybe this optimization makes sense. But it's
an interface wart, and the "optimization" is utterly marginal anyway.
That said, I never would have sent such a trivial patch by itself: I
can't believe how many keystrokes were wasted over this issue!
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
prev parent reply other threads:[~2002-01-17 3:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-16 5:49 Rusty Russell
2002-01-16 9:15 ` Ingo Molnar
2002-01-16 9:17 ` Ingo Molnar
2002-01-16 10:34 ` Rusty Russell
2002-01-16 21:31 ` Paul Mackerras
2002-01-16 22:46 ` Ingo Molnar
2002-01-16 21:10 ` Robert Love
2002-01-16 21:27 ` Robert Love
2002-01-16 23:31 ` Ingo Molnar
2002-01-16 21:19 ` Justin Carlson
2002-01-17 13:01 ` bill davidsen
2002-01-17 3:37 ` Rusty Russell [this message]
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=E16R3MT-0004Ji-00@wagner.rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®