From: "Amit K. Arora" <aarora@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Chris Friesen <cfriesen@nortel.com>,
linux-kernel@vger.kernel.org, vatsa@linux.vnet.ibm.com,
a.p.zijlstra@chello.nl
Subject: Re: [PATCH] sched: minor optimizations in wake_affine and select_task_rq_fair
Date: Tue, 30 Sep 2008 17:10:00 +0530 [thread overview]
Message-ID: <20080930114000.GA14977@amitarora.in.ibm.com> (raw)
In-Reply-To: <20080930070158.GA12465@elte.hu>
On Tue, Sep 30, 2008 at 09:01:58AM +0200, Ingo Molnar wrote:
>
> * Chris Friesen <cfriesen@nortel.com> wrote:
>
> > Amit K. Arora wrote:
> >> Hello,
> >>
> >> Please consider this patch. It makes a few minor changes to
> >> sched_fair.c.
> >>
> >>
> >> sched: Minor optimizations in wake_affine and select_task_rq_fair
> >>
> >> This patch does following:
> >> o Reduces the number of arguments to wake_affine().
> >
> > At what point is it cheaper to pass items as args rather than
> > recalculating them? If reducing the number of args is desirable, what
> > about removing the "this_cpu" and "prev_cpu" args and recalculating
> > them in wake_affine()?
>
> it's usually not worth it, especially if it leads to duplicated
> calculations (and code) like:
>
> + unsigned int imbalance = 100 + (this_sd->imbalance_pct - 100) / 2;
>
> gcc will optimize it away because it's all static functions, but still.
Ok. I will resubmit the patch with other suggested changes only. It
won't try to reduce wake_affine's arguments (besides the first argument
"rq" which is not being used at all).
Regards,
Amit Arora
>
> 'size kernel/sched.o' should be a good guideline: if the .o's text
> section gets smaller due to a patch it usually gets faster as well.
>
> Ingo
next prev parent reply other threads:[~2008-09-30 11:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-29 10:02 Amit K. Arora
2008-09-29 16:09 ` Chris Friesen
2008-09-30 7:01 ` Ingo Molnar
2008-09-30 11:40 ` Amit K. Arora [this message]
2008-09-30 7:03 ` Amit K. Arora
2008-09-30 11:45 ` [PATCH][resubmit] " Amit K. Arora
2008-09-30 13:26 ` Ingo Molnar
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=20080930114000.GA14977@amitarora.in.ibm.com \
--to=aarora@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=cfriesen@nortel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=vatsa@linux.vnet.ibm.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®