Re: [RFC][PATCH] Scalable Scheduling

From: Daniel Phillips (phillips@bonn-fries.net)
Date: Wed Aug 08 2001 - 14:06:01 EST


On Wednesday 08 August 2001 20:28, Mike Kravetz wrote:
> Yes we have, we'll provide those numbers with the updated patch.
> One challenge will be maintaining the same level of performance
> for UP as in the current code. The current code has #ifdefs to
> separate some of the UP/SMP code paths and we will try to eliminate
> these.

Does it help if I clarify what Linus was suggesting? Instead of:

         #ifdef CONFIG_SMP
                 .. use nr_running() ..
         #else
                 .. use nr_running ..
         #endif

write:

        inline int nr_running(void)
        {
        #ifdef CONFIG_SMP
                int i = 0, tot=nt_running(REALTIME_RQ);
                while (i < smp_num_cpus) {
                        tot += nt_running(cpu_logical_map(i++));
                }
                return(tot);
        #else
                return nr_running;
        #endif
        }

Then see if you can make the #ifdef's go away from that too. (If that's
too hard, well, at least the #ifdef's are now reduced.)

--
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Aug 15 2001 - 21:00:19 EST