Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [wrstuden-revivesa] src/sys



Module Name:    src
Committed By:   wrstuden
Date:           Tue Oct 14 20:25:43 UTC 2008

Modified Files:
        src/sys/arch/alpha/alpha [wrstuden-revivesa]: syscall.c
        src/sys/arch/amd64/amd64 [wrstuden-revivesa]: syscall.c
        src/sys/arch/arm/arm [wrstuden-revivesa]: syscall.c
        src/sys/arch/hppa/hppa [wrstuden-revivesa]: trap.c
        src/sys/arch/i386/i386 [wrstuden-revivesa]: syscall.c
        src/sys/arch/m68k/m68k [wrstuden-revivesa]: m68k_syscall.c
        src/sys/arch/mips/mips [wrstuden-revivesa]: syscall.c
        src/sys/arch/powerpc/powerpc [wrstuden-revivesa]: syscall.c
        src/sys/arch/sh3/sh3 [wrstuden-revivesa]: syscall.c
        src/sys/arch/sparc/sparc [wrstuden-revivesa]: syscall.c
        src/sys/arch/sparc64/sparc64 [wrstuden-revivesa]: syscall.c
        src/sys/arch/vax/vax [wrstuden-revivesa]: syscall.c
        src/sys/kern [wrstuden-revivesa]: kern_sa.c
        src/sys/sys [wrstuden-revivesa]: sa.h savar.h

Log Message:
Add a new vp-private flag, SAVP_FLAG_DELIVERING. This flag indicates
that the vp is in the process of delivering a new-thread upcall.
This is a BLOCKED or NEWPROC upcall. Do NOT generate any BLOCKED
upcalls while this is set. Set it at the end of sa_switchcall()
and clear it at syscall entry. Sadly, I have found no other
way to handle this. The old SA interface has no way for
userland to acknowledge that it got the upcall, so use syscall
entry as the indicator that libpthread got it.

This addresses the issue seen on current-users with firefox
dying with a blockedgen != unbockedgen error. The problem is we
deliver a BLOCKED upcall, but between the end of userret()
and when the CPU indicates that it's running in user mode, we take
a page fault. Said page fault blocks, blocking upcall delivery.
The original block, however, was short-lived, and the UNBLOCK
happens shortly. It happens before libpthread actually notices
the BLOCKED upcall. Boom!

Unfortunately a LOCKDEBUG/DIAGNOSTIC kernel still dies before
firefox opens. However this new issue is with uvm code calling
mtsleep when not holding a correct lock; sa_switch() is exploding
at KASSERT(lwp_locked(l, NULL)); before it's done _anything_.

Also, while here, add sa_system_disabled. This is an integer
that we examine when starting SA for a proc. If it's non-zero,
we error out. Once this is hooked into sysctl, you'll be able to
disable SA w/o recompiling.


To generate a diff of this commit:
cvs rdiff -r1.32.2.1 -r1.32.2.2 src/sys/arch/alpha/alpha/syscall.c
cvs rdiff -r1.42.2.1 -r1.42.2.2 src/sys/arch/amd64/amd64/syscall.c
cvs rdiff -r1.42 -r1.42.2.1 src/sys/arch/arm/arm/syscall.c
cvs rdiff -r1.55.2.3 -r1.55.2.4 src/sys/arch/hppa/hppa/trap.c
cvs rdiff -r1.55.2.1 -r1.55.2.2 src/sys/arch/i386/i386/syscall.c
cvs rdiff -r1.34.12.1 -r1.34.12.2 src/sys/arch/m68k/m68k/m68k_syscall.c
cvs rdiff -r1.34.2.1 -r1.34.2.2 src/sys/arch/mips/mips/syscall.c
cvs rdiff -r1.41.4.1 -r1.41.4.2 src/sys/arch/powerpc/powerpc/syscall.c
cvs rdiff -r1.10.12.1 -r1.10.12.2 src/sys/arch/sh3/sh3/syscall.c
cvs rdiff -r1.18.4.2 -r1.18.4.3 src/sys/arch/sparc/sparc/syscall.c
cvs rdiff -r1.30.2.4 -r1.30.2.5 src/sys/arch/sparc64/sparc64/syscall.c
cvs rdiff -r1.12.4.1 -r1.12.4.2 src/sys/arch/vax/vax/syscall.c
cvs rdiff -r1.91.2.47 -r1.91.2.48 src/sys/kern/kern_sa.c
cvs rdiff -r1.11.2.3 -r1.11.2.4 src/sys/sys/sa.h
cvs rdiff -r1.24.2.12 -r1.24.2.13 src/sys/sys/savar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index