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: <Pine.LNX.4.64.0609081135590.23089@schroedinger.engr.sgi.com>
Date:	Fri, 8 Sep 2006 11:40:51 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	"Siddha, Suresh B" <suresh.b.siddha@...el.com>
cc:	akpm@...l.org, linux-kernel@...r.kernel.org, npiggin@...e.de,
	mingo@...e.hu
Subject: Re: [PATCH] Fix longstanding load balancing bug in the scheduler.

On Fri, 8 Sep 2006, Siddha, Suresh B wrote:

> > +#endif
> > +}
> 
> Is there a reason why this is not made inline?

Just did not think of it.

> > +			struct rq *rq;
> > +
> > +			if (!cpu_isset(i, *cpus))
> > +				continue;
> 
> In normal conditions can we make this "cpus" argument NULL and only set/use it
> when we run into pinned condition? That will atleast avoid unnecessary memory
> test bit operations in the normal case.

The balancing operation is not that frequent and having to treat a special 
case in the callers would make code more complicated and likely offset the
gains in this function.

Fix up the declaration of cpu_of()

Signed-off-by: Christoph Lameter <clameter@....com>

Index: linux-2.6.18-rc5-mm1/kernel/sched.c
===================================================================
--- linux-2.6.18-rc5-mm1.orig/kernel/sched.c	2006-09-08 11:38:35.852594785 -0700
+++ linux-2.6.18-rc5-mm1/kernel/sched.c	2006-09-08 11:39:29.182308471 -0700
@@ -269,7 +269,7 @@ struct rq {
 
 static DEFINE_PER_CPU(struct rq, runqueues);
 
-int cpu_of(struct rq *rq)
+static inline int cpu_of(struct rq *rq)
 {
 #ifdef CONFIG_SMP
 	return rq->cpu;

-
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