From: Ingo Molnar <mingo@elte.hu>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: linux-kernel@vger.kernel.org, "'Andrew Morton'" <akpm@osdl.org>
Subject: Re: re-inline sched functions
Date: Thu, 24 Mar 2005 23:22:15 +0100 [thread overview]
Message-ID: <20050324222215.GA30864@elte.hu> (raw)
In-Reply-To: <200503242116.j2OLGwg07920@unix-os.sc.intel.com>
* Chen, Kenneth W <kenneth.w.chen@intel.com> wrote:
> Ingo Molnar wrote on Friday, March 11, 2005 1:32 AM
> > > -static unsigned int task_timeslice(task_t *p)
> > > +static inline unsigned int task_timeslice(task_t *p)
> >
> > the patch looks good except this one - could you try to undo it and
> > re-measure? task_timeslice() is not used in any true fastpath, if it
> > makes any difference then the performance difference must be some other
> > artifact.
>
> Chen, Kenneth W wrote on Friday, March 11, 2005 10:40 AM
> > OK, I'll re-measure. Yeah, I agree that this function is not in the fastpath.
>
> Ingo is right, re-measured on our benchmark setup and did not see any
> difference whether task_timeslice is inlined or not. So if people
> want to take inline keyword out for that function, we won't complain
> :-)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
uninline task_timeslice() - reduces code footprint noticeably, and it's
slowpath code.
--- kernel/sched.c.orig
+++ kernel/sched.c
@@ -166,7 +166,7 @@
#define SCALE_PRIO(x, prio) \
max(x * (MAX_PRIO - prio) / (MAX_USER_PRIO/2), MIN_TIMESLICE)
-static inline unsigned int task_timeslice(task_t *p)
+static unsigned int task_timeslice(task_t *p)
{
if (p->static_prio < NICE_TO_PRIO(0))
return SCALE_PRIO(DEF_TIMESLICE*4, p->static_prio);
next prev parent reply other threads:[~2005-03-24 22:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-24 21:16 re-inline sched functions Chen, Kenneth W
2005-03-24 22:22 ` Ingo Molnar [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-03-11 0:24 Chen, Kenneth W
2005-03-11 0:30 ` Andrew Morton
2005-03-11 13:08 ` Nick Piggin
2005-03-11 9:31 ` Ingo Molnar
2005-03-11 18:39 ` Chen, Kenneth W
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=20050324222215.GA30864@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=kenneth.w.chen@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox