The NetBSD Project

CVS log for src/sys/kern/sys_lwp.c

[BACK] Up to [cvs.netbsd.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.52.8.2 / (download) - annotate - [select for diffs], Wed May 23 10:08:11 2012 UTC (2 days, 21 hours ago) by yamt
Branch: yamt-pagecache
Changes since 1.52.8.1: +52 -32 lines
Diff to previous 1.52.8.1 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored)

sync with head.

Revision 1.52.14.1 / (download) - annotate - [select for diffs], Mon May 21 15:25:56 2012 UTC (4 days, 16 hours ago) by riz
Branch: netbsd-6
Changes since 1.52: +56 -36 lines
Diff to previous 1.52 (colored) next main 1.53 (colored)

Pull up following revision(s) (requested by martin in ticket #274):
	sys/arch/amd64/amd64/process_machdep.c: revision 1.20
	sys/kern/sys_lwp.c: revision 1.54
	sys/arch/sparc64/sparc64/machdep.c: revision 1.267
	sys/arch/mips/mips/cpu_subr.c: revision 1.16
	sys/arch/vax/vax/machdep.c: revision 1.188
	sys/sys/lwp.h: revision 1.161
	sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.98
	sys/arch/alpha/alpha/machdep.c: revision 1.339
	sys/compat/sys/ucontext.h: revision 1.6
	sys/arch/hppa/hppa/hppa_machdep.c: revision 1.28
	distrib/sets/lists/tests/mi: revision 1.469
	sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.42
	tests/lib/libc/sys/t_lwp_create.c: revision 1.1
	tests/lib/libc/sys/Makefile: revision 1.23
	sys/arch/arm/arm/sig_machdep.c: revision 1.42
	sys/arch/amd64/include/mcontext.h: revision 1.15
	sys/arch/amd64/amd64/machdep.c: revision 1.183
	sys/arch/sh3/sh3/sh3_machdep.c: revision 1.99
	sys/arch/i386/i386/machdep.c: revision 1.727
	sys/compat/netbsd32/netbsd32_lwp.c: revision 1.13
	sys/arch/sparc/sparc/machdep.c: revision 1.319
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.76
	sys/arch/m68k/m68k/sig_machdep.c: revision 1.49
	sys/sys/ucontext.h: revision 1.16
	sys/arch/mips/mips/netbsd32_machdep.c: revision 1.9
	lib/libc/sys/_lwp_create.2: revision 1.5
Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.
To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.
Add an exhaustive atf test case, based partly on code from Joel Sing.
Should finally fix the remaining open part of PR kern/43903.

Revision 1.54 / (download) - annotate - [select for diffs], Mon May 21 14:15:19 2012 UTC (4 days, 17 hours ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base5, HEAD
Changes since 1.53: +52 -32 lines
Diff to previous 1.53 (colored)

Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.

Revision 1.52.8.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:28 2012 UTC (5 weeks, 4 days ago) by yamt
Branch: yamt-pagecache
Changes since 1.52: +2 -21 lines
Diff to previous 1.52 (colored)

sync with head

Revision 1.52.12.1 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:48 2012 UTC (3 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.52: +2 -21 lines
Diff to previous 1.52 (colored) next main 1.53 (colored)

sync to -current.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Feb 19 21:06:56 2012 UTC (3 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Changes since 1.52: +2 -21 lines
Diff to previous 1.52 (colored)

Remove COMPAT_SA / KERN_SA.  Welcome to 6.99.3!
Approved by core@.

Revision 1.43.10.1 / (download) - annotate - [select for diffs], Fri Apr 29 08:20:15 2011 UTC (12 months, 3 weeks ago) by matt
Branch: matt-nb5-mips64
Changes since 1.43: +3 -4 lines
Diff to previous 1.43 (colored) next main 1.44 (colored)

Pull in lwp_setprivate/cpu_lwp_setprivate from -current.
Also pull in lwp_getpcb

Revision 1.48.4.3 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:21 2011 UTC (14 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.48.4.2: +3 -8 lines
Diff to previous 1.48.4.2 (colored) to branchpoint 1.48 (colored) next main 1.49 (colored)

sync with head

Revision 1.43.4.1 / (download) - annotate - [select for diffs], Sun Nov 21 17:36:45 2010 UTC (18 months ago) by riz
Branch: netbsd-5
CVS Tags: matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.43: +11 -7 lines
Diff to previous 1.43 (colored) next main 1.44 (colored)

Pull up following revision(s) (requested by skrll in ticket #1415):
	sys/kern/sys_lwp.c: revision 1.50
Follow the correct locking protocol when creating an LWP and the process
is stopping.
Problem found by running the gdb testsuite (gdb didn't have pthreads
support)
Thanks to rmind for help with this.

Revision 1.48.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:47:30 2010 UTC (21 months, 1 week ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.48.2.1: +12 -12 lines
Diff to previous 1.48.2.1 (colored) to branchpoint 1.48 (colored) next main 1.49 (colored)

Sync with HEAD.

Revision 1.39.2.4 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:42 2010 UTC (21 months, 2 weeks ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.39.2.3: +19 -20 lines
Diff to previous 1.39.2.3 (colored) to branchpoint 1.39 (colored) next main 1.40 (colored)

sync with head.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jul 7 01:30:37 2010 UTC (22 months, 2 weeks ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, rmind-uvmplock-nbase, rmind-uvmplock-base, netbsd-6-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, netbsd-6, jmcneill-usbmp
Changes since 1.51: +3 -8 lines
Diff to previous 1.51 (colored)

many changes for COMPAT_LINUX:
 - update the linux syscall table for each platform.
 - support new-style (NPTL) linux pthreads on all platforms.
   clone() with CLONE_THREAD uses 1 process with many LWPs
   instead of separate processes.
 - move the contents of sys__lwp_setprivate() into a new
   lwp_setprivate() and use that everywhere.
 - update linux_release[] and linux32_release[] to "2.6.18".
 - adjust placement of emul fork/exec/exit hooks as needed
   and adjust other emul code to match.
 - convert all struct emul definitions to use named initializers.
 - change the pid allocator to allow multiple pids to refer to the same proc.
 - remove a few fields from struct proc that are no longer needed.
 - disable the non-functional "vdso" code in linux32/amd64,
   glibc works fine without it.
 - fix a race in the futex code where we could miss a wakeup after
   a requeue operation.
 - redo futex locking to be a little more efficient.

Revision 1.48.4.2 / (download) - annotate - [select for diffs], Sat Jul 3 01:19:54 2010 UTC (22 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.48.4.1: +13 -8 lines
Diff to previous 1.48.4.1 (colored) to branchpoint 1.48 (colored)

sync with head

Revision 1.51 / (download) - annotate - [select for diffs], Sun Jun 13 04:13:32 2010 UTC (23 months, 1 week ago) by yamt
Branch: MAIN
Changes since 1.50: +4 -3 lines
Diff to previous 1.50 (colored)

increment p_nrlwps in lwp_create rather than letting callers do so
as it's always decremented by lwp_exit.  this fixes error recovery of
eg. aio_procinit.

Revision 1.50 / (download) - annotate - [select for diffs], Sun Jun 6 07:46:17 2010 UTC (23 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.49: +11 -7 lines
Diff to previous 1.49 (colored)

Follow the correct locking protocol when creating an LWP and the process
is stopping.

Problem found by running the gdb testsuite (gdb didn't have pthreads
support)

Thanks to rmind for help with this.

Revision 1.48.4.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:58 2010 UTC (23 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.48: +7 -8 lines
Diff to previous 1.48 (colored)

sync with head

Revision 1.48.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:12 2010 UTC (2 years ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.48: +7 -8 lines
Diff to previous 1.48 (colored)

Sync with HEAD.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Apr 23 19:18:09 2010 UTC (2 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.48: +7 -8 lines
Diff to previous 1.48 (colored)

Remove lwp_uc_pool, replace it with kmem(9), plus add some consistency.
As discussed, a while ago, with ad@.

Revision 1.39.2.3 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:19 2010 UTC (2 years, 2 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.39.2.2: +45 -44 lines
Diff to previous 1.39.2.2 (colored) to branchpoint 1.39 (colored)

sync with head

Revision 1.48 / (download) - annotate - [select for diffs], Sun Nov 1 21:46:09 2009 UTC (2 years, 6 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.47: +7 -10 lines
Diff to previous 1.47 (colored)

- Move inittimeleft() and gettimeleft() to subr_time.c, where they belong.
- Move abstimeout2timo() there too and export.  Use it in lwp_park().

Revision 1.47 / (download) - annotate - [select for diffs], Thu Oct 22 13:12:47 2009 UTC (2 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.46: +30 -19 lines
Diff to previous 1.46 (colored)

Make lwp_park_sobj and lwp_park_tab static.
Wrap long lines while here.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Oct 21 21:12:06 2009 UTC (2 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.45: +12 -19 lines
Diff to previous 1.45 (colored)

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:57 2009 UTC (3 years ago) by jym
Branch: jym-xensuspend
Changes since 1.44: +7 -2 lines
Diff to previous 1.44 (colored) next main 1.45 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.39.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:48 2009 UTC (3 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.39.2.1: +45 -17 lines
Diff to previous 1.39.2.1 (colored) to branchpoint 1.39 (colored)

sync with head.

Revision 1.43.2.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:00 2009 UTC (3 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.43.2.1: +7 -2 lines
Diff to previous 1.43.2.1 (colored) to branchpoint 1.43 (colored) next main 1.44 (colored)

Sync with HEAD.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Mar 29 09:24:52 2009 UTC (3 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.44: +7 -2 lines
Diff to previous 1.44 (colored)

_lwp_setprivate: provide the value to MD code if a hook is present.

This will be used to support TLS. The MD method must match the ELF TLS spec
for that CPU architecture (if there is a spec).

At this time it is only implemented for i386, where it means setting the
per-thread base address for %gs. Please implement this for your platform!

Revision 1.43.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:39 2009 UTC (3 years, 4 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.43: +4 -3 lines
Diff to previous 1.43 (colored)

Sync with HEAD.

Revision 1.34.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:20 2009 UTC (3 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.34.6.2: +22 -2 lines
Diff to previous 1.34.6.2 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored)

Sync with HEAD.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:52 2009 UTC (3 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.43: +4 -3 lines
Diff to previous 1.43 (colored)

merge christos-time_t

Revision 1.37.2.2 / (download) - annotate - [select for diffs], Sat Nov 1 21:22:27 2008 UTC (3 years, 6 months ago) by christos
Branch: christos-time_t
Changes since 1.37.2.1: +72 -57 lines
Diff to previous 1.37.2.1 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored)

Sync with head.

Revision 1.41.4.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:28 2008 UTC (3 years, 7 months ago) by haad
Branch: haad-dm
Changes since 1.41: +22 -3 lines
Diff to previous 1.41 (colored) next main 1.42 (colored)

Sync with HEAD.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Oct 16 08:47:07 2008 UTC (3 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, christos-time_t-nbase, christos-time_t-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, matt-nb5-mips64
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

_lwp_kill: set SI_LWP in the siginfo, not SI_USER.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Oct 15 06:51:20 2008 UTC (3 years, 7 months ago) by wrstuden
Branch: MAIN
Changes since 1.41: +21 -2 lines
Diff to previous 1.41 (colored)

Merge wrstuden-revivesa into HEAD.

Revision 1.40.2.3 / (download) - annotate - [select for diffs], Sat Jul 26 19:51:12 2008 UTC (3 years, 10 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.40.2.2: +9 -2 lines
Diff to previous 1.40.2.2 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored)

sys__lwp_create() and sys__lwp_suspend(): Only test to see if a process is
an SA process ifdef KERN_SA.

sys__sched_setaffinity(): Don't allow changing (setting) the affinity
of an SA process (or a thread in an SA process). To really set the
affinity of a thread in an SA process, we need to set the affility
for all LWPs on which that user thread will run. This really means
setting the affinity on all present and future threads on a VP
and also having the user thread always run on an lwp on that VP. The
latter needs libpthread's intervention.

Revision 1.40.2.2 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:51 2008 UTC (3 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.40.2.1: +18 -15 lines
Diff to previous 1.40.2.1 (colored) to branchpoint 1.40 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.37.4.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:39 2008 UTC (3 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.37.4.1: +18 -15 lines
Diff to previous 1.37.4.1 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored)

sync with head

Revision 1.34.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:11 2008 UTC (3 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.34.6.1: +50 -54 lines
Diff to previous 1.34.6.1 (colored) to branchpoint 1.34 (colored)

Sync with HEAD.

Revision 1.41 / (download) - annotate - [select for diffs], Mon May 26 12:08:39 2008 UTC (4 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl
Branch point for: haad-dm
Changes since 1.40: +18 -15 lines
Diff to previous 1.40 (colored)

Take the mutex pointer and waiters count out of sleepq_t: the values can
be or are maintained elsewhere. Now a sleepq_t is just a TAILQ_HEAD.

Revision 1.40.2.1 / (download) - annotate - [select for diffs], Thu May 22 06:25:04 2008 UTC (4 years ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.40: +14 -2 lines
Diff to previous 1.40 (colored)

Add back checks to ensure we don't mix 1:1 & SA threaded processes.

Revision 1.37.4.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:10 2008 UTC (4 years ago) by yamt
Branch: yamt-pf42
Changes since 1.37: +36 -43 lines
Diff to previous 1.37 (colored)

sync with head.

Revision 1.39.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:27 2008 UTC (4 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.39: +2 -9 lines
Diff to previous 1.39 (colored)

sync with head.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:04 2008 UTC (4 years ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.39: +2 -9 lines
Diff to previous 1.39 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.39 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:24 2008 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.38: +34 -34 lines
Diff to previous 1.38 (colored)

Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:29 2008 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored)

Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.

Revision 1.34.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:04 2008 UTC (4 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.34: +8 -7 lines
Diff to previous 1.34 (colored)

Sync with HEAD.

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Sat Mar 29 20:47:01 2008 UTC (4 years, 1 month ago) by christos
Branch: christos-time_t
Changes since 1.37: +4 -3 lines
Diff to previous 1.37 (colored)

Welcome to the time_t=long long dev_t=uint64_t branch.

Revision 1.6.2.10 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:02 2008 UTC (4 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.9: +5 -5 lines
Diff to previous 1.6.2.9 (colored) next main 1.7 (colored)

sync with head.

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:14 2008 UTC (4 years, 2 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.34: +8 -7 lines
Diff to previous 1.34 (colored) next main 1.35 (colored)

sync with head.

Revision 1.25.2.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:00 2008 UTC (4 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.25.2.3: +9 -8 lines
Diff to previous 1.25.2.3 (colored) next main 1.26 (colored)

sync with HEAD

Revision 1.37 / (download) - annotate - [select for diffs], Mon Mar 17 16:55:27 2008 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Branch point for: yamt-pf42, christos-time_t
Changes since 1.36: +5 -5 lines
Diff to previous 1.36 (colored)

Add a boolean parameter to syncobj_t::sobj_unsleep. If true we want the
existing behaviour: the unsleep method unlocks and wakes the swapper if
needs be. If false, the caller is doing a batch operation and will take
care of that later. This is kind of ugly, but it's difficult for the caller
to know which lock to release in some situations.

Revision 1.6.2.9 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:34 2008 UTC (4 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.8: +5 -4 lines
Diff to previous 1.6.2.8 (colored)

sync with head.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Mar 12 11:05:01 2008 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

+2008 for the copyright

Revision 1.35 / (download) - annotate - [select for diffs], Wed Mar 12 11:00:43 2008 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.34: +4 -3 lines
Diff to previous 1.34 (colored)

Add a preemption counter to lwpctl_t, to allow user threads to detect that
they have been preempted.

Revision 1.6.2.8 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:56 2008 UTC (4 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.7: +3 -3 lines
Diff to previous 1.6.2.7 (colored)

sync with head.

Revision 1.26.6.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:47 2008 UTC (4 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.26.6.3: +4 -11 lines
Diff to previous 1.26.6.3 (colored) to branchpoint 1.26 (colored) next main 1.27 (colored)

Sync with HEAD.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Feb 14 14:26:57 2008 UTC (4 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

Make schedstate_percpu::spc_lwplock an exernally allocated item. Remove
the hacks in sparc/cpu.c to reinitialize it. This should be in its own
cache line but that's another change.

Revision 1.6.2.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:23 2008 UTC (4 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.6: +48 -55 lines
Diff to previous 1.6.2.6 (colored)

sync with head

Revision 1.25.2.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:21 2008 UTC (4 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.25.2.2: +78 -56 lines
Diff to previous 1.25.2.2 (colored)

sync with HEAD

Revision 1.31.6.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:56:12 2008 UTC (4 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.31: +48 -55 lines
Diff to previous 1.31 (colored) next main 1.32 (colored)

Sync with HEAD

Revision 1.33 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:53 2008 UTC (4 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.32: +3 -10 lines
Diff to previous 1.32 (colored)

Merge vmlocking2 to head.

Revision 1.26.6.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:10 2007 UTC (4 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.26.6.2: +47 -47 lines
Diff to previous 1.26.6.2 (colored) to branchpoint 1.26 (colored)

Sync with HEAD.

Revision 1.31.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:44 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.31.2.1: +47 -47 lines
Diff to previous 1.31.2.1 (colored) to branchpoint 1.31 (colored) next main 1.32 (colored)

Sync with head.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:10 2007 UTC (4 years, 5 months ago) by dsl
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.31: +47 -47 lines
Diff to previous 1.31 (colored)

Convert all the system call entry points from:
    int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.

Revision 1.26.6.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:39 2007 UTC (4 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.26.6.1: +6 -4 lines
Diff to previous 1.26.6.1 (colored) to branchpoint 1.26 (colored)

Sync with HEAD.

Revision 1.6.2.6 / (download) - annotate - [select for diffs], Fri Dec 7 17:33:11 2007 UTC (4 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.5: +6 -4 lines
Diff to previous 1.6.2.5 (colored)

sync with head

Revision 1.31.2.1 / (download) - annotate - [select for diffs], Tue Dec 4 13:03:16 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.31: +3 -10 lines
Diff to previous 1.31 (colored)

Pull the vmlocking changes into a new branch.

Revision 1.23.2.7 / (download) - annotate - [select for diffs], Mon Dec 3 16:14:57 2007 UTC (4 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.23.2.6: +6 -4 lines
Diff to previous 1.23.2.6 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored)

Sync with HEAD.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Dec 2 15:49:38 2007 UTC (4 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.30: +6 -4 lines
Diff to previous 1.30 (colored)

sys__lwp_create: set in the correct lock when the LWP is created suspended.

Revision 1.26.6.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:52 2007 UTC (4 years, 6 months ago) by mjf
Branch: mjf-devfs
Changes since 1.26: +107 -7 lines
Diff to previous 1.26 (colored)

Sync with HEAD.

Revision 1.6.2.5 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:51 2007 UTC (4 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.4: +107 -7 lines
Diff to previous 1.6.2.4 (colored)

sync with head.

Revision 1.23.2.6 / (download) - annotate - [select for diffs], Wed Nov 14 19:04:45 2007 UTC (4 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.23.2.5: +31 -4 lines
Diff to previous 1.23.2.5 (colored) to branchpoint 1.23 (colored)

Sync with HEAD.

Revision 1.26.4.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:25 2007 UTC (4 years, 6 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.26: +107 -7 lines
Diff to previous 1.26 (colored) next main 1.27 (colored)

Sync with HEAD

Revision 1.30 / (download) - annotate - [select for diffs], Mon Nov 12 23:11:59 2007 UTC (4 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.29: +31 -4 lines
Diff to previous 1.29 (colored)

Add _lwp_ctl() system call: provides a bidirectional, per-LWP communication
area between processes and the kernel.

Revision 1.23.2.5 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:11 2007 UTC (4 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.23.2.4: +76 -2 lines
Diff to previous 1.23.2.4 (colored) to branchpoint 1.23 (colored)

Sync with HEAD.

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:06 2007 UTC (4 years, 6 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.25.2.1: +76 -2 lines
Diff to previous 1.25.2.1 (colored)

sync with -HEAD

Revision 1.29 / (download) - annotate - [select for diffs], Wed Nov 7 00:56:27 2007 UTC (4 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.28: +2 -3 lines
Diff to previous 1.28 (colored)

Fix error in previous.

Revision 1.28 / (download) - annotate - [select for diffs], Wed Nov 7 00:37:23 2007 UTC (4 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.27: +77 -2 lines
Diff to previous 1.27 (colored)

Add _lwp_setname, _lwp_getname. Proposed on tech-kern.

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:32:26 2007 UTC (4 years, 6 months ago) by matt
Branch: matt-armv6
Changes since 1.25: +7 -8 lines
Diff to previous 1.25 (colored)

sync with HEAD

Revision 1.23.2.4 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:34 2007 UTC (4 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.23.2.3: +6 -7 lines
Diff to previous 1.23.2.3 (colored) to branchpoint 1.23 (colored)

Sync with HEAD.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Nov 6 00:42:44 2007 UTC (4 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Changes since 1.26: +6 -7 lines
Diff to previous 1.26 (colored)

Merge scheduler changes from the vmlocking branch. All discussed on
tech-kern:

- Invert priority space so that zero is the lowest priority. Rearrange
  number and type of priority levels into bands. Add new bands like
  'kernel real time'.
- Ignore the priority level passed to tsleep. Compute priority for
  sleep dynamically.
- For SCHED_4BSD, make priority adjustment per-LWP, not per-process.

Revision 1.12.2.12 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:23 2007 UTC (4 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.11: +5 -6 lines
Diff to previous 1.12.2.11 (colored) next main 1.13 (colored)

- Fix interactivity problems under high load. Beacuse soft interrupts
  are being stacked on top of regular LWPs, more often than not aston()
  was being called on a soft interrupt thread instead of a user thread,
  meaning that preemption was not happening on EOI.

- Don't use bool in a couple of data structures. Sub-word writes are not
  always atomic and may clobber other fields in the containing word.

- For SCHED_4BSD, make p_estcpu per thread (l_estcpu). Rework how the
  dynamic priority level is calculated - it's much better behaved now.

- Kill the l_usrpri/l_priority split now that priorities are no longer
  directly assigned by tsleep(). There are three fields describing LWP
  priority:

        l_priority: Dynamic priority calculated by the scheduler.
                This does not change for kernel/realtime threads,
                and always stays within the correct band. Eg for
                timeshared LWPs it never moves out of the user
                priority range. This is basically what l_usrpri
                was before.

        l_inheritedprio: Lent to the LWP due to priority inheritance
                (turnstiles).

        l_kpriority: A boolean value set true the first time an LWP
                sleeps within the kernel. This indicates that the LWP
                should get a priority boost as compensation for blocking.
                lwp_eprio() now does the equivalent of sched_kpri() if
                the flag is set. The flag is cleared in userret().

- Keep track of scheduling class (OTHER, FIFO, RR) in struct lwp, and use
  this to make decisions in a few places where we previously tested for a
  kernel thread.

- Partially fix itimers and usr/sys/intr time accounting in the presence
  of software interrupts.

- Use kthread_create() to create idle LWPs. Move priority definitions
  from the various modules into sys/param.h.

- newlwp -> lwp_create

Revision 1.6.2.4 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:35 2007 UTC (4 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.3: +4 -4 lines
Diff to previous 1.6.2.3 (colored)

sync with head.

Revision 1.12.2.11 / (download) - annotate - [select for diffs], Thu Oct 18 22:45:53 2007 UTC (4 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.10: +3 -3 lines
Diff to previous 1.12.2.10 (colored)

Free uareas back to the uarea cache on the CPU where they were last used.

Revision 1.12.2.10 / (download) - annotate - [select for diffs], Tue Oct 16 10:47:48 2007 UTC (4 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.9: +3 -10 lines
Diff to previous 1.12.2.9 (colored)

kernel_lock isn't needed here. Pointed out by rmind@.

Revision 1.12.2.9 / (download) - annotate - [select for diffs], Tue Oct 9 15:22:22 2007 UTC (4 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.8: +2 -3 lines
Diff to previous 1.12.2.8 (colored)

Sync with head.

Revision 1.23.2.3 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:04 2007 UTC (4 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.23.2.2: +4 -4 lines
Diff to previous 1.23.2.2 (colored) to branchpoint 1.23 (colored)

Sync with HEAD.

Revision 1.21.2.2 / (download) - annotate - [select for diffs], Mon Sep 10 10:56:01 2007 UTC (4 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.21.2.1: +4 -4 lines
Diff to previous 1.21.2.1 (colored) to branchpoint 1.21 (colored) next main 1.22 (colored)

Sync with HEAD.

Revision 1.12.2.8 / (download) - annotate - [select for diffs], Sun Sep 9 23:12:20 2007 UTC (4 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.7: +5 -4 lines
Diff to previous 1.12.2.7 (colored)

Sync with _lwp_park/priority changes on HEAD.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Sep 6 23:59:01 2007 UTC (4 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5
Branch point for: mjf-devfs, bouyer-xenamd64
Changes since 1.25: +4 -4 lines
Diff to previous 1.25 (colored)

- Fix sleepq_block() to return EINTR if the LWP is cancelled. Pointed out
  by yamt@.

- Introduce SOBJ_SLEEPQ_LIFO, and use for LWPs sleeping via _lwp_park.
  libpthread enqueues most waiters in LIFO order to try and wake LWPs that
  ran recently, since their working set is more likely to be in cache.
  Matching the order of insertion reduces the time spent searching queues
  in the kernel.

- Do not boost the priority of LWPs sleeping in _lwp_park, just let them
  sleep at their user priority level. LWPs waiting for some I/O event in
  the kernel still wait with kernel priority and get woken more quickly.
  This needs more evaluation and is to be revisited, but the effect on a
  variety of benchmarks is positive.

- When waking LWPs, do not send an IPI to remote CPUs or arrange for the
  current LWP to be preempted unless (a) the thread being awoken has kernel
  priority and has higher priority than the currently running thread or (b)
  the remote CPU is idle.

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Mon Sep 3 14:41:08 2007 UTC (4 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.2: +212 -176 lines
Diff to previous 1.6.2.2 (colored)

sync with head.

Revision 1.12.2.7 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:39 2007 UTC (4 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.6: +132 -89 lines
Diff to previous 1.12.2.6 (colored)

Sync with HEAD.

Revision 1.23.2.2 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:39 2007 UTC (4 years, 9 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.23.2.1: +6 -2 lines
Diff to previous 1.23.2.1 (colored) to branchpoint 1.23 (colored)

Sync with HEAD.

Revision 1.21.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:15 2007 UTC (4 years, 9 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.21: +132 -89 lines
Diff to previous 1.21 (colored)

Sync with HEAD.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Aug 15 02:50:40 2007 UTC (4 years, 9 months ago) by rmind
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.24: +6 -2 lines
Diff to previous 1.24 (colored)

sys__lwp_suspend: Handle the possible problem when target LWP might exit via
lwp_exit() before suspending.  In such case, LWP might be already freed after
cv_wait_sig() and checking the list of LWPs via lwp_find() is necessary.

Possible problem catched by Andrew Doran.

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Thu Aug 9 02:37:20 2007 UTC (4 years, 9 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.23: +101 -89 lines
Diff to previous 1.23 (colored)

Sync with HEAD.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Aug 7 19:00:42 2007 UTC (4 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.23: +101 -89 lines
Diff to previous 1.23 (colored)

- Fix a bug with _lwp_park() where if the computed wakeup time was under
  1 microsecond into the future, the thread could enter an untimed sleep.
- Change the signature of _lwp_park() to accept an lwpid_t and second
  hint pointer, but do so in a way that remains compatible with older
  pthread libraries. This can be used to wake another thread before the
  calling thread goes asleep, saving at least one syscall + involuntary
  context switch. This turns out to be a fairly large win on the condvar
  benchmarks that I have tried.
- Mark some more syscalls MP safe.

Revision 1.23.4.2 / (download) - annotate - [select for diffs], Thu Aug 2 01:48:46 2007 UTC (4 years, 9 months ago) by rmind
Branch: matt-mips64
Changes since 1.23.4.1: +721 -0 lines
Diff to previous 1.23.4.1 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored)

sys__lwp_suspend: implement waiting for target LWP status changes (or
process exiting). Removes XXXLWP.

Reviewed by <ad> some time ago..

Revision 1.23.4.1, Thu Aug 2 01:48:45 2007 UTC (4 years, 9 months ago) by rmind
Branch: matt-mips64
Changes since 1.23: +0 -721 lines
FILE REMOVED

file sys_lwp.c was added on branch matt-mips64 on 2007-08-02 01:48:46 +0000

Revision 1.23 / (download) - annotate - [select for diffs], Thu Aug 2 01:48:45 2007 UTC (4 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: matt-mips64-base
Branch point for: matt-mips64, jmcneill-pm
Changes since 1.22: +28 -2 lines
Diff to previous 1.22 (colored)

sys__lwp_suspend: implement waiting for target LWP status changes (or
process exiting). Removes XXXLWP.

Reviewed by <ad> some time ago..

Revision 1.22 / (download) - annotate - [select for diffs], Wed Aug 1 23:24:26 2007 UTC (4 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.21: +5 -4 lines
Diff to previous 1.21 (colored)

KNF

Revision 1.12.2.6 / (download) - annotate - [select for diffs], Sun Jul 15 13:27:45 2007 UTC (4 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.5: +10 -7 lines
Diff to previous 1.12.2.5 (colored)

Sync with head.

Revision 1.12.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:10:09 2007 UTC (4 years, 10 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.12: +121 -138 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

Sync with head.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jul 11 00:17:23 2007 UTC (4 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, hpcarm-cleanup
Branch point for: nick-csl-alignment
Changes since 1.20: +10 -7 lines
Diff to previous 1.20 (colored)

Fix a problem in sys__lwp_create() where invalid new_lwp would
leak an LWP and memory.
Reviewed by <ad>.

Revision 1.12.2.5 / (download) - annotate - [select for diffs], Sat Jun 9 23:58:06 2007 UTC (4 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.4: +26 -12 lines
Diff to previous 1.12.2.4 (colored)

Sync with head.

Revision 1.12.2.4 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:25 2007 UTC (4 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.3: +16 -10 lines
Diff to previous 1.12.2.3 (colored)

Sync with head.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jun 3 09:50:12 2007 UTC (4 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.19: +26 -12 lines
Diff to previous 1.19 (colored)

Split sys__lwp_park() so that the compat/netbsd32 code can copyin and convert
its timeout then call the standard function.

Revision 1.19 / (download) - annotate - [select for diffs], Thu May 17 14:51:41 2007 UTC (5 years ago) by yamt
Branch: MAIN
Changes since 1.18: +8 -16 lines
Diff to previous 1.18 (colored)

merge yamt-idlelwp branch.  asked by core@.  some ports still needs work.

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

	1. separate context switching and thread scheduling.
	   (cf. gmcgarry_ctxsw)
	2. implement idle lwp.
	3. clean up related MD/MI interfaces.
	4. make scheduler(s) modular.

Revision 1.3.2.9 / (download) - annotate - [select for diffs], Thu Apr 19 04:19:44 2007 UTC (5 years, 1 month ago) by ad
Branch: yamt-idlelwp
Changes since 1.3.2.8: +4 -10 lines
Diff to previous 1.3.2.8 (colored) next main 1.4 (colored)

Pull up a change from the vmlocking branch:

- Ensure that LWPs going to sleep are on the sleep queue before releasing
  any interlocks. This is so that calls to turnstile_wakeup will have the
  correct locks held when adjusting priority. Avoids another deadlock.
- Assume that LWPs blocked on a turnstile will never be swapped out.
- LWPs blocking on a turnstile must have kernel priority, as they
  are consuming kernel resources.

Revision 1.3.2.8 / (download) - annotate - [select for diffs], Mon Apr 16 23:31:21 2007 UTC (5 years, 1 month ago) by ad
Branch: yamt-idlelwp
Changes since 1.3.2.7: +4 -6 lines
Diff to previous 1.3.2.7 (colored)

- Nuke the seperate scheduler locking scheme for UP kernels - it has been
  at the root of too many bugs.
- Add a LW_BOUND flag that indicates an LWP is bound to a specific CPU.

Revision 1.3.2.7 / (download) - annotate - [select for diffs], Sun Apr 15 16:03:51 2007 UTC (5 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.3.2.6: +8 -3 lines
Diff to previous 1.3.2.6 (colored)

sync with head.

Revision 1.12.2.3 / (download) - annotate - [select for diffs], Tue Apr 10 18:34:05 2007 UTC (5 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.12.2.2: +4 -10 lines
Diff to previous 1.12.2.2 (colored)

- Ensure that that LWPs going to sleep are on the sleep queue and so
  have their syncobj pointer updated, so that calls to turnstile_wakeup
  will have the correct locks held when adjusting the current LWP's
  priority. Avoids another deadlock.
- Assume that LWPs blocked on a turnstile will never be swapped out.
- LWPs blocking on a turnstile must have kernel priority, as they
  are consuming kernel resources.

Revision 1.12.2.2 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:40 2007 UTC (5 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.12.2.1: +83 -109 lines
Diff to previous 1.12.2.1 (colored)

Sync with head.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Tue Apr 10 11:41:11 2007 UTC (5 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.12: +4 -12 lines
Diff to previous 1.12 (colored)

kernel_lock isn't needed for memory allocation any more.

Revision 1.14.2.2 / (download) - annotate - [select for diffs], Thu Mar 29 19:27:58 2007 UTC (5 years, 1 month ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.14.2.1: +26 -20 lines
Diff to previous 1.14.2.1 (colored) next main 1.15 (colored)

Pullup to -current

Revision 1.18 / (download) - annotate - [select for diffs], Sat Mar 24 16:43:56 2007 UTC (5 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Changes since 1.17: +8 -3 lines
Diff to previous 1.17 (colored)

Handle newlwp() error case. Currently, newlwp() cannot fail, but this
will likely change in the future.

Revision 1.3.2.6 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:04 2007 UTC (5 years, 2 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.3.2.5: +77 -108 lines
Diff to previous 1.3.2.5 (colored)

sync with head.

Revision 1.3.2.5 / (download) - annotate - [select for diffs], Sat Mar 24 00:43:08 2007 UTC (5 years, 2 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.3.2.4: +3 -3 lines
Diff to previous 1.3.2.4 (colored)

Checkpoint:
- Abstract for per-CPU locking of runqueues.
  As a workaround for SCHED_4BSD global runqueue, covered by sched_mutex,
  spc_mutex is a pointer for now. After making SCHED_4BSD runqueues
  per-CPU, it will became a storage mutex.
- suspendsched: Locking is not necessary for cpu_need_resched().
- Remove mutex_spin_exit() prototype in patch.c and LOCK_ASSERT() check
  in runqueue_nextlwp() in sched_4bsd.c to make them compile again.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Mar 21 18:26:00 2007 UTC (5 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.16: +10 -5 lines
Diff to previous 1.16 (colored)

Improvements to lwp_wait1(), for PR kern/35932:

- Better detect simple cycles of threads calling _lwp_wait and return
  EDEADLK. Does not handle deeper cycles like t1 -> t2 -> t3 -> t1.
- If there are multiple threads in _lwp_wait, then make sure that
  targeted waits take precedence over waits for any LWP to exit.
- When checking for deadlock, also count the number of zombies currently
  in the process as potentially reapable. Whenever a zombie is murdered,
  kick all waiters to make them check again for deadlock.
- Add more comments.

Also, while here:

- LOCK_ASSERT -> KASSERT in some places
- lwp_free: change boolean arguments to type 'bool'.
- proc_free: let lwp_free spin waiting for the last LWP to exit, there's
  no reason to do it here.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Mar 20 23:25:17 2007 UTC (5 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.15: +12 -16 lines
Diff to previous 1.15 (colored)

Changes to LWP wakeup:

- Don't bother sorting the sleep queues, since user space controls the
  order of removal.
- Change setrunnable(t) to lwp_unsleep(t). No functional change from the
  perspective of user applications.
- Minor cosmetic changes.

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Sun Mar 18 00:06:44 2007 UTC (5 years, 2 months ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.14: +49 -92 lines
Diff to previous 1.14 (colored)

First attempt to bring branch in sync with HEAD

Revision 1.3.2.4 / (download) - annotate - [select for diffs], Sat Mar 17 16:54:38 2007 UTC (5 years, 2 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.3.2.3: +3 -3 lines
Diff to previous 1.3.2.3 (colored)

Do not do an implicit enqueue in sched_switch(), move enqueueing back to
the dispatcher. Rename sched_switch() back to sched_nextlwp(). Add for
sched_enqueue() new argument, which indicates the calling from mi_switch().

Requested by yamt@

Revision 1.15 / (download) - annotate - [select for diffs], Wed Mar 14 23:58:24 2007 UTC (5 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.14: +49 -92 lines
Diff to previous 1.14 (colored)

- Remove the LWP counters. The race between park/unpark rarely occurs
  so it's not worth counting.

- lwp_wakeup: set LW_UNPARKED on the target. Ensures that _lwp_park will
  always be awoken even if another system call eats the wakeup, e.g. as a
  result of an intervening signal. To deal with this correctly for other
  system calls will require a different approach.

- _lwp_unpark, _lwp_unpark_all: use setrunnable if the LWP is not parked
  on the same sync queue: (1) simplifies the code a bit as there no point
  doing anything special for this case (2) makes it possible for p_smutex
  to be replaced by p_mutex and (3) restores the guarantee that the 'hint'
  argument really is just a hint.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Mar 14 23:07:27 2007 UTC (5 years, 2 months ago) by yamt
Branch: MAIN
Branch point for: reinoud-bufcleanup
Changes since 1.13: +9 -9 lines
Diff to previous 1.13 (colored)

sys__lwp_park: whitespace.  no functional change.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Mar 14 23:00:32 2007 UTC (5 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.12: +12 -1 lines
Diff to previous 1.12 (colored)

sys__lwp_park: don't restart on signals.  PR/35969 from Andrew Doran.

Revision 1.3.2.3 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:41 2007 UTC (5 years, 2 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.3.2.2: +24 -16 lines
Diff to previous 1.3.2.2 (colored)

Sync with HEAD.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Mar 9 05:00:26 2007 UTC (5 years, 2 months ago) by yamt
Branch: MAIN
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored)

fix typos in comments.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Mar 2 21:06:27 2007 UTC (5 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

_lwp_wakeup: set the cancellation pending if the LWP is not sleeping.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Mar 2 16:14:37 2007 UTC (5 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

sys__lwp_park: explicitly drop the kernel lock, for the benefit of compat32.
XXX The stack gap stuff is not MP or MT safe and needs to go away.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Mar 2 16:09:53 2007 UTC (5 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.8: +6 -4 lines
Diff to previous 1.8 (colored)

sys__lwp_park: on a !MULTIPROCESSOR kernel the LWP is already locked.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Mar 1 14:55:06 2007 UTC (5 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.7: +19 -13 lines
Diff to previous 1.7 (colored)

Fix a couple of races with LWP park/unpark.

Revision 1.3.2.2 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:30 2007 UTC (5 years, 2 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.3.2.1: +15 -13 lines
Diff to previous 1.3.2.1 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Feb 26 09:20:54 2007 UTC (5 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.6: +5 -3 lines
Diff to previous 1.6 (colored)

implement priority inheritance.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:16 2007 UTC (5 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.1: +701 -0 lines
Diff to previous 1.6.2.1 (colored)

sync with head.

Revision 1.6.2.1, Wed Feb 21 23:48:15 2007 UTC (5 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6: +0 -701 lines
FILE REMOVED

file sys_lwp.c was added on branch yamt-lazymbuf on 2007-02-26 09:11:16 +0000

Revision 1.6 / (download) - annotate - [select for diffs], Wed Feb 21 23:48:15 2007 UTC (5 years, 3 months ago) by thorpej
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Pick up some additional files that were missed before due to conflicts
with newlock2 merge:

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Tue Feb 20 21:48:46 2007 UTC (5 years, 3 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

General Common Scheduler Framework (CSF) patch import. Huge thanks for
Daniel Sieger <dsieger at TechFak.Uni-Bielefeld de> for this work.

Short abstract: Split the dispatcher from the scheduler in order to
make the scheduler more modular. Introduce initial API for other
schedulers' implementations.

Discussed in tech-kern@
OK: yamt@, ad@

Note: further work will go soon.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 19 15:10:04 2007 UTC (5 years, 3 months ago) by cube
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

Introduce a new member to struct emul, e_startlwp, to be used by
sys__lwp_create.  It allows using the said syscall under COMPAT_NETBSD32.

The libpthread regression tests now pass on amd64 and sparc64.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Feb 17 22:31:44 2007 UTC (5 years, 3 months ago) by pavel
Branch: MAIN
Changes since 1.3: +10 -10 lines
Diff to previous 1.3 (colored)

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Feb 15 20:21:13 2007 UTC (5 years, 3 months ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored)

Add uvm_kick_scheduler() (MP safe) to replace wakeup(&proc0).

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:31 2007 UTC (5 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.1: +701 -0 lines
Diff to previous 1.1 (colored)

Merge newlock2 to head.

Revision 1.1.2.12 / (download) - annotate - [select for diffs], Sun Feb 4 17:28:43 2007 UTC (5 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.1.2.11: +17 -6 lines
Diff to previous 1.1.2.11 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Push kernel_lock back further.

Revision 1.1.2.11 / (download) - annotate - [select for diffs], Sat Feb 3 16:32:50 2007 UTC (5 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.1.2.10: +4 -4 lines
Diff to previous 1.1.2.10 (colored) to branchpoint 1.1 (colored)

- Require that cv_signal/cv_broadcast be called with the interlock held.
- Provide 'async' versions that's don't need the interlock.

Revision 1.1.2.10 / (download) - annotate - [select for diffs], Tue Jan 30 13:51:41 2007 UTC (5 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.1.2.9: +3 -20 lines
Diff to previous 1.1.2.9 (colored) to branchpoint 1.1 (colored)

Remove support for SA. Ok core@.

Revision 1.1.2.9 / (download) - annotate - [select for diffs], Thu Jan 25 20:20:28 2007 UTC (5 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.1.2.8: +44 -50 lines
Diff to previous 1.1.2.8 (colored) to branchpoint 1.1 (colored)

- Make return of _lwp_detach() match other systems.
- Check for signo == 0 in _lwp_kill().
- KNF

Revision 1.1.2.8 / (download) - annotate - [select for diffs], Wed Jan 17 20:24:11 2007 UTC (5 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.1.2.7: +3 -2 lines
Diff to previous 1.1.2.7 (colored) to branchpoint 1.1 (colored)

Put back a missing wakeup.

Revision 1.1.2.7 / (download) - annotate - [select for diffs], Tue Jan 16 05:22:10 2007 UTC (5 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.1.2.6: +28 -6 lines
Diff to previous 1.1.2.6 (colored) to branchpoint 1.1 (colored)

lwp_detach(): if the target's a zombie, then free it.

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Tue Jan 16 01:28:27 2007 UTC (5 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.1.2.5: +71 -54 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored)

Adjust arguments to _lwp_park() and friends so that in the best case
_lwp_unpark_all() only has to traverse one sleep queue.

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Thu Jan 11 22:23:00 2007 UTC (5 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.1.2.4: +4 -4 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored)

Checkpoint work in progress.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:44 2006 UTC (5 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.1.2.3: +365 -46 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored)

Checkpoint work in progress.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:37 2006 UTC (5 years, 6 months ago) by ad
Branch: newlock2
Changes since 1.1.2.2: +16 -14 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored)

Checkpoint work in progress.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Tue Oct 24 21:10:21 2006 UTC (5 years, 7 months ago) by ad
Branch: newlock2
Changes since 1.1.2.1: +43 -4 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

- Redo LWP locking slightly and fix some races.
- Fix some locking botches.
- Make signal mask / stack per-proc for SA processes.
- Add _lwp_kill().

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Sat Oct 21 14:26:41 2006 UTC (5 years, 7 months ago) by ad
Branch: newlock2
Changes since 1.1: +313 -0 lines
Diff to previous 1.1 (colored)

- Split core dump, LWP syscalls and signal syscalls into their own files.
- Checkpoint work in progress on locking & per-LWP signals.

Revision 1.1, Sat Oct 21 14:26:41 2006 UTC (5 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, newlock2-nbase, newlock2-base
Branch point for: newlock2
FILE REMOVED

file sys_lwp.c was initially added on branch newlock2.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>