Re: ULE/yielding patch for testing.

From: Jeff Roberson <jroberson_at_chesapeake.net>
Date: Tue, 2 Oct 2007 21:53:29 -0700 (PDT)
On Wed, 3 Oct 2007, Yuri Pankov wrote:

> On Tue, Oct 02, 2007 at 07:55:02PM -0700, Jeff Roberson wrote:
>> On Wed, 3 Oct 2007, Yuri Pankov wrote:
>>
>>> On Wed, Oct 03, 2007 at 04:50:09AM +0400, Yuri Pankov wrote:
>>>> On Tue, Oct 02, 2007 at 04:53:33PM -0700, Jeff Roberson wrote:
>>>>> Enclosed is a patch that does two things:
>>>>>
>>>>> 1)  Reduces UP context switch time by over 10% making it faster than
>>>>> 4BSD
>>>>> on UP.  On SMP it's hard to compare since ULE can do as many as 30x as
>>>>> many
>>>>> switches per second on my 8way system.
>>>>>
>>>>> 2)  Restores old sched_yield() behavior from 6.x.  This was changed in
>>>>> -current unintentionally I think.
>>>>>
>>>>> I'd appreciate any extra testing.  The ULE context switch time
>>>>> improvements
>>>>> required some changes to the frequency that we recalculate priorities.
>>>>> I'm
>>>>> mostly interested in hearing whether this causes any regression in
>>>>> normal
>>>>> workloads.
>>>>>
>>>>> Those of you still using 4BSD can also verify that the yield changes
>>>>> don't
>>>>> cause any problems there.
>>>>>
>>>>> Thanks,
>>>>> Jeff
>>>>
>>>> Jeff,
>>>>
>>>> Patch applied cleanly, though with new kernel I got a panic just after
>>>> boot - on xdm startup, I guess (crashdump wasn't saved), a lot of the
>>>> same messages
>>>> (copied by hand):
>>>>
>>>> cpuid = 0
>>>> panic: _mtx_lock_sleep: recursed on non-recursive mutex
>>>> audit_mtx_at_/usr/src/sys/security/audit_worker.c:518
>>>>
>>>> and after few seconds system just hangs.
>>>>
>>>> Any hints?
>>>>
>>>> --
>>>> Yuri Pankov <yuri.pankov_at_gmail.com>
>>>
>>> Sorry for being so verbose...
>>
>> Did you 'make depend' as well?  If you patch -R < yield.diff does this
>> kernel work?  I'm not sure how my changes could cause this type of bug.
>>
>> Thanks,
>> Jeff
>>
>
> I'm rebuilt kernel with and without your patch (with clean /usr/obj/ every time)
> using `make kernel KERNCONF=DARKLIGHT` just to be sure.
>
> Without your patch, system seems to run stable. With it - I get hard hangs upon
> just loading X or upon xdm startup or after xdm login, every time the same. No
> messages now, just hangs. Nothing suspicious in /var/log/messages, etc.
>
> Xorg 7.3 with xf86-video-nv, all ports built yesterday (it was fresh install).
>
> Anything that I should look at? (as it can be just pilot error).

The attached diff is only the changes the fix yield() and sched_yield() to 
pre-CURRENT states.  Can you try this on its own and let me know if it 
works so I can narrow down the part of the patch causing trouble?

Thanks,
Jeff

>
> TIA.
>
>>>
>>> It's UP amd64 with SCHED_ULE
>>>
>>> kernel config:
>>>
>>> include         GENERIC
>>> ident           DARKLIGHT
>>>
>>> nooptions       SCHED_4BSD
>>> options         SCHED_ULE
>>>
>>> --
>>> Yuri Pankov <yuri.pankov_at_gmail.com>
>>>
>
> -- 
> Yuri Pankov <yuri.pankov_at_gmail.com>
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>
Received on Wed Oct 03 2007 - 02:50:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:18 UTC