Source-Changes archive

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

CVS commit: src/sys



Module Name:    src
Committed By:   cl
Date:           Fri Jan  2 18:52:17 UTC 2004

Modified Files:
        src/sys/arch/pc532/pc532: trap.c
        src/sys/arch/sparc/sparc: trap.c
        src/sys/arch/vax/vax: trap.c
        src/sys/kern: kern_exit.c kern_sa.c kern_time.c syscalls.master
        src/sys/sys: lwp.h sa.h savar.h userret.h

Log Message:
kernel part of no-syscall upcall stack return:  libpthread registers
an offset between ss_sp and struct sa_stackinfo_t (located in struct
__pthread_st) when calling sa_register.  The kernel increments the
sast_gen counter in struct sastack when an upcall stack is used.
libpthread increments the sasi_stackgen counter in struct
sa_stackinfo_t when an upcall stack is freed.  The kernel compares the
two counters to decide if a stack is free or in use.

- add struct sa_stackinfo_t with sasi_stackgen to count stack use in
  userland
- add sast_gen to struct sastack to count stack use in kernel
- add SA_FLAG_STACKINFO to enable the stackinfo_offset argument in the
  sa_register syscall
- add sa_stackinfo_offset to struct sadata for offset between ss_sp
  and struct sa_stackinfo_t
- add ssize_t stackinfo_offset argument to sa_register, initialize
  struct sadata's sa_stackinfo_offset from it if SA_FLAG_STACKINFO is
  set
- add sa_getstack, sa_getstack0, sa_stackused and sa_setstackfree
  functions to find/use/free upcall stacks and use these where
  appropriate
- don't record stack for upcall in sa_upcall0
- pass sau to sa_switchcall instead of l2 (l2 = curlwp in sa_switchcall)
- add sa_vp_blocker to struct sadata to pass recently blocked lwp to
  sa_switchcall
- delay finding a stack for blocked upcalls to sa_switchcall
- add sa_stacknext to struct sadata pointing to next most likely free
  upcall stack; also g/c sa_stackslist in struct sadata and sast_list
  in struct sastack
- add L_SA_WOKEN flag: LWP is on sa_woken queue
- add L_SA_RECYCLE flag: LWP should be recycled in sa_setwoken
- replace l_upcallstack with L_SA_WOKEN/L_SA_RECYCLE/L_SA_BLOCKING
  flags
- g/c now unused sast_blocker in struct sastack
- make sa_switchcall, sa_upcall0 and sa_upcall_getstate static in
  kern_sa.c
- call sa_upcall_userret only once in userret
- split sa_makeupcalls out of sa_upcall_userret and use to process
  the sa_upcalls queue
- on process exit: mark LWPs sleeping in saunblock interruptible; also
  there are no LWPs sleeping on l->l_upcallstack anymore; also clear
  sa_wokenq_head to prevent unblocked upcalls

additional changes:
- cleanup timerupcall sa_vp == curlwp check
- add check in sa_yield if we didn't block on our way here and we
  wouldn't any longer be the LWP on the VP
- invalidate sa_vp_ofaultaddr after resolving pagefault


To generate a diff of this commit:
cvs rdiff -r1.61 -r1.62 src/sys/arch/pc532/pc532/trap.c
cvs rdiff -r1.150 -r1.151 src/sys/arch/sparc/sparc/trap.c
cvs rdiff -r1.90 -r1.91 src/sys/arch/vax/vax/trap.c
cvs rdiff -r1.130 -r1.131 src/sys/kern/kern_exit.c
cvs rdiff -r1.46 -r1.47 src/sys/kern/kern_sa.c
cvs rdiff -r1.80 -r1.81 src/sys/kern/kern_time.c
cvs rdiff -r1.134 -r1.135 src/sys/kern/syscalls.master
cvs rdiff -r1.16 -r1.17 src/sys/sys/lwp.h
cvs rdiff -r1.3 -r1.4 src/sys/sys/sa.h
cvs rdiff -r1.13 -r1.14 src/sys/sys/savar.h
cvs rdiff -r1.2 -r1.3 src/sys/sys/userret.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