From: Paul Mackerras <paulus@samba.org>
To: <mingo@elte.hu>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
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 08:31:51 +1100 (EST) [thread overview]
Message-ID: <15429.61767.644150.186995@argo.ozlabs.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0201162343290.18971-100000@localhost.localdomain>
In-Reply-To: <E16QnOx-0003vt-00@wagner.rustcorp.com.au> <Pine.LNX.4.33.0201162343290.18971-100000@localhost.localdomain>
Ingo Molnar writes:
> It's
> slightly cheaper to pass an already existing (calculated) 'current'
> pointer over to another function, instead of calculating it once more in
> that function.
On x86 that's true; many other architectures - alpha, ia64, m68k,
mips, mips64, parisc, ppc, ppc64, sparc, sparc64 - keep current in a
register already and thus it is slightly more expensive to pass it as
a parameter instead of just using current in the function.
Either way surely the cost is tiny, and the maintainability
considerations should prevail. Having a function which takes a
task_struct * parameter which _has_ to be current sounds to me like an
invitation for somebody to get it wrong down the track.
Paul.
next prev parent reply other threads:[~2002-01-16 21:46 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 [this message]
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
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=15429.61767.644150.186995@argo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=rusty@rustcorp.com.au \
--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®