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.89 / (download) - annotate - [select for diffs], Sun Oct 15 10:29:24 2023 UTC (5 months, 1 week ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.88: +11 -10 lines
Diff to previous 1.88 (colored) to selected 1.6.2.4 (colored)

kern_lwp.c: Sort includes.  No functional change intended.

Revision 1.88 / (download) - annotate - [select for diffs], Sun Oct 15 10:27:11 2023 UTC (5 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.87: +3 -2 lines
Diff to previous 1.87 (colored) to selected 1.6.2.4 (colored)

sys/lwp.h: Nix sys/syncobj.h dependency.

Remove it in ddb/db_syncobj.h too.

New sys/wchan.h defines wchan_t so that users need not pull in
sys/syncobj.h to get it.

Sprinkle #include <sys/syncobj.h> in .c files where it is now needed.

Revision 1.87 / (download) - annotate - [select for diffs], Sun Oct 8 13:23:05 2023 UTC (5 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.86: +7 -7 lines
Diff to previous 1.86 (colored) to selected 1.6.2.4 (colored)

Ensure that an LWP that has taken a legitimate wakeup never produces an
error code from sleepq_block().  Then, it's possible to make cv_signal()
work as expected and only ever wake a singular LWP.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Oct 4 20:29:18 2023 UTC (5 months, 3 weeks ago) by ad
Branch: MAIN
Changes since 1.85: +3 -4 lines
Diff to previous 1.85 (colored) to selected 1.6.2.4 (colored)

Eliminate l->l_biglocks.  Originally I think it had a use but these days a
local variable will do.

Revision 1.85 / (download) - annotate - [select for diffs], Sat Sep 23 18:48:04 2023 UTC (6 months ago) by ad
Branch: MAIN
Changes since 1.84: +9 -3 lines
Diff to previous 1.84 (colored) to selected 1.6.2.4 (colored)

- Simplify how priority boost for blocking in kernel is handled.  Rather
  than setting it up at each site where we block, make it a property of
  syncobj_t.  Then, do not hang onto the priority boost until userret(),
  drop it as soon as the LWP is out of the run queue and onto a CPU.
  Holding onto it longer is of questionable benefit.

- This allows two members of lwp_t to be deleted, and mi_userret() to be
  simplified a lot (next step: trim it down to a single conditional).

- While here, constify syncobj_t and de-inline a bunch of small functions
  like lwp_lock() which turn out not to be small after all (I don't know
  why, but atomic_*_relaxed() seem to provoke a compiler shitfit above and
  beyond what volatile does).

Revision 1.84 / (download) - annotate - [select for diffs], Mon Jul 17 12:54:29 2023 UTC (8 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.83: +3 -2 lines
Diff to previous 1.83 (colored) to selected 1.6.2.4 (colored)

kern: New struct syncobj::sobj_name member for diagnostics.

XXX potential kernel ABI change -- not sure any modules actually use
struct syncobj but it's hard to rule that out because sys/syncobj.h
leaks into sys/lwp.h

Revision 1.83 / (download) - annotate - [select for diffs], Wed Jun 29 22:27:01 2022 UTC (20 months, 4 weeks ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored) to selected 1.6.2.4 (colored)

sleepq(9): Pass syncobj through to sleepq_block.

Previously the usage pattern was:

sleepq_enter(sq, l, lock);              // locks l
...
sleepq_enqueue(sq, ..., sobj, ...);     // assumes l locked, sets l_syncobj
... (*)
sleepq_block(...);			// unlocks l

As long as l remains locked from sleepq_enter to sleepq_block,
l_syncobj is stable, and sleepq_block uses it via ktrcsw to determine
whether the sleep is on a mutex in order to avoid creating ktrace
context-switch records (which involves allocation which is forbidden
in softint context, while taking and even sleeping for a mutex is
allowed).

However, in turnstile_block, the logic at (*) also involves
turnstile_lendpri, which sometimes unlocks and relocks l.  At that
point, another thread can swoop in and sleepq_remove l, which sets
l_syncobj to sched_syncobj.  If that happens, ktrcsw does what is
forbidden -- tries to allocate a ktrace record for the context
switch.

As an optimization, sleepq_block or turnstile_block could stop early
if it detects that l_syncobj doesn't match -- we've already been
requested to wake up at this point so there's no need to mi_switch.
(And then it would be unnecessary to pass the syncobj through
sleepq_block, because l_syncobj would remain stable.)  But I'll leave
that to another change.

Reported-by: syzbot+8b9d7b066c32dbcdc63b@syzkaller.appspotmail.com

Revision 1.82 / (download) - annotate - [select for diffs], Sat May 23 23:42:43 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.81: +6 -6 lines
Diff to previous 1.81 (colored) to selected 1.6.2.4 (colored)

Move proc_lock into the data segment.  It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.

Revision 1.81 / (download) - annotate - [select for diffs], Sat May 23 20:45:10 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.80: +9 -7 lines
Diff to previous 1.80 (colored) to selected 1.6.2.4 (colored)

- Replace pid_table_lock with a lockless lookup covered by pserialize, with
  the "writer" side being pid_table expansion.  The basic idea is that when
  doing an LWP lookup there is usually already a lock held (p->p_lock), or a
  spin mutex that needs to be taken (l->l_mutex), and either can be used to
  get the found LWP stable and confidently determine that all is correct.

- For user processes LSLARVAL implies the same thing as LSIDL ("not visible
  by ID"), and lookup by ID in proc0 doesn't really happen.  In-tree the new
  state should be understood by top(1), the tty subsystem and so on, and
  would attract the attention of 3rd party kernel grovellers in time, so
  remove it and just rely on LSIDL.

Revision 1.80 / (download) - annotate - [select for diffs], Tue May 5 22:12:06 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.79: +5 -28 lines
Diff to previous 1.79 (colored) to selected 1.6.2.4 (colored)

lwp_unpark(): no need to acquire LWP refs or drop the proc lock.

On the hacky benchmarks I have, held over from the transition to 1:1
threading, this restores pthread_cond_signal() perf to radixtree/sleepq
levels, and semes much better than either with pthread_cond_broadcast() and
10 threads.  It would be interesting to see what might be achieved with a
lockless lookup, which is within grasp now thanks to pid_table being used
for lookup.

Revision 1.76.2.2 / (download) - annotate - [select for diffs], Sat Apr 25 11:24:06 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.76.2.1: +31 -20 lines
Diff to previous 1.76.2.1 (colored) to branchpoint 1.76 (colored) next main 1.77 (colored) to selected 1.6.2.4 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.79 / (download) - annotate - [select for diffs], Fri Apr 24 03:22:06 2020 UTC (3 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.78: +31 -12 lines
Diff to previous 1.78 (colored) to selected 1.6.2.4 (colored)

Overhaul the way LWP IDs are allocated.  Instead of each LWP having it's
own LWP ID space, LWP IDs came from the same number space as PIDs.  The
lead LWP of a process gets the PID as its LID.  If a multi-LWP process's
lead LWP exits, the PID persists for the process.

In addition to providing system-wide unique thread IDs, this also lets us
eliminate the per-process LWP radix tree, and some associated locks.

Remove the separate "global thread ID" map added previously; it is no longer
needed to provide this functionality.

Nudged in this direction by ad@ and chs@.

Revision 1.78 / (download) - annotate - [select for diffs], Wed Apr 22 21:22:21 2020 UTC (3 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.77: +2 -10 lines
Diff to previous 1.77 (colored) to selected 1.6.2.4 (colored)

Remove _lwp_gettid(2) system call.  This problem is going to be solved
another way.  (Note: this call was never exposed in libc, so we can just
recycle the syscall number.)

Revision 1.63.4.3 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:42 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.63.4.2: +1 -1 lines
Diff to previous 1.63.4.2 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD

Revision 1.76.2.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:10 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD

Revision 1.77 / (download) - annotate - [select for diffs], Sun Apr 19 20:35:29 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base1
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored) to selected 1.6.2.4 (colored)

Set LW_SINTR earlier so it doesn't pose a problem for doing interruptable
waits with turnstiles (not currently done).

Revision 1.63.4.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:04 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.63.4.1: +82 -197 lines
Diff to previous 1.63.4.1 (colored) to branchpoint 1.63 (colored) to selected 1.6.2.4 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.76 / (download) - annotate - [select for diffs], Sat Apr 4 20:20:12 2020 UTC (3 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.75: +10 -2 lines
Diff to previous 1.75 (colored) to selected 1.6.2.4 (colored)

Add support for lazily generating a "global thread ID" for a LWP.  This
identifier uniquely identifies an LWP across the entire system, and will
be used in future improvements in user-space synchronization primitives.

(Test disabled and libc stub not included intentionally so as to avoid
multiple libc version bumps.)

Revision 1.71.2.2 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:03 2020 UTC (4 years ago) by ad
Branch: ad-namecache
Changes since 1.71.2.1: +58 -155 lines
Diff to previous 1.71.2.1 (colored) to branchpoint 1.71 (colored) next main 1.72 (colored) to selected 1.6.2.4 (colored)

Sync with head.

Revision 1.75 / (download) - annotate - [select for diffs], Thu Jan 30 12:36:38 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.74: +12 -6 lines
Diff to previous 1.74 (colored) to selected 1.6.2.4 (colored)

Update comments

Revision 1.74 / (download) - annotate - [select for diffs], Wed Jan 29 15:47:52 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.73: +48 -150 lines
Diff to previous 1.73 (colored) to selected 1.6.2.4 (colored)

- Track LWPs in a per-process radixtree.  It uses no extra memory in the
  single threaded case.  Replace scans of p->p_lwps with lookups in the
  tree.  Find free LIDs for new LWPs in the tree.  Replace the hashed sleep
  queues for park/unpark with lookups in the tree under cover of a RW lock.

- lwp_wait(): if waiting on a specific LWP, find the LWP via tree lookup and
  return EINVAL if it's detached, not ESRCH.

- Group the locks in struct proc at the end of the struct in their own cache
  line.

- Add some comments.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Jan 26 19:08:09 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.72: +6 -7 lines
Diff to previous 1.72 (colored) to selected 1.6.2.4 (colored)

Correction to previous: don't leak newuc if copyout() fails.

Revision 1.71.2.1 / (download) - annotate - [select for diffs], Sat Jan 25 22:38:51 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.71: +14 -16 lines
Diff to previous 1.71 (colored) to selected 1.6.2.4 (colored)

Sync with head.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Jan 25 15:41:52 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2
Changes since 1.71: +14 -16 lines
Diff to previous 1.71 (colored) to selected 1.6.2.4 (colored)

- Fix a race between the kernel and libpthread, where a new thread can start
  life without its self->pt_lid being filled in.

- Fix an error path in _lwp_create().  If the new LID can't be copied out,
  then get rid of the new LWP (i.e. either succeed or fail, not both).

- Mark l_dopreempt and l_nopreempt volatile in struct lwp.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Nov 23 19:42:52 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.70: +4 -33 lines
Diff to previous 1.70 (colored) to selected 1.6.2.4 (colored)

Minor scheduler cleanup:

- Adapt to cpu_need_resched() changes. Avoid lost & duplicate IPIs and ASTs.
  sched_resched_cpu() and sched_resched_lwp() contain the logic for this.
- Changes for LSIDL to make the locking scheme match the intended design.
- Reduce lock contention and false sharing further.
- Numerous small bugfixes, including some corrections for SCHED_FIFO/RT.
- Use setrunnable() in more places, and merge cut & pasted code.

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Tue Oct 15 18:32:13 2019 UTC (4 years, 5 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored) next main 1.70 (colored) to selected 1.6.2.4 (colored)

Pull up following revision(s) (requested by kamil in ticket #311):

	sys/sys/siginfo.h: revision 1.34
	sys/kern/sys_ptrace_common.c: revision 1.59
	sys/kern/sys_lwp.c: revision 1.70
	sys/compat/sys/siginfo.h: revision 1.8
	sys/kern/kern_sig.c: revision 1.365
	sys/kern/kern_lwp.c: revision 1.203
	sys/sys/signalvar.h: revision 1.96
	sys/kern/kern_exec.c: revision 1.482
	sys/kern/kern_fork.c: revision 1.214

Move TRAP_CHLD/TRAP_LWP ptrace information from struct proc to siginfo

Storing struct ptrace_state information inside struct proc was vulnerable
to synchronization bugs, as multiple events emitted in the same time were
overwritting other ones.

Cache the original parent process id in p_oppid. Reusing here p_opptr is
in theory prone to slight race codition.

Change the semantics of PT_GET_PROCESS_STATE, reutning EINVAL for calls
prompting for the value in cases when there wasn't registered an
appropriate event.

Add an alternative approach to check the ptrace_state information, directly
from the siginfo_t value returned from PT_GET_SIGINFO. The original
PT_GET_PROCESS_STATE approach is kept for compat with older NetBSD and
OpenBSD. New code is recommended to keep using PT_GET_PROCESS_STATE.
Add a couple of compile-time asserts for assumptions in the code.

No functional change intended in existing ptrace(2) software.

All ATF ptrace(2) and ATF GDB tests pass.

This change improves reliability of the threading ptrace(2) code.

Revision 1.70 / (download) - annotate - [select for diffs], Mon Sep 30 21:13:33 2019 UTC (4 years, 5 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored) to selected 1.6.2.4 (colored)

Move TRAP_CHLD/TRAP_LWP ptrace information from struct proc to siginfo

Storing struct ptrace_state information inside struct proc was vulnerable
to synchronization bugs, as multiple events emitted in the same time were
overwritting other ones.

Cache the original parent process id in p_oppid. Reusing here p_opptr is
in theory prone to slight race codition.

Change the semantics of PT_GET_PROCESS_STATE, reutning EINVAL for calls
prompting for the value in cases when there wasn't registered an
appropriate event.

Add an alternative approach to check the ptrace_state information, directly
from the siginfo_t value returned from PT_GET_SIGINFO. The original
PT_GET_PROCESS_STATE approach is kept for compat with older NetBSD and
OpenBSD. New code is recommended to keep using PT_GET_PROCESS_STATE.

Add a couple of compile-time asserts for assumptions in the code.

No functional change intended in existing ptrace(2) software.

All ATF ptrace(2) and ATF GDB tests pass.

This change improves reliability of the threading ptrace(2) code.

Revision 1.61.2.1 / (download) - annotate - [select for diffs], Sun Aug 11 10:04:03 2019 UTC (4 years, 7 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.61: +5 -3 lines
Diff to previous 1.61 (colored) next main 1.62 (colored) to selected 1.6.2.4 (colored)

Pull up following revision(s) (requested by maxv in ticket #1333):

	sys/kern/sys_lwp.c: revision 1.69 (patch)

Fix info leak: instead of using SS_INIT as a literal compound, use a global
variable from rodata. The compound gets pushed on the stack, the padding
of the structure was therefore not initialized, and was getting leaked to
userland in sys___sigaltstack14().

Revision 1.69 / (download) - annotate - [select for diffs], Wed Jul 10 17:52:22 2019 UTC (4 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: netbsd-9-base
Branch point for: netbsd-9
Changes since 1.68: +5 -3 lines
Diff to previous 1.68 (colored) to selected 1.6.2.4 (colored)

Fix info leak: instead of using SS_INIT as a literal compound, use a global
variable from rodata. The compound gets pushed on the stack, the padding
of the structure was therefore not initialized, and was getting leaked to
userland in sys___sigaltstack14().

Revision 1.68 / (download) - annotate - [select for diffs], Mon Jul 1 17:15:43 2019 UTC (4 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.67: +6 -3 lines
Diff to previous 1.67 (colored) to selected 1.6.2.4 (colored)

Restrict the size given to copyoutstr. It is safer to do that; even if
there is no actual bug here, since the buffer is guaranteed to be NUL
terminated.

With KASAN we check the whole buffer to cover the "worst" case, and here
it triggered false positives because the buffer size was not filtered.

Revision 1.63.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:03 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.63: +28 -3 lines
Diff to previous 1.63 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD

Revision 1.67 / (download) - annotate - [select for diffs], Fri May 3 22:34:21 2019 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.66: +3 -5 lines
Diff to previous 1.66 (colored) to selected 1.6.2.4 (colored)

Register KTR events for debugger related signals

Register signals for:

 - crashes (FPE, SEGV, FPE, ILL, BUS)
 - LWP events
 - CHLD (FORK/VFORK/VFORK_DONE) events -- temporarily disabled
 - EXEC events

While there refactor related functions in order to simplify the code.

Add missing comment documentation for recently added kernel functions.

Revision 1.66 / (download) - annotate - [select for diffs], Thu May 2 22:23:49 2019 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
Changes since 1.65: +5 -5 lines
Diff to previous 1.65 (colored) to selected 1.6.2.4 (colored)

Introduce fixes for ptrace(2)

Stop disabling LWP create and exit events for PT_SYSCALL tracing.
PT_SYSCALL disabled EXEC reporting for legacy reasons, there is no need
to repeat it for LWP and CHLD events.

Pass full siginfo from trapsignal events (SEGV, BUS, ILL, TRAP, FPE).
This adds missing information about signals like fault address.

Set ps_lwp always.

Before passing siginfo to userland through p_sigctx.ps_info, make sure
that it was zeroed for unused bytes. LWP and CHLD events do not set si_addr
and si_trap, these pieces of information are passed for crashes (like
software breakpoint).

LLDB crash reporting works now correctly:

(lldb) r
Process 552 launched: '/tmp/a.out' (x86_64)
Process 552 stopped
* thread #1, stop reason = signal SIGSEGV: invalid address (fault address: 0x123456)

Revision 1.65 / (download) - annotate - [select for diffs], Wed May 1 22:55:55 2019 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
Changes since 1.64: +5 -6 lines
Diff to previous 1.64 (colored) to selected 1.6.2.4 (colored)

Call MD code in mi_startlwp() before MI check for debugger

This allows to get initialized mcontext.

Revision 1.64 / (download) - annotate - [select for diffs], Wed May 1 21:57:34 2019 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
Changes since 1.63: +31 -3 lines
Diff to previous 1.63 (colored) to selected 1.6.2.4 (colored)

Correct passing debugger related events for LWP create and exit

Add MI toplevel startlwp function.

Switch all userland LWPs to go through lwp_create using a shared
mi_startlwp() function between all MD ABIs.

Add debugger related event handling in mi_startlwp() and continue with
standard p->p_emul->e_startlwp at the end of this routine.

Use eventswitch() to notify the event of LWP exit in lwp_exit().

ATF ptrace(2) tests signal9 and signal10 now pass.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Jan 30 07:52:23 2018 UTC (6 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi
Changes since 1.62: +7 -7 lines
Diff to previous 1.62 (colored) to selected 1.6.2.4 (colored)

Apply C99-style struct initialization to syncobj_t

Revision 1.62 / (download) - annotate - [select for diffs], Fri Dec 8 01:19:29 2017 UTC (6 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.61: +16 -7 lines
Diff to previous 1.61 (colored) to selected 1.6.2.4 (colored)

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8

Revision 1.54.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:45 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.54.2.2: +11 -12 lines
Diff to previous 1.54.2.2 (colored) to branchpoint 1.54 (colored) next main 1.55 (colored) to selected 1.6.2.4 (colored)

update from HEAD

Revision 1.56.12.3 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:07 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.56.12.2: +11 -12 lines
Diff to previous 1.56.12.2 (colored) to branchpoint 1.56 (colored) next main 1.57 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jun 1 02:45:13 2017 UTC (6 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: netbsd-8
Changes since 1.60: +3 -8 lines
Diff to previous 1.60 (colored) to selected 1.6.2.4 (colored)

remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.57.2.2 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:27 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.57.2.1: +10 -6 lines
Diff to previous 1.57.2.1 (colored) to branchpoint 1.57 (colored) next main 1.58 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD

Revision 1.60 / (download) - annotate - [select for diffs], Fri Apr 21 19:38:35 2017 UTC (6 years, 11 months ago) by kamil
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored) to selected 1.6.2.4 (colored)

Try to fix build of sys_lwp.c

lwp_create() has been acquired more arguments, there was missing the latest
one. Per analogiam with changes in the same commit to other source files,
go for &SS_INIT.

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:02 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.58: +10 -6 lines
Diff to previous 1.58 (colored) next main 1.59 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD

Revision 1.59 / (download) - annotate - [select for diffs], Fri Apr 21 15:10:35 2017 UTC (6 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: bouyer-socketcan-base1
Changes since 1.58: +10 -6 lines
Diff to previous 1.58 (colored) to selected 1.6.2.4 (colored)

- Propagate the signal mask from the ucontext_t to the newly created thread
  as specified by _lwp_create(2)
- Reset the signal stack for threads created with _lwp_create(2)

Revision 1.57.2.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:47 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD

Revision 1.56.12.2 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:56 2017 UTC (7 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.56.12.1: +4 -4 lines
Diff to previous 1.56.12.1 (colored) to branchpoint 1.56 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD

Revision 1.58 / (download) - annotate - [select for diffs], Sun Jan 15 01:28:14 2017 UTC (7 years, 2 months ago) by maya
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, nick-nhusb-base-20170204, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored) to selected 1.6.2.4 (colored)

use a bound string copy

Revision 1.56.12.1 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:07 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD

Revision 1.57 / (download) - annotate - [select for diffs], Fri Jul 24 13:02:52 2015 UTC (8 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored) to selected 1.6.2.4 (colored)

Unused inits (harmless).

Found by Brainy.

Revision 1.52.8.4 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.52.8.3: +9 -9 lines
Diff to previous 1.52.8.3 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored) to selected 1.6.2.4 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.54.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:18:58 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.54.2.1: +9 -9 lines
Diff to previous 1.54.2.1 (colored) to branchpoint 1.54 (colored) to selected 1.6.2.4 (colored)

resync from head

Revision 1.56 / (download) - annotate - [select for diffs], Fri Mar 29 01:08:17 2013 UTC (11 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, khorben-n900
Branch point for: nick-nhusb
Changes since 1.55: +9 -9 lines
Diff to previous 1.55 (colored) to selected 1.6.2.4 (colored)

Centralize the computation of struct timespec to the int timo.
Make lwp_park take the regular arguments for specifying what kind
of timeout we supply like clock_nanosleep(), namely clockid_t and flags.

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:43 2012 UTC (11 years, 4 months ago) by tls
Branch: tls-maxphys
Changes since 1.54: +5 -10 lines
Diff to previous 1.54 (colored) to selected 1.6.2.4 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.52.14.1.2.1 / (download) - annotate - [select for diffs], Thu Nov 1 16:45:03 2012 UTC (11 years, 4 months ago) by matt
Branch: matt-nb6-plus
Changes since 1.52.14.1: +5 -10 lines
Diff to previous 1.52.14.1 (colored) next main 1.52.14.2 (colored) to selected 1.6.2.4 (colored)

sync with netbsd-6-0-RELEASE.

Revision 1.52.8.3 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:35 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.52.8.2: +5 -10 lines
Diff to previous 1.52.8.2 (colored) to branchpoint 1.52 (colored) to selected 1.6.2.4 (colored)

sync with head

Revision 1.52.14.2 / (download) - annotate - [select for diffs], Mon Oct 1 23:07:07 2012 UTC (11 years, 5 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base
Changes since 1.52.14.1: +3 -8 lines
Diff to previous 1.52.14.1 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored) to selected 1.6.2.4 (colored)

Pull up following revision(s) (requested by rmind in ticket #583):
	sys/kern/sys_lwp.c: revision 1.55
	sys/sys/lwp.h: revision 1.164
	sys/kern/kern_exit.c: revision 1.242
	sys/kern/kern_lwp.c: revision 1.173
exit_lwps, lwp_wait: fix a race condition by re-trying if p_lock was dropped
in a case of process exit.  Necessary to re-flag all LWPs for exit, as their
state might have changed or new LWPs spawned.
Should fix PR/46168 and PR/46402.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Sep 27 20:43:15 2012 UTC (11 years, 6 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Changes since 1.54: +5 -10 lines
Diff to previous 1.54 (colored) to selected 1.6.2.4 (colored)

exit_lwps, lwp_wait: fix a race condition by re-trying if p_lock was dropped
in a case of process exit.  Necessary to re-flag all LWPs for exit, as their
state might have changed or new LWPs spawned.

Should fix PR/46168 and PR/46402.

Revision 1.52.12.2 / (download) - annotate - [select for diffs], Sat Jun 2 11:09:34 2012 UTC (11 years, 9 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.52.12.1: +52 -32 lines
Diff to previous 1.52.12.1 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored) to selected 1.6.2.4 (colored)

sync to latest -current.

Revision 1.52.8.2 / (download) - annotate - [select for diffs], Wed May 23 10:08:11 2012 UTC (11 years, 10 months 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) to selected 1.6.2.4 (colored)

sync with head.

Revision 1.52.14.1 / (download) - annotate - [select for diffs], Mon May 21 15:25:56 2012 UTC (11 years, 10 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-0-RC2, netbsd-6-0-RC1
Branch point for: matt-nb6-plus
Changes since 1.52: +56 -36 lines
Diff to previous 1.52 (colored) to selected 1.6.2.4 (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 (11 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.53: +52 -32 lines
Diff to previous 1.53 (colored) to selected 1.6.2.4 (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 (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.52: +2 -21 lines
Diff to previous 1.52 (colored) to selected 1.6.2.4 (colored)

sync with head

Revision 1.52.12.1 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:48 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.52: +2 -21 lines
Diff to previous 1.52 (colored) to selected 1.6.2.4 (colored)

sync to -current.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Feb 19 21:06:56 2012 UTC (12 years, 1 month 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) to selected 1.6.2.4 (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 years, 11 months 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) to selected 1.6.2.4 (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 (13 years 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) to selected 1.6.2.4 (colored)

sync with head

Revision 1.43.4.1 / (download) - annotate - [select for diffs], Sun Nov 21 17:36:45 2010 UTC (13 years, 4 months ago) by riz
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, 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) to selected 1.6.2.4 (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 (13 years, 7 months 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.39.2.4 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:42 2010 UTC (13 years, 7 months 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) to selected 1.6.2.4 (colored)

sync with head.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jul 7 01:30:37 2010 UTC (13 years, 8 months 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) to selected 1.6.2.4 (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 (13 years, 8 months 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) to selected 1.6.2.4 (colored)

sync with head

Revision 1.51 / (download) - annotate - [select for diffs], Sun Jun 13 04:13:32 2010 UTC (13 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.50: +4 -3 lines
Diff to previous 1.50 (colored) to selected 1.6.2.4 (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 (13 years, 9 months ago) by skrll
Branch: MAIN
Changes since 1.49: +11 -7 lines
Diff to previous 1.49 (colored) to selected 1.6.2.4 (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 (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.48: +7 -8 lines
Diff to previous 1.48 (colored) to selected 1.6.2.4 (colored)

sync with head

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

Sync with HEAD.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Apr 23 19:18:09 2010 UTC (13 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.48: +7 -8 lines
Diff to previous 1.48 (colored) to selected 1.6.2.4 (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 (14 years 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) to selected 1.6.2.4 (colored)

sync with head

Revision 1.48 / (download) - annotate - [select for diffs], Sun Nov 1 21:46:09 2009 UTC (14 years, 4 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) to selected 1.6.2.4 (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 (14 years, 5 months ago) by rmind
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.46: +30 -19 lines
Diff to previous 1.46 (colored) to selected 1.6.2.4 (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 (14 years, 5 months ago) by rmind
Branch: MAIN
Changes since 1.45: +12 -19 lines
Diff to previous 1.45 (colored) to selected 1.6.2.4 (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 (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.44: +7 -2 lines
Diff to previous 1.44 (colored) next main 1.45 (colored) to selected 1.6.2.4 (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 (14 years, 10 months 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) to selected 1.6.2.4 (colored)

sync with head.

Revision 1.43.2.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:00 2009 UTC (14 years, 11 months 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Mar 29 09:24:52 2009 UTC (15 years 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) to selected 1.6.2.4 (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 (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.43: +4 -3 lines
Diff to previous 1.43 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.34.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:20 2009 UTC (15 years, 2 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:52 2009 UTC (15 years, 2 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) to selected 1.6.2.4 (colored)

merge christos-time_t

Revision 1.37.2.2 / (download) - annotate - [select for diffs], Sat Nov 1 21:22:27 2008 UTC (15 years, 4 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) to selected 1.6.2.4 (colored)

Sync with head.

Revision 1.41.4.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:28 2008 UTC (15 years, 5 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Oct 16 08:47:07 2008 UTC (15 years, 5 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-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, 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) to selected 1.6.2.4 (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 (15 years, 5 months ago) by wrstuden
Branch: MAIN
Changes since 1.41: +21 -2 lines
Diff to previous 1.41 (colored) to selected 1.6.2.4 (colored)

Merge wrstuden-revivesa into HEAD.

Revision 1.40.2.3 / (download) - annotate - [select for diffs], Sat Jul 26 19:51:12 2008 UTC (15 years, 8 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) to selected 1.6.2.4 (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 (15 years, 9 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) to selected 1.6.2.4 (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 (15 years, 9 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) to selected 1.6.2.4 (colored)

sync with head

Revision 1.34.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:11 2008 UTC (15 years, 9 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.41 / (download) - annotate - [select for diffs], Mon May 26 12:08:39 2008 UTC (15 years, 10 months 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) to selected 1.6.2.4 (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 (15 years, 10 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.40: +14 -2 lines
Diff to previous 1.40 (colored) to selected 1.6.2.4 (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 (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.37: +36 -43 lines
Diff to previous 1.37 (colored) to selected 1.6.2.4 (colored)

sync with head.

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

sync with head.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:04 2008 UTC (15 years, 11 months 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) to selected 1.6.2.4 (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 (15 years, 11 months 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) to selected 1.6.2.4 (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 (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored) to selected 1.6.2.4 (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 (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.34: +8 -7 lines
Diff to previous 1.34 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Sat Mar 29 20:47:01 2008 UTC (16 years ago) by christos
Branch: christos-time_t
Changes since 1.37: +4 -3 lines
Diff to previous 1.37 (colored) to selected 1.6.2.4 (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 (16 years 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) to selected 1.6.2.4 (colored)

sync with head.

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

sync with head.

Revision 1.25.2.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:00 2008 UTC (16 years 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) to selected 1.6.2.4 (colored)

sync with HEAD

Revision 1.37 / (download) - annotate - [select for diffs], Mon Mar 17 16:55:27 2008 UTC (16 years 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) to selected 1.6.2.4 (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 (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.8: +5 -4 lines
Diff to previous 1.6.2.8 (colored) to selected 1.6.2.4 (colored)

sync with head.

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

+2008 for the copyright

Revision 1.35 / (download) - annotate - [select for diffs], Wed Mar 12 11:00:43 2008 UTC (16 years ago) by ad
Branch: MAIN
Changes since 1.34: +4 -3 lines
Diff to previous 1.34 (colored) to selected 1.6.2.4 (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 (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.7: +3 -3 lines
Diff to previous 1.6.2.7 (colored) to selected 1.6.2.4 (colored)

sync with head.

Revision 1.26.6.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:47 2008 UTC (16 years, 1 month 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Feb 14 14:26:57 2008 UTC (16 years, 1 month 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) to selected 1.6.2.4 (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 (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.6: +48 -55 lines
Diff to previous 1.6.2.6 (colored) to selected 1.6.2.4 (colored)

sync with head

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

sync with HEAD

Revision 1.31.6.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:56:12 2008 UTC (16 years, 2 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) to selected 1.6.2.4 (colored)

Sync with HEAD

Revision 1.33 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:53 2008 UTC (16 years, 2 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) to selected 1.6.2.4 (colored)

Merge vmlocking2 to head.

Revision 1.26.6.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:10 2007 UTC (16 years, 3 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.31.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:44 2007 UTC (16 years, 3 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) to selected 1.6.2.4 (colored)

Sync with head.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:10 2007 UTC (16 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.31: +47 -47 lines
Diff to previous 1.31 (colored) to selected 1.6.2.4 (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 (16 years, 3 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

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

sync with head

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

Sync with HEAD.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Dec 2 15:49:38 2007 UTC (16 years, 3 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) to selected 1.6.2.4 (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 (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.26: +107 -7 lines
Diff to previous 1.26 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.6.2.5 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:51 2007 UTC (16 years, 4 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 (16 years, 4 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.26.4.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:25 2007 UTC (16 years, 4 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) to selected 1.6.2.4 (colored)

Sync with HEAD

Revision 1.30 / (download) - annotate - [select for diffs], Mon Nov 12 23:11:59 2007 UTC (16 years, 4 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) to selected 1.6.2.4 (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 (16 years, 4 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:06 2007 UTC (16 years, 4 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) to selected 1.6.2.4 (colored)

sync with -HEAD

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

Fix error in previous.

Revision 1.28 / (download) - annotate - [select for diffs], Wed Nov 7 00:37:23 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.27: +77 -2 lines
Diff to previous 1.27 (colored) to selected 1.6.2.4 (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 (16 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.25: +7 -8 lines
Diff to previous 1.25 (colored) to selected 1.6.2.4 (colored)

sync with HEAD

Revision 1.23.2.4 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:34 2007 UTC (16 years, 4 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Nov 6 00:42:44 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Changes since 1.26: +6 -7 lines
Diff to previous 1.26 (colored) to selected 1.6.2.4 (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 (16 years, 5 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) to selected 1.6.2.4 (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 - [selected], Sat Oct 27 11:35:35 2007 UTC (16 years, 5 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 (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.10: +3 -3 lines
Diff to previous 1.12.2.10 (colored) to selected 1.6.2.4 (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 (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.9: +3 -10 lines
Diff to previous 1.12.2.9 (colored) to selected 1.6.2.4 (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 (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.8: +2 -3 lines
Diff to previous 1.12.2.8 (colored) to selected 1.6.2.4 (colored)

Sync with head.

Revision 1.23.2.3 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:04 2007 UTC (16 years, 6 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.21.2.2 / (download) - annotate - [select for diffs], Mon Sep 10 10:56:01 2007 UTC (16 years, 6 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.12.2.8 / (download) - annotate - [select for diffs], Sun Sep 9 23:12:20 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.7: +5 -4 lines
Diff to previous 1.12.2.7 (colored) to selected 1.6.2.4 (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 (16 years, 6 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) to selected 1.6.2.4 (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 (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.2.2: +212 -176 lines
Diff to previous 1.6.2.2 (colored) to selected 1.6.2.4 (colored)

sync with head.

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

Sync with HEAD.

Revision 1.23.2.2 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:39 2007 UTC (16 years, 7 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) to selected 1.6.2.4 (colored)

Sync with HEAD.

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

Sync with HEAD.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Aug 15 02:50:40 2007 UTC (16 years, 7 months ago) by rmind
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.24: +6 -2 lines
Diff to previous 1.24 (colored) to selected 1.6.2.4 (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 (16 years, 7 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.23: +101 -89 lines
Diff to previous 1.23 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Aug 7 19:00:42 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.23: +101 -89 lines
Diff to previous 1.23 (colored) to selected 1.6.2.4 (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 (16 years, 8 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) to selected 1.6.2.4 (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 (16 years, 8 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 (16 years, 8 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) to selected 1.6.2.4 (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 (16 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.21: +5 -4 lines
Diff to previous 1.21 (colored) to selected 1.6.2.4 (colored)

KNF

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

Sync with head.

Revision 1.12.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:10:09 2007 UTC (16 years, 8 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) to selected 1.6.2.4 (colored)

Sync with head.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jul 11 00:17:23 2007 UTC (16 years, 8 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) to selected 1.6.2.4 (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 (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.4: +26 -12 lines
Diff to previous 1.12.2.4 (colored) to selected 1.6.2.4 (colored)

Sync with head.

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

Sync with head.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jun 3 09:50:12 2007 UTC (16 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.19: +26 -12 lines
Diff to previous 1.19 (colored) to selected 1.6.2.4 (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 (16 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.18: +8 -16 lines
Diff to previous 1.18 (colored) to selected 1.6.2.4 (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 (16 years, 11 months 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) to selected 1.6.2.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 (16 years, 11 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.3.2.7: +4 -6 lines
Diff to previous 1.3.2.7 (colored) to selected 1.6.2.4 (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 (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.3.2.6: +8 -3 lines
Diff to previous 1.3.2.6 (colored) to selected 1.6.2.4 (colored)

sync with head.

Revision 1.12.2.3 / (download) - annotate - [select for diffs], Tue Apr 10 18:34:05 2007 UTC (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.2: +4 -10 lines
Diff to previous 1.12.2.2 (colored) to selected 1.6.2.4 (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 (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.12.2.1: +83 -109 lines
Diff to previous 1.12.2.1 (colored) to selected 1.6.2.4 (colored)

Sync with head.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Tue Apr 10 11:41:11 2007 UTC (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.12: +4 -12 lines
Diff to previous 1.12 (colored) to selected 1.6.2.4 (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 (17 years 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) to selected 1.6.2.4 (colored)

Pullup to -current

Revision 1.18 / (download) - annotate - [select for diffs], Sat Mar 24 16:43:56 2007 UTC (17 years 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) to selected 1.6.2.4 (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 (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.3.2.5: +77 -108 lines
Diff to previous 1.3.2.5 (colored) to selected 1.6.2.4 (colored)

sync with head.

Revision 1.3.2.5 / (download) - annotate - [select for diffs], Sat Mar 24 00:43:08 2007 UTC (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.3.2.4: +3 -3 lines
Diff to previous 1.3.2.4 (colored) to selected 1.6.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 (17 years ago) by ad
Branch: MAIN
Changes since 1.16: +10 -5 lines
Diff to previous 1.16 (colored) to selected 1.6.2.4 (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 (17 years ago) by ad
Branch: MAIN
Changes since 1.15: +12 -16 lines
Diff to previous 1.15 (colored) to selected 1.6.2.4 (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 (17 years ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.14: +49 -92 lines
Diff to previous 1.14 (colored) to selected 1.6.2.4 (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 (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.3.2.3: +3 -3 lines
Diff to previous 1.3.2.3 (colored) to selected 1.6.2.4 (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 (17 years ago) by ad
Branch: MAIN
Changes since 1.14: +49 -92 lines
Diff to previous 1.14 (colored) to selected 1.6.2.4 (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 (17 years ago) by yamt
Branch: MAIN
Branch point for: reinoud-bufcleanup
Changes since 1.13: +9 -9 lines
Diff to previous 1.13 (colored) to selected 1.6.2.4 (colored)

sys__lwp_park: whitespace.  no functional change.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Mar 14 23:00:32 2007 UTC (17 years ago) by yamt
Branch: MAIN
Changes since 1.12: +12 -1 lines
Diff to previous 1.12 (colored) to selected 1.6.2.4 (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 (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.3.2.2: +24 -16 lines
Diff to previous 1.3.2.2 (colored) to selected 1.6.2.4 (colored)

Sync with HEAD.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Mar 9 05:00:26 2007 UTC (17 years 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) to selected 1.6.2.4 (colored)

fix typos in comments.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Mar 2 21:06:27 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored) to selected 1.6.2.4 (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 (17 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored) to selected 1.6.2.4 (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 (17 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.8: +6 -4 lines
Diff to previous 1.8 (colored) to selected 1.6.2.4 (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 (17 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.7: +19 -13 lines
Diff to previous 1.7 (colored) to selected 1.6.2.4 (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 (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.3.2.1: +15 -13 lines
Diff to previous 1.3.2.1 (colored) to selected 1.6.2.4 (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 (17 years, 1 month 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) to selected 1.6.2.4 (colored)

implement priority inheritance.

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

sync with head.

Revision 1.6.2.1, Wed Feb 21 23:48:15 2007 UTC (17 years, 1 month 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 (17 years, 1 month ago) by thorpej
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored) to selected 1.6.2.4 (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 (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored) to selected 1.6.2.4 (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 (17 years, 1 month ago) by cube
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored) to selected 1.6.2.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 (17 years, 1 month ago) by pavel
Branch: MAIN
Changes since 1.3: +10 -10 lines
Diff to previous 1.3 (colored) to selected 1.6.2.4 (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 (17 years, 1 month ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored) to selected 1.6.2.4 (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 (17 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.1: +701 -0 lines
Diff to previous 1.1 (colored) to selected 1.6.2.4 (colored)

Merge newlock2 to head.

Revision 1.1.2.12 / (download) - annotate - [select for diffs], Sun Feb 4 17:28:43 2007 UTC (17 years, 1 month 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) to selected 1.6.2.4 (colored)

Push kernel_lock back further.

Revision 1.1.2.11 / (download) - annotate - [select for diffs], Sat Feb 3 16:32:50 2007 UTC (17 years, 1 month 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) to selected 1.6.2.4 (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 (17 years, 2 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) to selected 1.6.2.4 (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 (17 years, 2 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) to selected 1.6.2.4 (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 (17 years, 2 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) to selected 1.6.2.4 (colored)

Put back a missing wakeup.

Revision 1.1.2.7 / (download) - annotate - [select for diffs], Tue Jan 16 05:22:10 2007 UTC (17 years, 2 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) to selected 1.6.2.4 (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 (17 years, 2 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) to selected 1.6.2.4 (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 (17 years, 2 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) to selected 1.6.2.4 (colored)

Checkpoint work in progress.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:44 2006 UTC (17 years, 3 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) to selected 1.6.2.4 (colored)

Checkpoint work in progress.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:37 2006 UTC (17 years, 4 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) to selected 1.6.2.4 (colored)

Checkpoint work in progress.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Tue Oct 24 21:10:21 2006 UTC (17 years, 5 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) to selected 1.6.2.4 (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 (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.1: +313 -0 lines
Diff to previous 1.1 (colored) to selected 1.6.2.4 (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 (17 years, 5 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>