Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Oct 2007 14:34:19 -0700 (PDT)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        Peter Grehan <grehan@freebsd.org>
Cc:        freebsd-ppc@freebsd.org
Subject:   Re: cvs commit: src/sys/kern sched_ule.c
Message-ID:  <20071002142856.K594@10.0.0.1>
In-Reply-To: <4702AB13.3060003@freebsd.org>
References:  <200709271639.l8RGdREd032105@repoman.freebsd.org> <46FBDFE8.9050909@freebsd.org> <20070930153101.T583@10.0.0.1> <47004ACF.5020901@freebsd.org> <20070930184601.R583@10.0.0.1> <4702AB13.3060003@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2 Oct 2007, Peter Grehan wrote:

> Hi Jeff,
>
>> If you can test ULE on UP arm/powerpc I'd appreciate it.
>
> Works fine on ppc after some minor tweaks. I've attached the diff for those 
> interested. A couple of questions:
>
> - Can ULE work without preemption ? When it wasn't enabled, the system 
> wouldn't switch out of the idle loop. There's a comment in sched_idletd():

It always must use preemption with idletd.  You can disable it in all 
other cases by omitting the PREEMPTION option...

Ah I see the bug now.  I only tested by adjusting 
kern.sched.preempt_thresh.  I didn't notice that the code in 
critical_exit() is conditional.  I'll fix that so it should work without 
PREEMPTION.

>
>          /* ULE relies on preemption for idle interruption. */
>
>   I'm asking because PREEMPTION has never been switched on in PPC, and it 
> might be nice to enable ULE without having to determine if bugs are in 
> PREEMPTION or ULE.

Once I fix critical_exit() it should only preempt idle which is unlikely 
to cause bugs, except perhaps in your cpu_idle implementation.

>
> - ppc's cpu_throw() was implemented in C. I modified it to pass the 
> thread-lock mutex from the old thread, so the context switch routine would 
> simply write it back. Is that an OK thing to do ?

Yes, that's fine.

Thanks!
Jeff

>
> later,
>
> Peter.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071002142856.K594>