lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080930114000.GA14977@amitarora.in.ibm.com>
Date:	Tue, 30 Sep 2008 17:10:00 +0530
From:	"Amit K. Arora" <aarora@...ux.vnet.ibm.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Chris Friesen <cfriesen@...tel.com>, linux-kernel@...r.kernel.org,
	vatsa@...ux.vnet.ibm.com, a.p.zijlstra@...llo.nl
Subject: Re: [PATCH] sched: minor optimizations in wake_affine and
	select_task_rq_fair

On Tue, Sep 30, 2008 at 09:01:58AM +0200, Ingo Molnar wrote:
> 
> * Chris Friesen <cfriesen@...tel.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ