The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.298: download - view: text, markup, annotated - select for diffs
Sun Oct 8 12:38:58 2023 UTC (16 months ago) by ad
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.297: preferred, colored
Changes since revision 1.297: +6 -7 lines
Defer some wakeups till lock release.

Revision 1.297: download - view: text, markup, annotated - select for diffs
Wed Oct 4 20:48:13 2023 UTC (16 months, 1 week ago) by ad
Branches: MAIN
Diff to: previous 1.296: preferred, colored
Changes since revision 1.296: +22 -17 lines
match_process(): most of the fields being inspected are covered by proc_lock
so don't grab p->p_lock so much.

Revision 1.296: download - view: text, markup, annotated - select for diffs
Wed Oct 4 20:42:38 2023 UTC (16 months, 1 week ago) by ad
Branches: MAIN
Diff to: previous 1.295: preferred, colored
Changes since revision 1.295: +3 -3 lines
Sprinkle a bunch more calls to lwp_need_userret().  There should be no
functional change but it does get rid of a bunch of assumptions about how
mi_userret() works making it easier to adjust in that in the future, and
works as a kind of documentation too.

Revision 1.295: download - view: text, markup, annotated - select for diffs
Wed Oct 4 20:29:18 2023 UTC (16 months, 1 week ago) by ad
Branches: MAIN
Diff to: previous 1.294: preferred, colored
Changes since revision 1.294: +5 -4 lines
Eliminate l->l_biglocks.  Originally I think it had a use but these days a
local variable will do.

Revision 1.294: download - view: text, markup, annotated - select for diffs
Wed Oct 4 20:28:06 2023 UTC (16 months, 1 week ago) by ad
Branches: MAIN
Diff to: previous 1.293: preferred, colored
Changes since revision 1.293: +2 -4 lines
Eliminate l->l_ncsw and l->l_nivcsw.  From memory think they were added
before we had per-LWP struct rusage; the same is now tracked there.

Revision 1.293: download - view: text, markup, annotated - select for diffs
Sun Dec 5 08:13:12 2021 UTC (3 years, 2 months ago) by msaitoh
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-1-RELEASE, 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
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +3 -3 lines
s/sytle/style/ in comment.

Revision 1.292: download - view: text, markup, annotated - select for diffs
Sun Oct 10 18:07:51 2021 UTC (3 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +24 -12 lines
Changes to make EVFILT_PROC MP-safe:

Because the locking protocol around processes is somewhat complex
compared to other events that can be posted on kqueues, introduce
new functions for posting NOTE_EXEC, NOTE_EXIT, and NOTE_FORK,
rather than just using the generic knote() function.  These functions
KASSERT() their locking expectations, and deal with other complexities
for each situation.

knote_proc_fork(), in particiular, needs to handle NOTE_TRACK, which
requires allocation of a new knote to attach to the child process.  We
don't want to be allocating memory while holding the parent's p_lock.
Furthermore, we also have to attach the tracking note to the child
process, which means we have to acquire the child's p_lock.

So, to handle all this, we introduce some additional synchronization
infrastructure around the 'knote' structure:

- Add the ability to mark a knote as being in a state of flux.  Knotes
  in this state are guaranteed not to be detached/deleted, thus allowing
  a code path drop other locks after putting a knote in this state.

- Code paths that wish to detach/delete a knote must first check if the
  knote is in-flux.  If so, they must wait for it to quiesce.  Because
  multiple threads of execution may attempt this concurrently, a mechanism
  exists for a single LWP to claim the detach responsibility; all other
  threads simply wait for the knote to disappear before they can make
  further progress.

- When kqueue_scan() encounters an in-flux knote, it simply treats the
  situation just like encountering another thread's queue marker -- wait
  for the flux to settle and continue on.

(The "in-flux knote" idea was inspired by FreeBSD, but this works differently
from their implementation, as the two kqueue implementations have diverged
quite a bit.)

knote_proc_fork() uses this infrastructure to implement NOTE_TRACK like so:

- Attempt to put the original tracking knote into a state of flux; if this
  fails (because the note has a detach pending), we skip all processing
  (the original process has lost interest, and we simply won the race).

- Once the note is in-flux, drop the kq and forking process's locks, and
  allocate 2 knotes: one to post the NOTE_CHILD event, and one to attach
  a new NOTE_TRACK to the child process.  Notably, we do NOT go through
  kqueue_register() to do this, but rather do all of the work directly
  and KASSERT() our assumptions; this allows us to directly control our
  interaction with locks.  All memory allocations here are performed with
  KM_NOSLEEP, in order to prevent holding the original knote in-flux
  indefinitely.

- Because the NOTE_TRACK use case adds knotes to kqueues through a
  sort of back-door mechanism, we must serialize with the closing of
  the destination kqueue's file descriptor, so steal another bit from
  the kq_count field to notify other threads that a kqueue is on its
  way out to prevent new knotes from being enqueued while the close
  path detaches them.

In addition to fixing EVFILT_PROC's reliance on KERNEL_LOCK, this also
fixes a long-standing bug whereby a NOTE_CHILD event could be dropped
if the child process exited before the interested process received the
NOTE_CHILD event (the same knote would be used to deliver the NOTE_EXIT
event, and would clobber the NOTE_CHILD's 'data' field).

Add a bunch of comments to explain what's going on in various critical
sections, and sprinkle additional KASSERT()s to validate assumptions
in several more locations.

Revision 1.290.2.1: download - view: text, markup, annotated - select for diffs
Mon Dec 14 14:38:13 2020 UTC (4 years, 1 month ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.290: preferred, colored; next MAIN 1.291: preferred, colored
Changes since revision 1.290: +3 -3 lines
Sync w/ HEAD.

Revision 1.291: download - view: text, markup, annotated - select for diffs
Sat Dec 5 18:17:01 2020 UTC (4 years, 2 months ago) by thorpej
Branches: 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-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
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +3 -3 lines
Refactor interval timers to make it possible to support types other than
the BSD/POSIX per-process timers:

- "struct ptimer" is split into "struct itimer" (common interval timer
  data) and "struct ptimer" (per-process timer data, which contains a
  "struct itimer").

- Introduce a new "struct itimer_ops" that supplies information about
  the specific kind of interval timer, including it's processing
  queue, the softint handle used to schedule processing, the function
  to call when the timer fires (which adds it to the queue), and an
  optional function to call when the CLOCK_REALTIME clock is changed by
  a call to clock_settime() or settimeofday().

- Rename some fuctions to clearly identify what they're operating on
  (ptimer vs itimer).

- Use kmem(9) to allocate ptimer-related structures, rather than having
  dedicated pools for them.

Welcome to NetBSD 9.99.77.

Revision 1.290: download - view: text, markup, annotated - select for diffs
Sat May 23 23:42:43 2020 UTC (4 years, 8 months ago) by ad
Branches: MAIN
Branch point for: thorpej-futex
Diff to: previous 1.289: preferred, colored
Changes since revision 1.289: +20 -20 lines
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.287.2.2: download - view: text, markup, annotated - select for diffs
Sat Apr 25 11:24:05 2020 UTC (4 years, 9 months ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.287.2.1: preferred, colored; branchpoint 1.287: preferred, colored; next MAIN 1.288: preferred, colored
Changes since revision 1.287.2.1: +4 -12 lines
Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.289: download - view: text, markup, annotated - select for diffs
Fri Apr 24 03:22:06 2020 UTC (4 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: bouyer-xenpvh-base2
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +4 -12 lines
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.271.2.4: download - view: text, markup, annotated - select for diffs
Tue Apr 21 18:42:42 2020 UTC (4 years, 9 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.271.2.3: preferred, colored; branchpoint 1.271: preferred, colored; next MAIN 1.272: preferred, colored
Changes since revision 1.271.2.3: +1 -0 lines
Sync with HEAD

Revision 1.287.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 20 11:29:10 2020 UTC (4 years, 9 months ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +3 -2 lines
Sync with HEAD

Revision 1.288: download - view: text, markup, annotated - select for diffs
Sun Apr 19 20:31:59 2020 UTC (4 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: phil-wifi-20200421, bouyer-xenpvh-base1
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +3 -2 lines
- Only increment nprocs when we're creating a new process, not just
  when allocating a PID.
- Per above, proc_free_pid() no longer decrements nprocs.  It's now done
  in proc_free() right after proc_free_pid().
- Ensure nprocs is accessed using atomics everywhere.

Revision 1.271.2.3: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:03 2020 UTC (4 years, 10 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.271.2.2: preferred, colored; branchpoint 1.271: preferred, colored
Changes since revision 1.271.2.2: +8 -1 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.271.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:51 2020 UTC (4 years, 10 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.271.2.1: preferred, colored; branchpoint 1.271: preferred, colored
Changes since revision 1.271.2.1: +34 -22 lines
Merge changes from current as of 20200406

Revision 1.287: download - view: text, markup, annotated - select for diffs
Sat Apr 4 20:20:12 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
CVS tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +13 -6 lines
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.286: download - view: text, markup, annotated - select for diffs
Thu Mar 26 21:31:55 2020 UTC (4 years, 10 months ago) by ad
Branches: MAIN
Diff to: previous 1.285: preferred, colored
Changes since revision 1.285: +5 -3 lines
Fix crash observed with procfs on current-users by David Hopper.  LWP refcnt
and p_zomblwp both must reach the needed state, and LSZOMB be set, under a
single hold of p_lock.

Revision 1.285: download - view: text, markup, annotated - select for diffs
Sun Mar 8 15:05:18 2020 UTC (4 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.284: preferred, colored
Changes since revision 1.284: +6 -6 lines
Kill off kernel_lock_plug_leak(), and go back to dropping kernel_lock in
exit1(), since there seems little hope of finding the leaking code any
time soon.  Can still be caught with LOCKDEBUG.

Revision 1.278.2.3: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:02 2020 UTC (4 years, 11 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.278.2.2: preferred, colored; branchpoint 1.278: preferred, colored; next MAIN 1.279: preferred, colored
Changes since revision 1.278.2.2: +15 -6 lines
Sync with head.

Revision 1.284: download - view: text, markup, annotated - select for diffs
Sat Feb 22 21:07:46 2020 UTC (4 years, 11 months ago) by ad
Branches: MAIN
CVS tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +7 -7 lines
exit1(): remove from the radix tree before setting zombie status, as
radix_tree_remove_node() can block on locks when freeing.

Reported-by: syzbot+02bf066c30f812b14f25@syzkaller.appspotmail.com

Revision 1.283: download - view: text, markup, annotated - select for diffs
Sat Feb 15 18:12:15 2020 UTC (4 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +3 -6 lines
- Move the LW_RUNNING flag back into l_pflag: updating l_flag without lock
  in softint_dispatch() is risky.  May help with the "softint screwup"
  panic.

- Correct the memory barriers around zombies switching into oblivion.

Revision 1.282: download - view: text, markup, annotated - select for diffs
Wed Jan 29 15:47:52 2020 UTC (5 years ago) by ad
Branches: MAIN
Diff to: previous 1.281: preferred, colored
Changes since revision 1.281: +9 -2 lines
- 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.281: download - view: text, markup, annotated - select for diffs
Mon Jan 27 21:09:33 2020 UTC (5 years ago) by ad
Branches: MAIN
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +7 -2 lines
- exit1(): for DIAGNOSTIC, call kernel_lock_plug_leak() (temporary).

- exit_lwps(): call lwp_need_userret() or LWP might never notice.

Revision 1.278.2.2: download - view: text, markup, annotated - select for diffs
Sat Jan 25 22:38:50 2020 UTC (5 years ago) by ad
Branches: ad-namecache
Diff to: previous 1.278.2.1: preferred, colored; branchpoint 1.278: preferred, colored
Changes since revision 1.278.2.1: +3 -2 lines
Sync with head.

Revision 1.280: download - view: text, markup, annotated - select for diffs
Wed Jan 22 12:23:04 2020 UTC (5 years ago) by ad
Branches: MAIN
CVS tags: ad-namecache-base2
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +3 -2 lines
Catch a leaked hold of kernel_lock sooner with DIAGNOSTIC and make the
message a bit more informative.

Revision 1.278.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 17 21:47:35 2020 UTC (5 years ago) by ad
Branches: ad-namecache
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +11 -19 lines
Sync with head.

Revision 1.279: download - view: text, markup, annotated - select for diffs
Wed Jan 8 17:38:42 2020 UTC (5 years, 1 month ago) by ad
Branches: MAIN
CVS tags: ad-namecache-base1
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +11 -19 lines
Hopefully fix some problems seen with MP support on non-x86, in particular
where curcpu() is defined as curlwp->l_cpu:

- mi_switch(): undo the ~2007ish optimisation to unlock curlwp before
  calling cpu_switchto().  It's not safe to let other actors mess with the
  LWP (in particular l->l_cpu) while it's still context switching.  This
  removes l->l_ctxswtch.

- Move the LP_RUNNING flag into l->l_flag and rename to LW_RUNNING since
  it's now covered by the LWP's lock.

- Ditch lwp_exit_switchaway() and just call mi_switch() instead.  Everything
  is in cache anyway so it wasn't buying much by trying to avoid saving old
  state.  This means cpu_switchto() will never be called with prevlwp ==
  NULL.

- Remove some KERNEL_LOCK handling which hasn't been needed for years.

Revision 1.278: download - view: text, markup, annotated - select for diffs
Fri Dec 6 21:36:10 2019 UTC (5 years, 2 months ago) by ad
Branches: MAIN
CVS tags: ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +3 -2 lines
Make it possible to call mi_switch() and immediately switch to another CPU.
This seems to take about 3us on my Intel system.  Two changes required:

- Have the caller to mi_switch() be responsible for calling spc_lock().
- Avoid using l->l_cpu in mi_switch().

While here:

- Add a couple of calls to membar_enter()
- Have the idle LWP set itself to LSIDL, to match softint_thread().
- Remove unused return value from mi_switch().

Revision 1.276.2.1: download - view: text, markup, annotated - select for diffs
Tue Oct 15 19:01:06 2019 UTC (5 years, 3 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Diff to: previous 1.276: preferred, colored; next MAIN 1.277: preferred, colored
Changes since revision 1.276: +3 -2 lines
Pull up following revision(s) (requested by kamil in ticket #320):

	sys/kern/kern_synch.c: revision 1.324
	sys/kern/kern_sig.c: revision 1.366
	sys/kern/kern_exit.c: revision 1.277
	sys/kern/kern_lwp.c: revision 1.204
	sys/kern/sys_ptrace_common.c: revision 1.62

Separate flag for suspended by _lwp_suspend and suspended by a debugger

Once a thread was stopped with ptrace(2), userland process must not
be able to unstop it deliberately or by an accident.

This was a Windows-style behavior that makes threading tracing fragile.

Revision 1.277: download - view: text, markup, annotated - select for diffs
Thu Oct 3 22:48:44 2019 UTC (5 years, 4 months ago) by kamil
Branches: MAIN
CVS tags: phil-wifi-20191119
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +3 -2 lines
Separate flag for suspended by _lwp_suspend and suspended by a debugger

Once a thread was stopped with ptrace(2), userland process must not
be able to unstop it deliberately or by an accident.

This was a Windows-style behavior that makes threading tracing fragile.

Revision 1.276: download - view: text, markup, annotated - select for diffs
Thu Jun 13 20:20:18 2019 UTC (5 years, 8 months ago) by kamil
Branches: MAIN
CVS tags: netbsd-9-base
Branch point for: netbsd-9
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +9 -3 lines
Correct use-after-free issue in vfork(2)

In the previous behavior vforking parent was keeping pointer to a child
and checking whether it clears a PL_PPWAIT in its bitfield p_lflag. However
a child can go invalid between exec/exit event from child and waking up
vforked parent and this can cause invalid pointer read and in the worst
scenario kernel crash.

In the new behavior vforked child keeps a reference to vforked parent LWP
and sets a value l_vforkwaiting to false. This means that vforked child
can finish its work, exec/exit and be terminated and once parent will be
woken up it will read its own field whether its child is still blocking.

Add new field in struct lwp: l_vforkwaiting protected by proc_lock.
In future it should be refactored and all PL_PPWAIT users transformed to
l_vforkwaiting and next l_vforkwaiting probably transformed into a bit
field.

This is another attempt of fixing this bug after <rmind> from 2012 in
commit:

Author: rmind <rmind@NetBSD.org>
Date:   Sun Jul 22 22:40:18 2012 +0000

    fork1: fix use-after-free problems.  Addresses PR/46128 from Andrew Doran.
    Note: PL_PPWAIT should be fully replaced and modificaiton of l_pflag by
    other LWP is undesirable, but this is enough for netbsd-6.

The new version no longer performs unsafe access in l_lflag changing the
LP_VFORKWAIT bit.

Verified with ATF t_vfork and t_ptrace* tests and they are no longer
causing any issues in my local setup.

Fixes PR/46128 by Andrew Doran

Revision 1.271.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:03 2019 UTC (5 years, 8 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +8 -17 lines
Sync with HEAD

Revision 1.275: download - view: text, markup, annotated - select for diffs
Fri May 17 03:34:26 2019 UTC (5 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: phil-wifi-20190609
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +3 -2 lines
Implement an aggressive psref leak detector

It is yet another psref leak detector that enables to tell where a leak occurs
while a simpler version that is already committed just tells an occurrence of a
leak.

Investigating of psref leaks is hard because once a leak occurs a percpu list of
psref that tracks references can be corrupted.  A reference to a tracking object
is memorized in the list via an intermediate object (struct psref) that is
normally allocated on a stack of a thread.  Thus, the intermediate object can be
overwritten on a leak resulting in corruption of the list.

The tracker makes a shadow entry to an intermediate object and stores some hints
into it (currently it's a caller address of psref_acquire).  We can detect a
leak by checking the entries on certain points where any references should be
released such as the return point of syscalls and the end of each softint
handler.

The feature is expensive and enabled only if the kernel is built with
PSREF_DEBUG.

Proposed on tech-kern

Revision 1.274: download - view: text, markup, annotated - select for diffs
Fri Mar 1 09:02:03 2019 UTC (5 years, 11 months ago) by hannken
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +6 -2 lines
Move pointer to fstrans private data into "struct lwp".

Ride NetBSD 8.99.35

Revision 1.270.2.3: download - view: text, markup, annotated - select for diffs
Wed Dec 26 14:02:03 2018 UTC (6 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.270.2.2: preferred, colored; branchpoint 1.270: preferred, colored; next MAIN 1.271: preferred, colored
Changes since revision 1.270.2.2: +3 -2 lines
Sync with HEAD, resolve a few conflicts

Revision 1.268.8.2: download - view: text, markup, annotated - select for diffs
Fri Nov 30 10:32:22 2018 UTC (6 years, 2 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Diff to: previous 1.268.8.1: preferred, colored; branchpoint 1.268: preferred, colored; next MAIN 1.269: preferred, colored
Changes since revision 1.268.8.1: +3 -2 lines
Pull up following revision(s) (requested by maxv in ticket #1114):

	sys/kern/kern_exit.c: revision 1.273

Fix info leak. There is one branch where 'status' is not initialized at
all.

        + Possible info leak: [len=4, leaked=4]
        | #0 0xffffffff80baf397 in kleak_copyout
        | #1 0xffffffff80b56d0c in sys_wait6
        | #2 0xffffffff80259c42 in syscall

Revision 1.273: download - view: text, markup, annotated - select for diffs
Thu Nov 29 12:37:22 2018 UTC (6 years, 2 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +3 -2 lines
Fix info leak. There is one branch where 'status' is not initialized at
all.

	+ Possible info leak: [len=4, leaked=4]
	| #0 0xffffffff80baf397 in kleak_copyout
	| #1 0xffffffff80b56d0c in sys_wait6
	| #2 0xffffffff80259c42 in syscall

Revision 1.270.2.2: download - view: text, markup, annotated - select for diffs
Sat Jul 28 04:38:08 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.270.2.1: preferred, colored; branchpoint 1.270: preferred, colored
Changes since revision 1.270.2.1: +2 -17 lines
Sync with HEAD

Revision 1.272: download - view: text, markup, annotated - select for diffs
Thu Jul 12 10:46:48 2018 UTC (6 years, 7 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +2 -17 lines
Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

 * Removes "options PERFCTRS", the associated includes, and the associated
   ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
   good.

 * Removes the PMC code of ARM XSCALE.

 * Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

 * Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
   definitions are put in sysarch.h.

 * Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
   and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
   netbsd32 and rump.

 * Removes the pmc_evid_t and pmc_ctr_t types.

 * Removes all the associated man pages. The sets are marked as obsolete.

Revision 1.270.2.1: download - view: text, markup, annotated - select for diffs
Mon May 21 04:36:15 2018 UTC (6 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +3 -2 lines
Sync with HEAD

Revision 1.271: download - view: text, markup, annotated - select for diffs
Mon May 7 21:03:45 2018 UTC (6 years, 9 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-0625, pgoyette-compat-0521
Branch point for: phil-wifi
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +3 -2 lines
Load the struct rusage text, data, and stack fields from the vmspace struct.
Before they were all 0. We update them when we call getrusage() or on
process exit() so that the children rusage is accounted for.

Revision 1.268.8.1: download - view: text, markup, annotated - select for diffs
Thu Apr 12 13:42:48 2018 UTC (6 years, 10 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +5 -6 lines
Pull up following revision(s) (requested by kamil in ticket #713):

	sys/modules/procfs/Makefile: revision 1.4
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.98
	bin/ps/ps.1: revision 1.108
	sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.32
	sys/miscfs/procfs/procfs_vnops.c: revision 1.198
	sys/kern/sys_ptrace_common.c: revision 1.23
	sys/kern/sys_ptrace_common.c: revision 1.24
	sbin/mount_procfs/mount_procfs.8: revision 1.36
	sys/kern/sys_ptrace_common.c: revision 1.25
	sys/kern/sys_ptrace.c: revision 1.5
	sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.30
	sys/sys/proc.h: revision 1.342
	sys/kern/sys_ptrace_common.c: revision 1.26
	sys/miscfs/procfs/procfs_ctl.c: file removal
	sys/kern/sys_ptrace_common.c: revision 1.27
	sys/miscfs/procfs/procfs_subr.c: revision 1.109
	sys/kern/sys_ptrace_common.c: revision 1.28
	sys/secmodel/extensions/secmodel_extensions.c: revision 1.8
	sys/kern/sys_ptrace_common.c: revision 1.29
	sys/sys/ptrace.h: revision 1.62
	sys/compat/netbsd32/netbsd32_signal.c: revision 1.45
	share/man/man9/kauth.9: revision 1.109
	sys/miscfs/procfs/files.procfs: revision 1.12
	sys/compat/netbsd32/netbsd32.h: revision 1.115
	sys/miscfs/procfs/procfs.h: revision 1.72
	sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.5
	sys/kern/kern_sig.c: revision 1.337
	sys/sys/kauth.h: revision 1.75
	sys/sys/sysctl.h: revision 1.224
	sys/kern/sys_ptrace_common.c: revision 1.30
	sys/kern/sys_ptrace_common.c: revision 1.31
	sys/kern/sys_ptrace_common.c: revision 1.32
	sys/kern/sys_ptrace_common.c: revision 1.33
	sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.20
	sys/kern/sys_ptrace_common.c: revision 1.34
	sys/kern/sys_ptrace_common.c: revision 1.36
	sys/kern/kern_proc.c: revision 1.207
	sys/kern/kern_exit.c: revision 1.269
	doc/TODO.ptrace: revision 1.29

Make {s,g}et{db,fp,}regs work again for PK_32 processes
XXX: pullup-8

add disgusting magic to handle compat_netbsd32 as a module.

use process_*reg32 instead of struct *reg32.

Remove the filesystem tracing feature

This is a legacy interface from 4.4BSD, and it was
introduced to overcome shortcomings of ptrace(2) at that time, which are
no longer relevant (performance). Today /proc/#/ctl offers a narrow
subset of ptrace(2) commands and is not applicable for modern
applications use beyond simplistic tracing scenarios.

This removal will simplify kernel internals. Users will still be able to
use all the other /proc files.

This change won't affect other procfs files neither Linux compat
features within mount_procfs(8). /proc/#/ctl isn't available on Linux.

Remove:
 - /proc/#/ctl from mount_procfs(8)
 - P_FSTRACE note from the documentation of ps(1)
 - /proc/#/ctl and filesystem tracing documentation from mount_procfs(8)
 - KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9)
 - source code file miscfs/procfs/procfs_ctl.c
 - PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h
 - KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h
 - PSL_FSTRACE (0x00010000) from sys/sys/proc.h
 - P_FSTRACE (0x00010000) from sys/sys/sysctl.h

Reduce code complexity after removal of this functionality.

Update TODO.ptrace accordingly: remove two entries about /proc tracing.

Do not keep legacy notes as comments in the headers about removed

PSL_FSTRACE / P_FSTRACE, as this interface had little number of users
(close or equal to zero).
Proposed on tech-kern@.

All filesystem tracing utility users are encouraged to switch to ptrace(2).

Sponsored by <The NetBSD Foundation>

untangle the mess:
- factor out common code
- break each ptrace subcall to its own sub-function
  .. more to come ...
- reduce ifdef ugliness by moving it up top.
- factor out PT_IO and make PT_{READ,WRITE}_{I,D} use it
- factor out PT_DUMPCORE
- factor out sendsig code
  .. more to come ...

handle siginfo requests for ptrace32

ptrace: Partially undo PT_{READ,WRITE}_{I,D} and unbreak these commands

The refactored code did not work and was generating EFAULT.

Sponsored by <The NetBSD Foundation>

Merge the code back; the problem was that since we are reading/writing
to a kernel address for PT_{READ,WRITE}_{I,D} we need the kernel vmspace.
provide separate read and write functions to accomodate register functions
that need a size argument.

don't ignore error from copyout_piod

Use the proper process (the tracee) to get information about lwps and
registers and the tracer for vmspace.

Add new sysctl(3) entry: security.models.extensions.user_set_dbregs

Model this new sysctl(3) entry after "user_set_cpu_affinity" in the same
level of sysctl(3) switches.

Allow to read unconditionally Debug Registers (no change here). This is
convenient as even if a user of a debugger does not use hardware assisted
watchpoints/breakpoints, a debugger can still prompt these values to store
in an internal cache with context of registers. Reading them should have
no security concerns.

Add a paranoid MI switch that prohibits by default setting these registers
by a regular user (non-superuser). Make this switch disabled by default.
There are enough reserved bits out there to allow using them
unconditionally on hardened hosts.

Features shipped with Debug Registers are optional features in debuggers.
There is no reduction in elementary functionality.

Reviewed by <christos>

Sponsored by <The NetBSD Foundation>

Revision 1.241.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:38:44 2017 UTC (7 years, 2 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.241.2.3: preferred, colored; next MAIN 1.242: preferred, colored
Changes since revision 1.241.2.3: +423 -78 lines
update from HEAD

Revision 1.270: download - view: text, markup, annotated - select for diffs
Tue Nov 7 19:44:04 2017 UTC (7 years, 3 months ago) by christos
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +3 -2 lines
Store full executable path in p->p_path as discussed in tech-kern.
This means that the full executable path is always available.

- exec_elf.c: use p->path to set AT_SUN_EXECNAME, and since this is
  always set, do so unconditionally.
- kern_exec.c: simplify pathexec, use kmem_strfree where appropriate
  and set p->p_path
- kern_exit.c: free p->p_path
- kern_fork.c: set p->p_path for the child.
- kern_proc.c: use p->p_path to return the executable pathname; the
  NULL check for p->p_path, should be a KASSERT?
- exec.h: gc ep_path, it is not used anymore
- param.h: bump version, 'struct proc' size change

TODO:
1. reference count the path string, to save copy at fork and free
   just before exec?
2. canonicalize the pathname by changing namei() to LOCKPARENT
   vnode and then using getcwd() on the parent directory?

Revision 1.269: download - view: text, markup, annotated - select for diffs
Mon Aug 28 00:46:07 2017 UTC (7 years, 5 months ago) by kamil
Branches: MAIN
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +5 -6 lines
Remove the filesystem tracing feature

This is a legacy interface from 4.4BSD, and it was
introduced to overcome shortcomings of ptrace(2) at that time, which are
no longer relevant (performance). Today /proc/#/ctl offers a narrow
subset of ptrace(2) commands and is not applicable for modern
applications use beyond simplistic tracing scenarios.

This removal will simplify kernel internals. Users will still be able to
use all the other /proc files.

This change won't affect other procfs files neither Linux compat
features within mount_procfs(8). /proc/#/ctl isn't available on Linux.

Remove:
 - /proc/#/ctl from mount_procfs(8)
 - P_FSTRACE note from the documentation of ps(1)
 - /proc/#/ctl and filesystem tracing documentation from mount_procfs(8)
 - KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9)
 - source code file miscfs/procfs/procfs_ctl.c
 - PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h
 - KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h
 - PSL_FSTRACE (0x00010000) from sys/sys/proc.h
 - P_FSTRACE (0x00010000) from sys/sys/sysctl.h

Reduce code complexity after removal of this functionality.

Update TODO.ptrace accordingly: remove two entries about /proc tracing.

Do not keep legacy notes as comments in the headers about removed
PSL_FSTRACE / P_FSTRACE, as this interface had little number of users
(close or equal to zero).

Proposed on tech-kern@.

All filesystem tracing utility users are encouraged to switch to ptrace(2).

Sponsored by <The NetBSD Foundation>

Revision 1.258.2.3: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:47 2017 UTC (7 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.258.2.2: preferred, colored; branchpoint 1.258: preferred, colored; next MAIN 1.259: preferred, colored
Changes since revision 1.258.2.2: +2 -14 lines
Sync with HEAD

Revision 1.244.4.6: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:56 2017 UTC (8 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.244.4.5: preferred, colored; branchpoint 1.244: preferred, colored; next MAIN 1.245: preferred, colored
Changes since revision 1.244.4.5: +2 -14 lines
Sync with HEAD

Revision 1.268: download - view: text, markup, annotated - select for diffs
Mon Jan 9 00:31:30 2017 UTC (8 years, 1 month ago) by kamil
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +2 -14 lines
Cleanup dead code after revert of racy vfork(2) commit

This removes dead code introduced with the following commit:

date: 2012-07-27 22:52:49 +0200;  author: christos;  state: Exp;  lines: +8 -2;
revert racy vfork() parent-blocking-before-child-execs-or-exits code.
ok rmind

Revision 1.258.2.2: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:49 2017 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.258.2.1: preferred, colored; branchpoint 1.258: preferred, colored
Changes since revision 1.258.2.1: +111 -9 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.244.4.5: download - view: text, markup, annotated - select for diffs
Mon Dec 5 10:55:26 2016 UTC (8 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.244.4.4: preferred, colored; branchpoint 1.244: preferred, colored
Changes since revision 1.244.4.4: +114 -12 lines
Sync with HEAD

Revision 1.267: download - view: text, markup, annotated - select for diffs
Sun Nov 13 15:25:01 2016 UTC (8 years, 3 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-20170107, nick-nhusb-base-20161204
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +5 -4 lines
Make p_ppid contain the original parent's pid even for traced processes.
Only change it when we are being permanently reparented to init. Since
p_ppid is only used as a cached value to retrieve the parent's process id
from userland, this change makes it correct at all times. Idea from kre@
Revert specialized logic from getpid/getppid now that it is not needed.

Revision 1.266: download - view: text, markup, annotated - select for diffs
Thu Nov 10 17:07:14 2016 UTC (8 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +4 -6 lines
GC WOPTSCHECKED, define macros for the select opts and all the valid opts.
The linux compat flags are not part of X/Open.

Revision 1.265: download - view: text, markup, annotated - select for diffs
Wed Nov 9 00:30:17 2016 UTC (8 years, 3 months ago) by kre
Branches: MAIN
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +79 -7 lines

PR kern/51600 ; PR standards/51606

Revert 1.264 - that was intended to fix 51600, but didn't, it just
hid the problem, and caused 51606.  This fixes 51606.

Handle waiting on a process that has been detatched from its parent
because of being ptrace'd by some other process.  This fixes 51600.
("handle" here means that the wait() hangs, or with WNOHANG, returns 0,
we cannot actually wait on a process that is not currently an attached
child.)

Note: the detatched process waiting is not yet perfect (it fails to
take account of options like WALLSIG and WALTSIG) - suport for those
(that is, ignoring a detatched child that one of those options will
later cause to be ignored when the process is re-attached.)

For now, for ither than when waiting for a specific process ID, when
a process does a wait() sys call (any of them), has no applicable
children attached that can be returned, and has at least one detatched
child, then we do a linear search of all processes to look for a
suitable detatched child.  This is likely to be slow - but very rare.
Eventually it might be better to keep a list of detatched children
per process.

Revision 1.264: download - view: text, markup, annotated - select for diffs
Sat Nov 5 02:59:22 2016 UTC (8 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +6 -6 lines
Return 0 if WNOHANG and no kids.

Revision 1.263: download - view: text, markup, annotated - select for diffs
Fri Nov 4 18:14:04 2016 UTC (8 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +29 -2 lines
deduplicate the complex lock reparent dance.

Revision 1.262: download - view: text, markup, annotated - select for diffs
Fri Nov 4 18:12:06 2016 UTC (8 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +6 -2 lines
Cleanup old parent from zombies too. Fixes repeatable panic when we try
to signal the already freed zombie parent after the child exits.

Revision 1.258.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 4 14:49:17 2016 UTC (8 years, 3 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +10 -10 lines
Sync with HEAD

Revision 1.261: download - view: text, markup, annotated - select for diffs
Thu Nov 3 20:58:25 2016 UTC (8 years, 3 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-20161104
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +5 -5 lines
Fix wrong WIFCONTINUED() status.

Revision 1.244.4.4: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:56:02 2016 UTC (8 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.244.4.3: preferred, colored; branchpoint 1.244: preferred, colored
Changes since revision 1.244.4.3: +7 -7 lines
Sync with HEAD

Revision 1.260: download - view: text, markup, annotated - select for diffs
Fri Sep 23 14:16:44 2016 UTC (8 years, 4 months ago) by skrll
Branches: MAIN
CVS tags: nick-nhusb-base-20161004
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +6 -6 lines
Trailing whitespace

Revision 1.259: download - view: text, markup, annotated - select for diffs
Fri Sep 23 14:09:39 2016 UTC (8 years, 4 months ago) by skrll
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +3 -3 lines
Add netbsd32_clock_getcpuclockid2 and netbsd32_wait6 functions

Revision 1.244.4.3: download - view: text, markup, annotated - select for diffs
Sun May 29 08:44:37 2016 UTC (8 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.244.4.2: preferred, colored; branchpoint 1.244: preferred, colored
Changes since revision 1.244.4.2: +17 -3 lines
Sync with HEAD

Revision 1.258: download - view: text, markup, annotated - select for diffs
Wed Apr 27 21:15:40 2016 UTC (8 years, 9 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907, nick-nhusb-base-20160529, localcount-20160914
Branch point for: pgoyette-localcount
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +5 -3 lines
We need a flag for WCONTINUED so that we can reset it... Fixes bash issue.

Revision 1.257: download - view: text, markup, annotated - select for diffs
Mon Apr 25 16:35:47 2016 UTC (8 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +14 -2 lines
set the return value to the pid if we found one (from kre@)

Revision 1.244.4.2: download - view: text, markup, annotated - select for diffs
Fri Apr 22 15:44:16 2016 UTC (8 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.244.4.1: preferred, colored; branchpoint 1.244: preferred, colored
Changes since revision 1.244.4.1: +287 -53 lines
Sync with HEAD

Revision 1.256: download - view: text, markup, annotated - select for diffs
Wed Apr 6 03:51:26 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20160422
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +4 -4 lines
Implement WIFCONTINUED using the linux value instead of the FreeBSD one...

Revision 1.255: download - view: text, markup, annotated - select for diffs
Tue Apr 5 14:07:31 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +8 -9 lines
Simplify even more to make it clear how the status is set.

Revision 1.254: download - view: text, markup, annotated - select for diffs
Tue Apr 5 13:01:46 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +3 -3 lines
Set the exit status code properly.

Revision 1.253: download - view: text, markup, annotated - select for diffs
Mon Apr 4 23:07:06 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +4 -6 lines
no need to pass the coredump flag to exit1() since it is set and known
in one place.

Revision 1.252: download - view: text, markup, annotated - select for diffs
Mon Apr 4 20:47:57 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +31 -23 lines
Split p_xstat (composite wait(2) status code, or signal number depending
on context) into:
1. p_xexit:		exit code
2. p_xsig:		signal number
3. p_sflag & WCOREFLAG	bit to indicated that the process core-dumped.

Fix the documentation of the flag bits in <sys/proc.h>

Revision 1.251: download - view: text, markup, annotated - select for diffs
Sun Apr 3 23:50:49 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +19 -4 lines
restore the early breaks for the exact process match.

Revision 1.250: download - view: text, markup, annotated - select for diffs
Sun Apr 3 02:28:46 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +26 -16 lines
implement WCONTINUED, untested
fill out more siginfo fields.
use geteuid instead of getuid

Revision 1.249: download - view: text, markup, annotated - select for diffs
Sat Apr 2 20:38:40 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +242 -38 lines
Add wait6() to be used to implement waitid, mostly from FreeBSD.
Create idtypes.h shared by wait.h and pset.h

Revision 1.244.4.1: download - view: text, markup, annotated - select for diffs
Sun Dec 27 12:10:05 2015 UTC (9 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +16 -9 lines
Sync with HEAD (as of 26th Dec)

Revision 1.236.2.2.4.2: download - view: text, markup, annotated - select for diffs
Sun Nov 15 20:44:13 2015 UTC (9 years, 3 months ago) by bouyer
Branches: netbsd-6-1
Diff to: previous 1.236.2.2.4.1: preferred, colored; branchpoint 1.236.2.2: preferred, colored; next MAIN 1.236.2.3: preferred, colored
Changes since revision 1.236.2.2.4.1: +3 -3 lines
Pull up following revision(s) (requested by pgoyette in ticket #1336):
	sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.
XXX Pull-ups for -7, -6{,-0,-1} and -5{,-0,-1,-2}

Revision 1.236.2.5: download - view: text, markup, annotated - select for diffs
Sun Nov 15 20:44:10 2015 UTC (9 years, 3 months ago) by bouyer
Branches: netbsd-6
Diff to: previous 1.236.2.4: preferred, colored; branchpoint 1.236: preferred, colored; next MAIN 1.237: preferred, colored
Changes since revision 1.236.2.4: +3 -3 lines
Pull up following revision(s) (requested by pgoyette in ticket #1336):
	sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.
XXX Pull-ups for -7, -6{,-0,-1} and -5{,-0,-1,-2}

Revision 1.236.2.2.2.2: download - view: text, markup, annotated - select for diffs
Sun Nov 15 20:44:10 2015 UTC (9 years, 3 months ago) by bouyer
Branches: netbsd-6-0
Diff to: previous 1.236.2.2.2.1: preferred, colored; branchpoint 1.236.2.2: preferred, colored; next MAIN 1.236.2.3: preferred, colored
Changes since revision 1.236.2.2.2.1: +3 -3 lines
Pull up following revision(s) (requested by pgoyette in ticket #1336):
	sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.
XXX Pull-ups for -7, -6{,-0,-1} and -5{,-0,-1,-2}

Revision 1.236.2.2.4.1: download - view: text, markup, annotated - select for diffs
Sun Nov 15 20:38:18 2015 UTC (9 years, 3 months ago) by bouyer
Branches: netbsd-6-1
Diff to: previous 1.236.2.2: preferred, colored
Changes since revision 1.236.2.2: +11 -4 lines
Pull up following revision(s) (requested by pgoyette in ticket #1333):
	sys/kern/kern_exec.c: revision 1.420
	sys/kern/kern_synch.c: revision 1.309
	sys/kern/kern_exit.c: revision 1.246
	sys/kern/kern_exit.c: revision 1.247
	sys/kern/kern_exec.c: revision 1.419
In execve_runproc(), update the p_waited entry for the process being
moved to SSTOP state, not for its parent.  (It is correct to update
the parent's p_nstopchild count.)  If the value is not already zero,
it could prevent its parent from waiting for the process.
Fixes PR kern/50298
Pullups will be requested for:
        NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
When clearing out the scheduler queues during system shutdown, we move
all processes to the SSTOP state.  Make sure we update each process's
p_waited and the parents' p_nstopchild counters to maintain consistent
values.  Should not make any real difference this late in the shutdown
process, but we should still be consistent just in case.
Fixes PR kern/50318
Pullups will be requested for:
        NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
Currently, if a process is exiting and its parent has indicated no intent
of reaping the process (nor any other children), the process wil get
reparented to init.  Since the state of the exiting process at this point
is SDEAD, proc_reparent() will not update either the old or new parent's
p_nstopchild counters.
This change causes both old and new parents to be properly updated.
Fixes PR kern/50300
Pullups will be requested for:
        NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
For processes marked with PS_STOPEXIT, update the process's p_waited
value, and update its parent's p_nstopchild value when marking the
process's p_stat to SSTOP.  The process needed to be SACTIVE to get
here, so this transition represents an additional process for which
the parent needs to wait.
Fixes PR kern/50308
Pullups will be requested for:
        NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
In spawn_return() we temporarily move the process state to SSTOP, but
without updating its p_waited value or its parent's p_nstopchild
counter.  Later, we restore the original state, again without any
adjustment of the related values.  This leaves a relatively short
window when the values are inconsistent and could interfere with the
proper operation of sys_wait() for the parent (if it manages to be
scheduled;  it's not totally clear what, if anything, prevents
scheduling/execution of the parent).
If during this window, any of the checks being made result in an
error, we call exit1() which will eventually migrate the process's
state to SDEAD (with an intermediate transition to SDYING).  At
this point the other variables get updated, and we finally restore
a consistent state.
This change updates the p_waited and parent's p_nstopchild at each
step to eliminate any windows during which the values could lead to
incorrect decisions.
Fixes PR kern/50330
Pullups will be requested for NetBSD-7, -6, -6-0, and -6-1

Revision 1.236.2.2.2.1: download - view: text, markup, annotated - select for diffs
Sun Nov 15 20:38:01 2015 UTC (9 years, 3 months ago) by bouyer
Branches: netbsd-6-0
Diff to: previous 1.236.2.2: preferred, colored
Changes since revision 1.236.2.2: +11 -4 lines
Pull up following revision(s) (requested by pgoyette in ticket #1333):
	sys/kern/kern_exec.c: revision 1.420
	sys/kern/kern_synch.c: revision 1.309
	sys/kern/kern_exit.c: revision 1.246
	sys/kern/kern_exit.c: revision 1.247
	sys/kern/kern_exec.c: revision 1.419
In execve_runproc(), update the p_waited entry for the process being
moved to SSTOP state, not for its parent.  (It is correct to update
the parent's p_nstopchild count.)  If the value is not already zero,
it could prevent its parent from waiting for the process.
Fixes PR kern/50298
Pullups will be requested for:
        NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
When clearing out the scheduler queues during system shutdown, we move
all processes to the SSTOP state.  Make sure we update each process's
p_waited and the parents' p_nstopchild counters to maintain consistent
values.  Should not make any real difference this late in the shutdown
process, but we should still be consistent just in case.
Fixes PR kern/50318
Pullups will be requested for:
        NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
Currently, if a process is exiting and its parent has indicated no intent
of reaping the process (nor any other children), the process wil get
reparented to init.  Since the state of the exiting process at this point
is SDEAD, proc_reparent() will not update either the old or new parent's
p_nstopchild counters.
This change causes both old and new parents to be properly updated.
Fixes PR kern/50300
Pullups will be requested for:
        NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
For processes marked with PS_STOPEXIT, update the process's p_waited
value, and update its parent's p_nstopchild value when marking the
process's p_stat to SSTOP.  The process needed to be SACTIVE to get
here, so this transition represents an additional process for which
the parent needs to wait.
Fixes PR kern/50308
Pullups will be requested for:
        NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
In spawn_return() we temporarily move the process state to SSTOP, but
without updating its p_waited value or its parent's p_nstopchild
counter.  Later, we restore the original state, again without any
adjustment of the related values.  This leaves a relatively short
window when the values are inconsistent and could interfere with the
proper operation of sys_wait() for the parent (if it manages to be
scheduled;  it's not totally clear what, if anything, prevents
scheduling/execution of the parent).
If during this window, any of the checks being made result in an
error, we call exit1() which will eventually migrate the process's
state to SDEAD (with an intermediate transition to SDYING).  At
this point the other variables get updated, and we finally restore
a consistent state.
This change updates the p_waited and parent's p_nstopchild at each
step to eliminate any windows during which the values could lead to
incorrect decisions.
Fixes PR kern/50330
Pullups will be requested for NetBSD-7, -6, -6-0, and -6-1

Revision 1.236.2.4: download - view: text, markup, annotated - select for diffs
Sun Nov 15 20:37:04 2015 UTC (9 years, 3 months ago) by bouyer
Branches: netbsd-6
Diff to: previous 1.236.2.3: preferred, colored; branchpoint 1.236: preferred, colored
Changes since revision 1.236.2.3: +11 -4 lines
Pull up following revision(s) (requested by pgoyette in ticket #1333):
	sys/kern/kern_exec.c: revision 1.420
	sys/kern/kern_synch.c: revision 1.309
	sys/kern/kern_exit.c: revision 1.246
	sys/kern/kern_exit.c: revision 1.247
	sys/kern/kern_exec.c: revision 1.419
In execve_runproc(), update the p_waited entry for the process being
moved to SSTOP state, not for its parent.  (It is correct to update
the parent's p_nstopchild count.)  If the value is not already zero,
it could prevent its parent from waiting for the process.
Fixes PR kern/50298
Pullups will be requested for:
        NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
When clearing out the scheduler queues during system shutdown, we move
all processes to the SSTOP state.  Make sure we update each process's
p_waited and the parents' p_nstopchild counters to maintain consistent
values.  Should not make any real difference this late in the shutdown
process, but we should still be consistent just in case.
Fixes PR kern/50318
Pullups will be requested for:
        NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
Currently, if a process is exiting and its parent has indicated no intent
of reaping the process (nor any other children), the process wil get
reparented to init.  Since the state of the exiting process at this point
is SDEAD, proc_reparent() will not update either the old or new parent's
p_nstopchild counters.
This change causes both old and new parents to be properly updated.
Fixes PR kern/50300
Pullups will be requested for:
        NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
For processes marked with PS_STOPEXIT, update the process's p_waited
value, and update its parent's p_nstopchild value when marking the
process's p_stat to SSTOP.  The process needed to be SACTIVE to get
here, so this transition represents an additional process for which
the parent needs to wait.
Fixes PR kern/50308
Pullups will be requested for:
        NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
In spawn_return() we temporarily move the process state to SSTOP, but
without updating its p_waited value or its parent's p_nstopchild
counter.  Later, we restore the original state, again without any
adjustment of the related values.  This leaves a relatively short
window when the values are inconsistent and could interfere with the
proper operation of sys_wait() for the parent (if it manages to be
scheduled;  it's not totally clear what, if anything, prevents
scheduling/execution of the parent).
If during this window, any of the checks being made result in an
error, we call exit1() which will eventually migrate the process's
state to SDEAD (with an intermediate transition to SDYING).  At
this point the other variables get updated, and we finally restore
a consistent state.
This change updates the p_waited and parent's p_nstopchild at each
step to eliminate any windows during which the values could lead to
incorrect decisions.
Fixes PR kern/50330
Pullups will be requested for NetBSD-7, -6, -6-0, and -6-1

Revision 1.214.4.4: download - view: text, markup, annotated - select for diffs
Sat Nov 7 20:50:07 2015 UTC (9 years, 3 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.214.4.3: preferred, colored; branchpoint 1.214: preferred, colored; next MAIN 1.215: preferred, colored
Changes since revision 1.214.4.3: +3 -3 lines
Pull up following revision(s) (requested by pgoyette in ticket #1981):
	sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.

Revision 1.214.4.2.2.2: download - view: text, markup, annotated - select for diffs
Sat Nov 7 20:49:19 2015 UTC (9 years, 3 months ago) by snj
Branches: netbsd-5-1
Diff to: previous 1.214.4.2.2.1: preferred, colored; branchpoint 1.214.4.2: preferred, colored; next MAIN 1.214.4.3: preferred, colored
Changes since revision 1.214.4.2.2.1: +3 -3 lines
Pull up following revision(s) (requested by pgoyette in ticket #1981):
	sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.

Revision 1.214.4.2.6.2: download - view: text, markup, annotated - select for diffs
Sat Nov 7 20:48:58 2015 UTC (9 years, 3 months ago) by snj
Branches: netbsd-5-2
Diff to: previous 1.214.4.2.6.1: preferred, colored; branchpoint 1.214.4.2: preferred, colored; next MAIN 1.214.4.3: preferred, colored
Changes since revision 1.214.4.2.6.1: +3 -3 lines
Pull up following revision(s) (requested by pgoyette in ticket #1981):
	sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.

Revision 1.214.4.3: download - view: text, markup, annotated - select for diffs
Sat Nov 7 20:43:23 2015 UTC (9 years, 3 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.214.4.2: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.4.2: +11 -4 lines
Pull up following revision(s) (requested by pgoyette in ticket #1979):
	sys/kern/kern_synch.c: revision 1.309
	sys/kern/kern_exit.c: revisions 1.246, 1.247
	sys/kern/kern_exec.c: revision 1.419
In execve_runproc(), update the p_waited entry for the process being
moved to SSTOP state, not for its parent.  (It is correct to update
the parent's p_nstopchild count.)  If the value is not already zero,
it could prevent its parent from waiting for the process.
Fixes PR kern/50298
--
When clearing out the scheduler queues during system shutdown, we move
all processes to the SSTOP state.  Make sure we update each process's
p_waited and the parents' p_nstopchild counters to maintain consistent
values.  Should not make any real difference this late in the shutdown
process, but we should still be consistent just in case.
Fixes PR kern/50318
--
Currently, if a process is exiting and its parent has indicated no intent
of reaping the process (nor any other children), the process wil get
reparented to init.  Since the state of the exiting process at this point
is SDEAD, proc_reparent() will not update either the old or new parent's
p_nstopchild counters.
This change causes both old and new parents to be properly updated.
Fixes PR kern/50300
--
For processes marked with PS_STOPEXIT, update the process's p_waited
value, and update its parent's p_nstopchild value when marking the
process's p_stat to SSTOP.  The process needed to be SACTIVE to get
here, so this transition represents an additional process for which
the parent needs to wait.
Fixes PR kern/50308

Revision 1.214.4.2.2.1: download - view: text, markup, annotated - select for diffs
Sat Nov 7 20:42:59 2015 UTC (9 years, 3 months ago) by snj
Branches: netbsd-5-1
Diff to: previous 1.214.4.2: preferred, colored
Changes since revision 1.214.4.2: +11 -4 lines
Pull up following revision(s) (requested by pgoyette in ticket #1979):
	sys/kern/kern_synch.c: revision 1.309
	sys/kern/kern_exit.c: revisions 1.246, 1.247
	sys/kern/kern_exec.c: revision 1.419
In execve_runproc(), update the p_waited entry for the process being
moved to SSTOP state, not for its parent.  (It is correct to update
the parent's p_nstopchild count.)  If the value is not already zero,
it could prevent its parent from waiting for the process.
Fixes PR kern/50298
--
When clearing out the scheduler queues during system shutdown, we move
all processes to the SSTOP state.  Make sure we update each process's
p_waited and the parents' p_nstopchild counters to maintain consistent
values.  Should not make any real difference this late in the shutdown
process, but we should still be consistent just in case.
Fixes PR kern/50318
--
Currently, if a process is exiting and its parent has indicated no intent
of reaping the process (nor any other children), the process wil get
reparented to init.  Since the state of the exiting process at this point
is SDEAD, proc_reparent() will not update either the old or new parent's
p_nstopchild counters.
This change causes both old and new parents to be properly updated.
Fixes PR kern/50300
--
For processes marked with PS_STOPEXIT, update the process's p_waited
value, and update its parent's p_nstopchild value when marking the
process's p_stat to SSTOP.  The process needed to be SACTIVE to get
here, so this transition represents an additional process for which
the parent needs to wait.
Fixes PR kern/50308

Revision 1.214.4.2.6.1: download - view: text, markup, annotated - select for diffs
Sat Nov 7 20:42:25 2015 UTC (9 years, 3 months ago) by snj
Branches: netbsd-5-2
Diff to: previous 1.214.4.2: preferred, colored
Changes since revision 1.214.4.2: +11 -4 lines
Pull up following revision(s) (requested by pgoyette in ticket #1979):
	sys/kern/kern_synch.c: revision 1.309
	sys/kern/kern_exit.c: revisions 1.246, 1.247
	sys/kern/kern_exec.c: revision 1.419
In execve_runproc(), update the p_waited entry for the process being
moved to SSTOP state, not for its parent.  (It is correct to update
the parent's p_nstopchild count.)  If the value is not already zero,
it could prevent its parent from waiting for the process.
Fixes PR kern/50298
--
When clearing out the scheduler queues during system shutdown, we move
all processes to the SSTOP state.  Make sure we update each process's
p_waited and the parents' p_nstopchild counters to maintain consistent
values.  Should not make any real difference this late in the shutdown
process, but we should still be consistent just in case.
Fixes PR kern/50318
--
Currently, if a process is exiting and its parent has indicated no intent
of reaping the process (nor any other children), the process wil get
reparented to init.  Since the state of the exiting process at this point
is SDEAD, proc_reparent() will not update either the old or new parent's
p_nstopchild counters.
This change causes both old and new parents to be properly updated.
Fixes PR kern/50300
--
For processes marked with PS_STOPEXIT, update the process's p_waited
value, and update its parent's p_nstopchild value when marking the
process's p_stat to SSTOP.  The process needed to be SACTIVE to get
here, so this transition represents an additional process for which
the parent needs to wait.
Fixes PR kern/50308

Revision 1.244.6.2: download - view: text, markup, annotated - select for diffs
Thu Nov 5 09:30:20 2015 UTC (9 years, 3 months ago) by snj
Branches: netbsd-7-0
CVS tags: netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Diff to: previous 1.244.6.1: preferred, colored; branchpoint 1.244: preferred, colored; next MAIN 1.245: preferred, colored
Changes since revision 1.244.6.1: +3 -3 lines
Pull up following revision(s) (requested by pgoyette in ticket #999):
	sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.

Revision 1.244.2.2: download - view: text, markup, annotated - select for diffs
Thu Nov 5 09:30:10 2015 UTC (9 years, 3 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, 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
Diff to: previous 1.244.2.1: preferred, colored; branchpoint 1.244: preferred, colored; next MAIN 1.245: preferred, colored
Changes since revision 1.244.2.1: +3 -3 lines
Pull up following revision(s) (requested by pgoyette in ticket #999):
	sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.

Revision 1.244.6.1: download - view: text, markup, annotated - select for diffs
Thu Nov 5 09:05:18 2015 UTC (9 years, 3 months ago) by snj
Branches: netbsd-7-0
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +11 -4 lines
Pull up following revision(s) (requested by pgoyette in ticket #996):
	sys/kern/kern_exec.c: revisions 1.419, 1.420
	sys/kern/kern_exit.c: revisions 1.246, 1.247
	sys/kern/kern_synch.c: revision 1.309
In execve_runproc(), update the p_waited entry for the process being
moved to SSTOP state, not for its parent.  (It is correct to update
the parent's p_nstopchild count.)  If the value is not already zero,
it could prevent its parent from waiting for the process.
Fixes PR kern/50298
--
When clearing out the scheduler queues during system shutdown, we move
all processes to the SSTOP state.  Make sure we update each process's
p_waited and the parents' p_nstopchild counters to maintain consistent
values.  Should not make any real difference this late in the shutdown
process, but we should still be consistent just in case.
Fixes PR kern/50318
--
Currently, if a process is exiting and its parent has indicated no intent
of reaping the process (nor any other children), the process wil get
reparented to init.  Since the state of the exiting process at this point
is SDEAD, proc_reparent() will not update either the old or new parent's
p_nstopchild counters.
This change causes both old and new parents to be properly updated.
Fixes PR kern/50300
--
For processes marked with PS_STOPEXIT, update the process's p_waited
value, and update its parent's p_nstopchild value when marking the
process's p_stat to SSTOP.  The process needed to be SACTIVE to get
here, so this transition represents an additional process for which
the parent needs to wait.
Fixes PR kern/50308
--
In spawn_return() we temporarily move the process state to SSTOP, but
without updating its p_waited value or its parent's p_nstopchild
counter.  Later, we restore the original state, again without any
adjustment of the related values.  This leaves a relatively short
window when the values are inconsistent and could interfere with the
proper operation of sys_wait() for the parent (if it manages to be
scheduled;  it's not totally clear what, if anything, prevents
scheduling/execution of the parent).
If during this window, any of the checks being made result in an
error, we call exit1() which will eventually migrate the process's
state to SDEAD (with an intermediate transition to SDYING).  At
this point the other variables get updated, and we finally restore
a consistent state.
This change updates the p_waited and parent's p_nstopchild at each
step to eliminate any windows during which the values could lead to
incorrect decisions.
Fixes PR kern/50330

Revision 1.244.2.1: download - view: text, markup, annotated - select for diffs
Thu Nov 5 09:04:55 2015 UTC (9 years, 3 months ago) by snj
Branches: netbsd-7
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +11 -4 lines
Pull up following revision(s) (requested by pgoyette in ticket #996):
	sys/kern/kern_exec.c: revisions 1.419, 1.420
	sys/kern/kern_exit.c: revisions 1.246, 1.247
	sys/kern/kern_synch.c: revision 1.309
In execve_runproc(), update the p_waited entry for the process being
moved to SSTOP state, not for its parent.  (It is correct to update
the parent's p_nstopchild count.)  If the value is not already zero,
it could prevent its parent from waiting for the process.
Fixes PR kern/50298
--
When clearing out the scheduler queues during system shutdown, we move
all processes to the SSTOP state.  Make sure we update each process's
p_waited and the parents' p_nstopchild counters to maintain consistent
values.  Should not make any real difference this late in the shutdown
process, but we should still be consistent just in case.
Fixes PR kern/50318
--
Currently, if a process is exiting and its parent has indicated no intent
of reaping the process (nor any other children), the process wil get
reparented to init.  Since the state of the exiting process at this point
is SDEAD, proc_reparent() will not update either the old or new parent's
p_nstopchild counters.
This change causes both old and new parents to be properly updated.
Fixes PR kern/50300
--
For processes marked with PS_STOPEXIT, update the process's p_waited
value, and update its parent's p_nstopchild value when marking the
process's p_stat to SSTOP.  The process needed to be SACTIVE to get
here, so this transition represents an additional process for which
the parent needs to wait.
Fixes PR kern/50308
--
In spawn_return() we temporarily move the process state to SSTOP, but
without updating its p_waited value or its parent's p_nstopchild
counter.  Later, we restore the original state, again without any
adjustment of the related values.  This leaves a relatively short
window when the values are inconsistent and could interfere with the
proper operation of sys_wait() for the parent (if it manages to be
scheduled;  it's not totally clear what, if anything, prevents
scheduling/execution of the parent).
If during this window, any of the checks being made result in an
error, we call exit1() which will eventually migrate the process's
state to SDEAD (with an intermediate transition to SDYING).  At
this point the other variables get updated, and we finally restore
a consistent state.
This change updates the p_waited and parent's p_nstopchild at each
step to eliminate any windows during which the values could lead to
incorrect decisions.
Fixes PR kern/50330

Revision 1.248: download - view: text, markup, annotated - select for diffs
Tue Oct 13 06:47:21 2015 UTC (9 years, 4 months ago) by pgoyette
Branches: MAIN
CVS tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +3 -3 lines
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.

XXX Pull-ups for -7, -6{,-0,-1} and -5{,-0,-1,-2}

Revision 1.247: download - view: text, markup, annotated - select for diffs
Tue Oct 13 00:28:22 2015 UTC (9 years, 4 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +10 -3 lines
For processes marked with PS_STOPEXIT, update the process's p_waited
value, and update its parent's p_nstopchild value when marking the
process's p_stat to SSTOP.  The process needed to be SACTIVE to get
here, so this transition represents an additional process for which
the parent needs to wait.

Fixes PR kern/50308

Pullups will be requested for:

       NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2

Revision 1.246: download - view: text, markup, annotated - select for diffs
Tue Oct 13 00:27:19 2015 UTC (9 years, 4 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +3 -3 lines
Currently, if a process is exiting and its parent has indicated no intent
of reaping the process (nor any other children), the process wil get
reparented to init.  Since the state of the exiting process at this point
is SDEAD, proc_reparent() will not update either the old or new parent's
p_nstopchild counters.

This change causes both old and new parents to be properly updated.

Fixes PR kern/50300

Pullups will be requested for:

       NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2

Revision 1.245: download - view: text, markup, annotated - select for diffs
Fri Oct 2 16:54:15 2015 UTC (9 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +7 -7 lines
Change SDT (Statically Defined Tracing) probes to use link sets so that it
is easier to add probes. (From FreeBSD)

Revision 1.241.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:28 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.241.2.2: preferred, colored
Changes since revision 1.241.2.2: +3 -5 lines
Rebase to HEAD as of a few days ago.

Revision 1.243.6.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:55:58 2014 UTC (10 years, 6 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.243: preferred, colored; next MAIN 1.244: preferred, colored
Changes since revision 1.243: +5 -7 lines
Rebase.

Revision 1.235.2.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:03 2014 UTC (10 years, 8 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.235.2.2: preferred, colored; branchpoint 1.235: preferred, colored; next MAIN 1.236: preferred, colored
Changes since revision 1.235.2.2: +6 -8 lines
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.236.2.3: download - view: text, markup, annotated - select for diffs
Wed May 21 21:04:31 2014 UTC (10 years, 8 months ago) by bouyer
Branches: netbsd-6
Diff to: previous 1.236.2.2: preferred, colored; branchpoint 1.236: preferred, colored
Changes since revision 1.236.2.2: +5 -7 lines
Pull up following revision(s) (requested by christos in ticket #1061):
	sys/kern/kern_exit.c: revision 1.244
Free pid for linux processes. Reported by Mark Davies, fix by dsl@
XXX: pullup 6

Revision 1.243.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:07 2014 UTC (10 years, 8 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.243: preferred, colored; next MAIN 1.244: preferred, colored
Changes since revision 1.243: +5 -7 lines
sync with head

Revision 1.244: download - view: text, markup, annotated - select for diffs
Mon May 5 15:45:32 2014 UTC (10 years, 9 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, rmind-smpnet-nbase, rmind-smpnet-base, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1
Branch point for: nick-nhusb, netbsd-7-0, netbsd-7
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +5 -7 lines
Free pid for linux processes. Reported by Mark Davies, fix by dsl@
XXX: pullup 6

Revision 1.241.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:18:57 2013 UTC (11 years, 7 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.241.2.1: preferred, colored
Changes since revision 1.241.2.1: +3 -3 lines
resync from head

Revision 1.243: download - view: text, markup, annotated - select for diffs
Sun Jun 9 01:13:47 2013 UTC (11 years, 8 months ago) by riz
Branches: MAIN
CVS tags: 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
Branch point for: tls-earlyentropy, rmind-smpnet
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +3 -3 lines
Add another field to the SDT_PROBE_DEFINE macro, so our DTrace probes
can named the same as those on other platforms.

For example, proc:::exec-success, not proc:::exec_success.

Implementation follows the same basic principle as FreeBSD's; add
another field to the SDT_PROBE_DEFINE macro which is the name
as exposed to userland.

Revision 1.241.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 20 03:02:42 2012 UTC (12 years, 2 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +13 -26 lines
Resync to 2012-11-19 00:00:00 UTC

Revision 1.236.2.1.2.1: download - view: text, markup, annotated - select for diffs
Thu Nov 1 16:45:03 2012 UTC (12 years, 3 months ago) by matt
Branches: matt-nb6-plus
Diff to: previous 1.236.2.1: preferred, colored; next MAIN 1.236.2.2: preferred, colored
Changes since revision 1.236.2.1: +13 -26 lines
sync with netbsd-6-0-RELEASE.

Revision 1.235.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:22:28 2012 UTC (12 years, 3 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.235.2.1: preferred, colored; branchpoint 1.235: preferred, colored
Changes since revision 1.235.2.1: +54 -53 lines
sync with head

Revision 1.236.2.2: download - view: text, markup, annotated - select for diffs
Mon Oct 1 23:07:07 2012 UTC (12 years, 4 months ago) by riz
Branches: 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-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, matt-nb6-plus-nbase, matt-nb6-plus-base
Branch point for: netbsd-6-1, netbsd-6-0
Diff to: previous 1.236.2.1: preferred, colored; branchpoint 1.236: preferred, colored
Changes since revision 1.236.2.1: +13 -26 lines
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.242: download - view: text, markup, annotated - select for diffs
Thu Sep 27 20:43:15 2012 UTC (12 years, 4 months ago) by rmind
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, khorben-n900, agc-symver-base, agc-symver
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +13 -26 lines
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.241: download - view: text, markup, annotated - select for diffs
Sun Aug 5 14:53:25 2012 UTC (12 years, 6 months ago) by riastradh
Branches: MAIN
Branch point for: tls-maxphys
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +31 -29 lines
Use separate names for the multitudinous uses of `q' in exit1.

Now I can follow which process is which in this routine.

If I jiggle the whitespace so line numbers don't change, there is no
change in the output of `objdump -d kern_exit.o' for amd64.

ok abp

Revision 1.240: download - view: text, markup, annotated - select for diffs
Fri Jul 27 20:52:49 2012 UTC (12 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +8 -2 lines
revert racy vfork() parent-blocking-before-child-execs-or-exits code.
ok rmind

Revision 1.239: download - view: text, markup, annotated - select for diffs
Sun Jul 22 22:40:19 2012 UTC (12 years, 6 months ago) by rmind
Branches: MAIN
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +9 -3 lines
fork1: fix use-after-free problems.  Addresses PR/46128 from Andrew Doran.
Note: PL_PPWAIT should be fully replaced and modificaiton of l_pflag by
other LWP is undesirable, but this is enough for netbsd-6.

Revision 1.235.6.3: download - view: text, markup, annotated - select for diffs
Sun Apr 29 23:05:04 2012 UTC (12 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.235.6.2: preferred, colored; branchpoint 1.235: preferred, colored; next MAIN 1.236: preferred, colored
Changes since revision 1.235.6.2: +5 -8 lines
sync to latest -current.

Revision 1.235.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:23 2012 UTC (12 years, 10 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +9 -60 lines
sync with head

Revision 1.236.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 12 17:05:36 2012 UTC (12 years, 10 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-0-RC2, netbsd-6-0-RC1
Branch point for: matt-nb6-plus
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +5 -8 lines
Pull up following revision(s) (requested by martin in ticket #175):
	sys/kern/kern_exit.c: revision 1.238
	tests/lib/libc/gen/posix_spawn/t_fileactions.c: revision 1.4
	tests/lib/libc/gen/posix_spawn/t_fileactions.c: revision 1.5
	sys/uvm/uvm_extern.h: revision 1.183
	lib/libc/gen/posix_spawn_fileactions.c: revision 1.2
	sys/kern/kern_exec.c: revision 1.348
	sys/kern/kern_exec.c: revision 1.349
	sys/compat/netbsd32/syscalls.master: revision 1.95
	sys/uvm/uvm_glue.c: revision 1.159
	sys/uvm/uvm_map.c: revision 1.317
	sys/compat/netbsd32/netbsd32.h: revision 1.95
	sys/kern/exec_elf.c: revision 1.38
	sys/sys/spawn.h: revision 1.2
	sys/sys/exec.h: revision 1.135
	sys/compat/netbsd32/netbsd32_execve.c: revision 1.34
Rework posix_spawn locking and memory management:
 - always provide a vmspace for the new proc, initially borrowing from proc0
   (this part fixes PR 46286)
 - increase parallelism between parent and child if arguments allow this,
   avoiding a potential deadlock on exec_lock
 - add a new flag for userland to request old (lockstepped) behaviour for
   better error reporting
 - adapt test cases to the previous two and add a new variant to test the
   diagnostics flag
 - fix a few memory (and lock) leaks
 - provide netbsd32 compat
Fix asynchronous posix_spawn child exit status (and test for it).

Revision 1.238: download - view: text, markup, annotated - select for diffs
Sun Apr 8 11:27:45 2012 UTC (12 years, 10 months ago) by martin
Branches: MAIN
CVS tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +5 -8 lines
Rework posix_spawn locking and memory management:
 - always provide a vmspace for the new proc, initially borrowing from proc0
   (this part fixes PR 46286)
 - increase parallelism between parent and child if arguments allow this,
   avoiding a potential deadlock on exec_lock
 - add a new flag for userland to request old (lockstepped) behaviour for
   better error reporting
 - adapt test cases to the previous two and add a new variant to test the
   diagnostics flag
 - fix a few memory (and lock) leaks
 - provide netbsd32 compat

Revision 1.235.6.2: download - view: text, markup, annotated - select for diffs
Fri Feb 24 09:11:45 2012 UTC (12 years, 11 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.235.6.1: preferred, colored; branchpoint 1.235: preferred, colored
Changes since revision 1.235.6.1: +7 -60 lines
sync to -current.

Revision 1.237: download - view: text, markup, annotated - select for diffs
Sun Feb 19 21:06:50 2012 UTC (12 years, 11 months ago) by rmind
Branches: MAIN
CVS tags: jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +7 -60 lines
Remove COMPAT_SA / KERN_SA.  Welcome to 6.99.3!
Approved by core@.

Revision 1.235.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:35:28 2012 UTC (12 years, 11 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +8 -3 lines
merge to -current.

Revision 1.236: download - view: text, markup, annotated - select for diffs
Wed Feb 15 11:59:30 2012 UTC (13 years ago) by martin
Branches: MAIN
CVS tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +8 -3 lines
Fix fallout from the new tests exercising all error paths: do not deactivate
the pmap of a vmspace-less child of a posix spawn operation that never
made it to userland.

Revision 1.235: download - view: text, markup, annotated - select for diffs
Sun Oct 9 20:30:37 2011 UTC (13 years, 4 months ago) by chs
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +4 -3 lines
mark exit_psignal() as __noclone to work around a gcc 4.5 bug on arm.

Revision 1.233.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 23 14:20:19 2011 UTC (13 years, 7 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.233: preferred, colored; next MAIN 1.234: preferred, colored
Changes since revision 1.233: +7 -2 lines
Catchup with rmind-uvmplock merge.

Revision 1.227.2.5: download - view: text, markup, annotated - select for diffs
Sun Jun 12 00:24:28 2011 UTC (13 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.227.2.4: preferred, colored; branchpoint 1.227: preferred, colored; next MAIN 1.228: preferred, colored
Changes since revision 1.227.2.4: +5 -0 lines
sync with head

Revision 1.234: download - view: text, markup, annotated - select for diffs
Mon Jun 6 22:04:34 2011 UTC (13 years, 8 months ago) by matt
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +7 -2 lines
Add some more MI hook points for PCU.  Discard the PCU state at lwp_exit and
at exec time.  Before forking, save the PCU state so that cpu_lwp_fork
doesn't have.  Remove MD code which did that before.

Revision 1.231.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:09:28 2011 UTC (13 years, 8 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.231: preferred, colored; next MAIN 1.232: preferred, colored
Changes since revision 1.231: +4 -3 lines
Sync with HEAD.

Revision 1.227.2.4: download - view: text, markup, annotated - select for diffs
Tue May 31 03:05:01 2011 UTC (13 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.227.2.3: preferred, colored; branchpoint 1.227: preferred, colored
Changes since revision 1.227.2.3: +1 -1 lines
sync with head

Revision 1.233: download - view: text, markup, annotated - select for diffs
Sun May 1 00:11:52 2011 UTC (13 years, 9 months ago) by rmind
Branches: MAIN
CVS tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +3 -3 lines
Rename limfree() to lim_free(), misc clean up.  No functional change.

Revision 1.227.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:55:14 2011 UTC (13 years, 11 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.227.2.2: preferred, colored; branchpoint 1.227: preferred, colored
Changes since revision 1.227.2.2: +6 -3 lines
sync with head

Revision 1.231.4.1: download - view: text, markup, annotated - select for diffs
Sat Mar 5 15:10:39 2011 UTC (13 years, 11 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.231: preferred, colored; next MAIN 1.232: preferred, colored
Changes since revision 1.231: +3 -2 lines
Sync with HEAD

Revision 1.232: download - view: text, markup, annotated - select for diffs
Mon Feb 21 20:23:28 2011 UTC (13 years, 11 months ago) by pooka
Branches: MAIN
CVS tags: bouyer-quota2-nbase
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +3 -2 lines
Borrow the lwpctl data area from the parent for the vfork() child.
Otherwise the child will incorrectly see it is not running on any
CPU.  Among other things, this fixes crashes from having
LD_PRELOAD=libpthread.so set in the env.

reviewed by tech-kern

Revision 1.231: download - view: text, markup, annotated - select for diffs
Sat Dec 18 01:36:19 2010 UTC (14 years, 1 month ago) by rmind
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-base
Branch point for: jruoho-x86intr, bouyer-quota2
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +4 -2 lines
- Fix a few possible locking issues in execve1() and exit1().  Add a note
  that scheduler locks are special in this regard - adaptive locks cannot
  be in the path due to turnstiles.  Randomly spotted/reported by uebayasi@.
- Remove unused lwp_relock() and replace lwp_lock_retry() by simplifying
  lwp_lock() and sleepq_enter() a little.
- Give alllwp its own cache-line and mark lwp_cache pointer as read-mostly.

OK ad@

Revision 1.225.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:47:26 2010 UTC (14 years, 6 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.225.2.1: preferred, colored; branchpoint 1.225: preferred, colored; next MAIN 1.226: preferred, colored
Changes since revision 1.225.2.1: +4 -4 lines
Sync with HEAD.

Revision 1.205.2.6: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:54:38 2010 UTC (14 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.205.2.5: preferred, colored; branchpoint 1.205: preferred, colored; next MAIN 1.206: preferred, colored
Changes since revision 1.205.2.5: +6 -6 lines
sync with head.

Revision 1.230: download - view: text, markup, annotated - select for diffs
Wed Jul 7 01:30:37 2010 UTC (14 years, 7 months ago) by chs
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +3 -3 lines
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.227.2.2: download - view: text, markup, annotated - select for diffs
Sat Jul 3 01:19:53 2010 UTC (14 years, 7 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.227.2.1: preferred, colored; branchpoint 1.227: preferred, colored
Changes since revision 1.227.2.1: +4 -4 lines
sync with head

Revision 1.229: download - view: text, markup, annotated - select for diffs
Thu Jul 1 02:38:30 2010 UTC (14 years, 7 months ago) by rmind
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +4 -4 lines
Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour.  Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.

Revision 1.227.2.1: download - view: text, markup, annotated - select for diffs
Sun May 30 05:17:56 2010 UTC (14 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +3 -3 lines
sync with head

Revision 1.228: download - view: text, markup, annotated - select for diffs
Tue May 11 09:30:29 2010 UTC (14 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +3 -3 lines
the crowd went crazy
as typo left the stage

Revision 1.225.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:44:09 2010 UTC (14 years, 9 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +15 -4 lines
Sync with HEAD.

Revision 1.214.4.1.2.1.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:28:16 2010 UTC (14 years, 9 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.214.4.1.2.1: preferred, colored; next MAIN 1.214.4.2: preferred, colored
Changes since revision 1.214.4.1.2.1: +2 -2 lines
sync to netbsd-5

Revision 1.205.2.5: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:16 2010 UTC (14 years, 11 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.205.2.4: preferred, colored; branchpoint 1.205: preferred, colored
Changes since revision 1.205.2.4: +37 -32 lines
sync with head

Revision 1.227: download - view: text, markup, annotated - select for diffs
Wed Mar 3 00:47:30 2010 UTC (14 years, 11 months ago) by yamt
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +2 -4 lines
remove redundant checks of PK_MARKER.

Revision 1.226: download - view: text, markup, annotated - select for diffs
Mon Mar 1 21:10:15 2010 UTC (14 years, 11 months ago) by darran
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +15 -2 lines
DTrace: Add an SDT (Statically Defined Tracing) provider framework, and
implement most of the proc provider.  Adds proc:::create, exec,
exec_success, exec_faillure, signal_send, signal_discard, signal_handle,
lwp_create, lwp_start, lwp_exit.

Revision 1.225: download - view: text, markup, annotated - select for diffs
Wed Nov 4 21:23:02 2009 UTC (15 years, 3 months ago) by rmind
Branches: MAIN
CVS tags: uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +22 -29 lines
do_sys_wait(): fix previous by checking for ru != NULL.  Noticed by
Onno van der Linden.  Also, remove redundant arguments (seems that
was_zombie was not used since rev 1.177 ?).

Revision 1.224: download - view: text, markup, annotated - select for diffs
Sun Nov 1 21:05:30 2009 UTC (15 years, 3 months ago) by rmind
Branches: MAIN
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +9 -6 lines
do_sys_wait: clear rusage, instead of returning garbage.  Patch from
dholland@ via PR/40717, with minor change by me.

Revision 1.223: download - view: text, markup, annotated - select for diffs
Thu Oct 22 22:28:57 2009 UTC (15 years, 3 months ago) by rmind
Branches: MAIN
CVS tags: jym-xensuspend-nbase
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +2 -4 lines
Avoid #ifndef __NO_CPU_LWP_FREE, only ia64 is missing cpu_lwp_free
routines and it can/should provide stubs.

Revision 1.218.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 23 23:32:34 2009 UTC (15 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.218.2.1: preferred, colored; branchpoint 1.218: preferred, colored; next MAIN 1.219: preferred, colored
Changes since revision 1.218.2.1: +4 -3 lines
Sync with HEAD.

Revision 1.205.2.4: download - view: text, markup, annotated - select for diffs
Sat Jul 18 14:53:22 2009 UTC (15 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.205.2.3: preferred, colored; branchpoint 1.205: preferred, colored
Changes since revision 1.205.2.3: +4 -3 lines
sync with head.

Revision 1.214.4.1.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 1 22:30:44 2009 UTC (15 years, 7 months ago) by snj
Branches: netbsd-5-0
CVS tags: netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Diff to: previous 1.214.4.1: preferred, colored; next MAIN 1.214.4.2: preferred, colored
Changes since revision 1.214.4.1: +3 -3 lines
Pull up following revision(s) (requested by rmind in ticket #836):
	sys/kern/kern_exit.c: revision 1.221
exit1: fix a race with do_sys_wait/proc_free.

Revision 1.214.4.2: download - view: text, markup, annotated - select for diffs
Wed Jul 1 22:30:30 2009 UTC (15 years, 7 months ago) by snj
Branches: 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-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, matt-nb5-pq3-base, matt-nb5-pq3
Branch point for: netbsd-5-2, netbsd-5-1
Diff to: previous 1.214.4.1: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.4.1: +3 -3 lines
Pull up following revision(s) (requested by rmind in ticket #836):
	sys/kern/kern_exit.c: revision 1.221
exit1: fix a race with do_sys_wait/proc_free.

Revision 1.222: download - view: text, markup, annotated - select for diffs
Sun Jun 28 11:42:43 2009 UTC (15 years, 7 months ago) by yamt
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, jymxensuspend-base
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +4 -3 lines
wrap a long line.

Revision 1.205.2.3: download - view: text, markup, annotated - select for diffs
Sat May 16 10:41:48 2009 UTC (15 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.205.2.2: preferred, colored; branchpoint 1.205: preferred, colored
Changes since revision 1.205.2.2: +3 -3 lines
sync with head

Revision 1.218.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:21:56 2009 UTC (15 years, 9 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +26 -36 lines
Sync with HEAD.

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

Revision 1.221: download - view: text, markup, annotated - select for diffs
Fri May 8 13:32:59 2009 UTC (15 years, 9 months ago) by yamt
Branches: MAIN
CVS tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, jym-xensuspend-base
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +3 -3 lines
exit1: fix a race with do_sys_wait/proc_free.

Revision 1.205.2.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:13:46 2009 UTC (15 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.205.2.1: preferred, colored; branchpoint 1.205: preferred, colored
Changes since revision 1.205.2.1: +104 -94 lines
sync with head.

Revision 1.214.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:36:59 2009 UTC (15 years, 9 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.214.2.2: preferred, colored; branchpoint 1.214: preferred, colored; next MAIN 1.215: preferred, colored
Changes since revision 1.214.2.2: +25 -35 lines
Sync with HEAD.

Revision 1.220: download - view: text, markup, annotated - select for diffs
Sat Apr 25 15:06:31 2009 UTC (15 years, 9 months ago) by rmind
Branches: MAIN
CVS tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +10 -11 lines
- Rearrange pg_delete() and pg_remove() (renamed pg_free), thus
  proc_enterpgrp() with proc_leavepgrp() to free process group and/or
  session without proc_lock held.
- Rename SESSHOLD() and SESSRELE() to  to proc_sesshold() and
  proc_sessrele().  The later releases proc_lock now.

Quick OK by <ad>.

Revision 1.219: download - view: text, markup, annotated - select for diffs
Sat Mar 28 21:38:55 2009 UTC (15 years, 10 months ago) by rmind
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +17 -26 lines
- proc_free(): no need assign 'p->p_pptr' to 'parent' many times,
  re-use it where appropriate (proc_lock is held across usages).
- Undefine DEBUG_EXIT.

Revision 1.214.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 3 18:32:55 2009 UTC (15 years, 11 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.214.2.1: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.1: +2 -3 lines
Sync with HEAD.

Revision 1.214.4.1: download - view: text, markup, annotated - select for diffs
Mon Feb 2 02:32:57 2009 UTC (16 years ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2
Branch point for: netbsd-5-0
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +21 -20 lines
Pull up following revision(s) (requested by cube in ticket #338):
	sys/compat/sa/compat_sa.c: revision 1.7
	sys/kern/kern_exit.c: revision 1.215
Adjust the sleeps in lwpcache and lwpublk. Make them uninterruptable
for now. This will prevent signals from waking them. Adjust
exit_lwps() to explicitly add LW_SINTR to all of them, so that
the process exit code can wake them up.
This is needed as threads in both of these wait channels die once
they are woken. So they aren't interruptable in the typical sense.
I am now able to suspend & resume firefox successfully now.

Revision 1.218: download - view: text, markup, annotated - select for diffs
Thu Jan 22 14:38:35 2009 UTC (16 years ago) by yamt
Branches: MAIN
CVS tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +2 -3 lines
malloc -> kmem_alloc

Revision 1.214.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:19:38 2009 UTC (16 years ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +22 -25 lines
Sync with HEAD.

Revision 1.199.6.5: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:18 2009 UTC (16 years ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.199.6.4: preferred, colored; branchpoint 1.199: preferred, colored; next MAIN 1.200: preferred, colored
Changes since revision 1.199.6.4: +59 -9 lines
Sync with HEAD.

Revision 1.217: download - view: text, markup, annotated - select for diffs
Sun Jan 11 02:45:52 2009 UTC (16 years, 1 month ago) by christos
Branches: MAIN
CVS tags: mjf-devfs2-base
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +3 -3 lines
merge christos-time_t

Revision 1.211.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:15:08 2008 UTC (16 years, 2 months ago) by haad
Branches: haad-dm
Diff to: previous 1.211.2.1: preferred, colored; branchpoint 1.211: preferred, colored; next MAIN 1.212: preferred, colored
Changes since revision 1.211.2.1: +22 -25 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.202.2.3: download - view: text, markup, annotated - select for diffs
Thu Nov 20 20:45:39 2008 UTC (16 years, 2 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.202.2.2: preferred, colored; branchpoint 1.202: preferred, colored; next MAIN 1.203: preferred, colored
Changes since revision 1.202.2.2: +2 -6 lines
merge with head.

Revision 1.216: download - view: text, markup, annotated - select for diffs
Fri Nov 14 23:33:45 2008 UTC (16 years, 3 months ago) by ad
Branches: MAIN
CVS tags: haad-nbase2, haad-dm-base2, haad-dm-base, christos-time_t-nbase, christos-time_t-base, ad-audiomp2-base, ad-audiomp2
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +2 -6 lines
Make POSIX AIO loadable as a module.

Revision 1.202.2.2: download - view: text, markup, annotated - select for diffs
Sat Nov 1 21:22:27 2008 UTC (16 years, 3 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.202.2.1: preferred, colored; branchpoint 1.202: preferred, colored
Changes since revision 1.202.2.1: +117 -126 lines
Sync with head.

Revision 1.215: download - view: text, markup, annotated - select for diffs
Sat Nov 1 05:59:33 2008 UTC (16 years, 3 months ago) by wrstuden
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +21 -20 lines
Adjust the sleeps in lwpcache and lwpublk. Make them uninterruptable
for now. This will prevent signals from waking them. Adjust
exit_lwps() to explicitly add LW_SINTR to all of them, so that
the process exit code can wake them up.

This is needed as threads in both of these wait channels die once
they are woken. So they aren't interruptable in the typical sense.

I am now able to suspend & resume firefox successfully now.

Revision 1.214: download - view: text, markup, annotated - select for diffs
Sat Oct 25 14:10:26 2008 UTC (16 years, 3 months ago) by yamt
Branches: MAIN
CVS tags: netbsd-5-base, netbsd-5-0-RC1
Branch point for: nick-hppapmap, netbsd-5
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +3 -3 lines
exit1: update a comment.

Revision 1.211.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:17:27 2008 UTC (16 years, 3 months ago) by haad
Branches: haad-dm
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +58 -5 lines
Sync with HEAD.

Revision 1.213: download - view: text, markup, annotated - select for diffs
Wed Oct 15 06:51:20 2008 UTC (16 years, 4 months ago) by wrstuden
Branches: MAIN
CVS tags: matt-mips64-base2, haad-dm-base1
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +57 -4 lines
Merge wrstuden-revivesa into HEAD.

Revision 1.212: download - view: text, markup, annotated - select for diffs
Sat Oct 11 13:40:57 2008 UTC (16 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +3 -3 lines
Move uidinfo to its own module in kern_uidinfo.c and include in rump.
No functional change to uidinfo.

Revision 1.208.2.7: download - view: text, markup, annotated - select for diffs
Mon Jul 21 19:13:45 2008 UTC (16 years, 6 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.208.2.6: preferred, colored; branchpoint 1.208: preferred, colored; next MAIN 1.209: preferred, colored
Changes since revision 1.208.2.6: +7 -2 lines
Add support for compiling SA as an option. Implied by COMPAT_40.

i386 kernels both with COMPAT_40 and with no compat options (and thus
no SA) compile.

No functional changes intended.

Revision 1.208.2.6: download - view: text, markup, annotated - select for diffs
Mon Jun 30 04:55:56 2008 UTC (16 years, 7 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.208.2.5: preferred, colored; branchpoint 1.208: preferred, colored
Changes since revision 1.208.2.5: +4 -6 lines
Change how we make SA threads not generate upcalls. Instead of clearing
LW_SA, use a private flag, LP_SA_NOBLOCK, that we set when we want
to not generate upcalls. This means we do NOT need to lock (l)
(ourselves) to set it.

Adjust tests that look at LW_SA. Now, we are an upcall-generating
lwp if ((l->l_flag & LW_SA) && (~l->l_pflag & LP_SA_NOBLOCK)).

Introduce code pattern to set & remember this:

	f = ~l->l_pflag & LP_SA_NOBLOCK;
	l->l_pflag |= LP_SA_NOBLOCK;

	...

	/* f is now LP_SA_NOBLOCK if it wasn't set in l_pflag before */

	l->l_pflag ^= f;

I updated a lot of the trap handlers to do trap handling iff LP_SA_NOBLOCK
is not set. I tried to figure out if the trap handler could be triggered
for user-based faults as opposed to kernel faults to user addresses, and
only look at LP_SA_NOBLOCK for the latter.

Above is a result of discussions with rmind at to reduce lock twiddling.

Also, per same discussions, add locking to sys_sa_preempt(). p_lock is
the lock we want.

Also, per same discussions, remove use of LSSUSPENDED as a thread state.
We needed to use it when we were emulating the 4.X and previous behavior
of hiding cached threads. For the moment, we now have them instead
remain visible to all and have them sleeping on the "lwpcache" wait
channel.

sa_newcachelwp(): sa_putcachelwp() wants savp_mutex held, not p_lock.

Tweak some comments.

Revision 1.199.6.4: download - view: text, markup, annotated - select for diffs
Sun Jun 29 09:33:14 2008 UTC (16 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.199.6.3: preferred, colored; branchpoint 1.199: preferred, colored
Changes since revision 1.199.6.3: +18 -36 lines
Sync with HEAD.

Revision 1.208.2.5: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:31:50 2008 UTC (16 years, 7 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.208.2.4: preferred, colored; branchpoint 1.208: preferred, colored
Changes since revision 1.208.2.4: +22 -51 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.210.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 18 16:33:35 2008 UTC (16 years, 7 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.210: preferred, colored; next MAIN 1.211: preferred, colored
Changes since revision 1.210: +20 -38 lines
Sync with head.

Revision 1.202.4.3: download - view: text, markup, annotated - select for diffs
Tue Jun 17 09:15:02 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.202.4.2: preferred, colored; branchpoint 1.202: preferred, colored; next MAIN 1.203: preferred, colored
Changes since revision 1.202.4.2: +20 -38 lines
sync with head.

Revision 1.211: download - view: text, markup, annotated - select for diffs
Mon Jun 16 09:51:14 2008 UTC (16 years, 8 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-base4, 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
Branch point for: haad-dm
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +20 -38 lines
- PPWAIT is need only be locked by proc_lock, so move it to proc::p_lflag.
- Remove a few needless lock acquires from exec/fork/exit.
- Sprinkle branch hints.

No functional change.

Revision 1.208.2.4: download - view: text, markup, annotated - select for diffs
Sun Jun 8 14:54:57 2008 UTC (16 years, 8 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.208.2.3: preferred, colored; branchpoint 1.208: preferred, colored
Changes since revision 1.208.2.3: +4 -3 lines
Fix the huge bug in sa_switch(). We were taking p_lock. But p_lock is
an adaptive mutex, so it is possible to block on it. We're in
sleepq_block() here, so we can't do that.

So instead re-add the per-vp mutex ("savp_mutex" and let it be the
only (spin) mutex we take. Also, arrange the code so that most all
of the time the only thread that actually locks savp_mutex is the
blessed thread, so there should be little contention in sa_switch().

Per discussions w/ rmind, revamp how we hold lwps, both in the
"woken and waiting to trigger upcall" case and the lwp cache. Use
a sleepq_t for each, and use savp_mutex for the queue mutex. This makes
all of the logic in sa_switch() MUCH more similar to how we wake threads
in other parts of the kernel. The only extra work is that we reinitialize
thread state at this point (cpu_setfunc()).

A consequence of this is that cached and waiting-for-unblocked-upcall
threads will show up in ps -s. We may change this in the future, we may
not.

Adjust other comments noticed along the way.

Since threads are always visible to ps, exit now doesn't need to clean
them up.

Revision 1.199.6.3: download - view: text, markup, annotated - select for diffs
Thu Jun 5 19:14:36 2008 UTC (16 years, 8 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.199.6.2: preferred, colored; branchpoint 1.199: preferred, colored
Changes since revision 1.199.6.2: +1 -0 lines
Sync with HEAD.

Also fix build.

Revision 1.202.4.2: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:05:39 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.202.4.1: preferred, colored; branchpoint 1.202: preferred, colored
Changes since revision 1.202.4.1: +4 -15 lines
sync with head

Revision 1.210: download - view: text, markup, annotated - select for diffs
Mon Jun 2 16:18:09 2008 UTC (16 years, 8 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-base3
Branch point for: simonb-wapbl
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +3 -2 lines
Most contention on proc_lock is from getppid(), so cache the parent's PID.

Revision 1.199.6.2: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:08 2008 UTC (16 years, 8 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.199.6.1: preferred, colored; branchpoint 1.199: preferred, colored
Changes since revision 1.199.6.1: +45 -91 lines
Sync with HEAD.

Revision 1.208.2.3: download - view: text, markup, annotated - select for diffs
Mon May 26 06:54:40 2008 UTC (16 years, 8 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.208.2.2: preferred, colored; branchpoint 1.208: preferred, colored
Changes since revision 1.208.2.2: +13 -11 lines
Work around typo in previous commit. Also give newly-woken
threads l_priority = MAXPRI_USER. Needs thought.

Also adapt to imminent change to use TAILQ for both the
lwp cache and the woken queue. So use a TAILQ_INIT to
flush the list. Further, fix long-standing bug where in
we only clered the unblock list on the last vp we looked
at.

Revision 1.208.2.2: download - view: text, markup, annotated - select for diffs
Fri May 23 06:52:19 2008 UTC (16 years, 8 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.208.2.1: preferred, colored; branchpoint 1.208: preferred, colored
Changes since revision 1.208.2.1: +49 -4 lines
Re-add exit code. Clean up SA info on our way out of a process.

While here, change the documented locking on the lwp cache to be
based on p_lock, not sa_mutex. Avoids vile locking inversion work
in exit.

Revision 1.209: download - view: text, markup, annotated - select for diffs
Mon May 19 17:06:02 2008 UTC (16 years, 8 months ago) by ad
Branches: MAIN
CVS tags: hpcarm-cleanup-nbase
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +3 -15 lines
Reduce ifdefs due to MULTIPROCESSOR slightly.

Revision 1.202.4.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:35:07 2008 UTC (16 years, 9 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +48 -82 lines
sync with head.

Revision 1.205.2.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:25:24 2008 UTC (16 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +5 -11 lines
sync with head.

Revision 1.208.2.1: download - view: text, markup, annotated - select for diffs
Sat May 10 23:49:03 2008 UTC (16 years, 9 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +4 -2 lines
Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.

Revision 1.208: download - view: text, markup, annotated - select for diffs
Tue Apr 29 16:21:01 2008 UTC (16 years, 9 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-base2, yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +5 -3 lines
Ignore processes with PK_MARKER set.

Revision 1.207: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:24:03 2008 UTC (16 years, 9 months ago) by martin
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +2 -9 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.206: download - view: text, markup, annotated - select for diffs
Mon Apr 28 15:36:01 2008 UTC (16 years, 9 months ago) by ad
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +2 -3 lines
Add MI code to support in-kernel preemption. Preemption is deferred by
one of the following:

- Holding kernel_lock (indicating that the code is not MT safe).
- Bracketing critical sections with kpreempt_disable/kpreempt_enable.
- Holding the interrupt priority level above IPL_NONE.

Statistics on kernel preemption are reported via event counters, and
where preemption is deferred for some reason, it's also reported via
lockstat. The LWP priority at which preemption is triggered is tuneable
via sysctl.

Revision 1.205: download - view: text, markup, annotated - select for diffs
Sun Apr 27 11:39:20 2008 UTC (16 years, 9 months ago) by ad
Branches: MAIN
CVS tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +3 -4 lines
Disable preemption during the final stages of LWP exit.

Revision 1.204: download - view: text, markup, annotated - select for diffs
Thu Apr 24 18:39:24 2008 UTC (16 years, 9 months ago) by ad
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +25 -27 lines
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.203: download - view: text, markup, annotated - select for diffs
Thu Apr 24 15:35:29 2008 UTC (16 years, 9 months ago) by ad
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +22 -47 lines
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.199.6.1: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:43:01 2008 UTC (16 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +15 -10 lines
Sync with HEAD.

Revision 1.202.2.1: download - view: text, markup, annotated - select for diffs
Sat Mar 29 20:47:00 2008 UTC (16 years, 10 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +3 -3 lines
Welcome to the time_t=long long dev_t=uint64_t branch.

Revision 1.202: download - view: text, markup, annotated - select for diffs
Thu Mar 27 19:06:52 2008 UTC (16 years, 10 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42, christos-time_t
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +7 -4 lines
Make rusage collection per-LWP and collate in the appropriate places.
cloned threads need a little bit more work but the locking needs to
be fixed first.

Revision 1.148.2.10: download - view: text, markup, annotated - select for diffs
Mon Mar 24 09:39:01 2008 UTC (16 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.148.2.9: preferred, colored; next MAIN 1.149: preferred, colored
Changes since revision 1.148.2.9: +10 -8 lines
sync with head.

Revision 1.201: download - view: text, markup, annotated - select for diffs
Sun Mar 23 16:53:45 2008 UTC (16 years, 10 months ago) by ad
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +9 -7 lines
Reorder a code block slightly, to allow proclist_mutex to be an adaptive
mutex (purely for testing).

Revision 1.186.2.4: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:04:58 2008 UTC (16 years, 10 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.186.2.3: preferred, colored; next MAIN 1.187: preferred, colored
Changes since revision 1.186.2.3: +2 -10 lines
sync with HEAD

Revision 1.200: download - view: text, markup, annotated - select for diffs
Fri Mar 21 21:55:00 2008 UTC (16 years, 10 months ago) by ad
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +3 -3 lines
Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.

Revision 1.190.2.4: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:06:45 2008 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.190.2.3: preferred, colored; branchpoint 1.190: preferred, colored; next MAIN 1.191: preferred, colored
Changes since revision 1.190.2.3: +17 -27 lines
Sync with HEAD.

Revision 1.148.2.9: download - view: text, markup, annotated - select for diffs
Mon Feb 4 09:24:11 2008 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.148.2.8: preferred, colored
Changes since revision 1.148.2.8: +2 -10 lines
sync with head.

Revision 1.199: download - view: text, markup, annotated - select for diffs
Mon Jan 28 12:22:46 2008 UTC (17 years ago) by yamt
Branches: MAIN
CVS tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base
Branch point for: mjf-devfs2
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +2 -10 lines
remove a special allocator for uareas, which is no longer necessary.
use pool_cache instead.

Revision 1.148.2.8: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:46:03 2008 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.148.2.7: preferred, colored
Changes since revision 1.148.2.7: +27 -28 lines
sync with head

Revision 1.186.2.3: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:56:01 2008 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
Diff to: previous 1.186.2.2: preferred, colored
Changes since revision 1.186.2.2: +34 -30 lines
sync with HEAD

Revision 1.194.6.1: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:55:49 2008 UTC (17 years, 1 month ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.194: preferred, colored; next MAIN 1.195: preferred, colored
Changes since revision 1.194: +27 -28 lines
Sync with HEAD

Revision 1.198: download - view: text, markup, annotated - select for diffs
Wed Jan 2 11:48:49 2008 UTC (17 years, 1 month ago) by ad
Branches: MAIN
CVS tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +15 -13 lines
Merge vmlocking2 to head.

Revision 1.197: download - view: text, markup, annotated - select for diffs
Mon Dec 31 15:32:11 2007 UTC (17 years, 1 month ago) by ad
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +2 -7 lines
Remove systrace. Ok core@.

Revision 1.194.2.5: download - view: text, markup, annotated - select for diffs
Fri Dec 28 14:35:45 2007 UTC (17 years, 1 month ago) by ad
Branches: vmlocking2
Diff to: previous 1.194.2.4: preferred, colored; branchpoint 1.194: preferred, colored; next MAIN 1.195: preferred, colored
Changes since revision 1.194.2.4: +7 -5 lines
Fix previous.

Revision 1.194.2.4: download - view: text, markup, annotated - select for diffs
Fri Dec 28 14:28:06 2007 UTC (17 years, 1 month ago) by ad
Branches: vmlocking2
Diff to: previous 1.194.2.3: preferred, colored; branchpoint 1.194: preferred, colored
Changes since revision 1.194.2.3: +5 -9 lines
- do_sys_wait: acquire kernel_lock before proclist_lock to avoid the mutex
  deadlock detection stuff constantly kicking in and causing acquires of
  proclist_lock to block instead of spin.
- exit1: fix a use-after-free found by Coverity.

Revision 1.190.2.3: download - view: text, markup, annotated - select for diffs
Thu Dec 27 00:45:58 2007 UTC (17 years, 1 month ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.190.2.2: preferred, colored; branchpoint 1.190: preferred, colored
Changes since revision 1.190.2.2: +12 -11 lines
Sync with HEAD.

Revision 1.194.2.3: download - view: text, markup, annotated - select for diffs
Wed Dec 26 23:07:22 2007 UTC (17 years, 1 month ago) by ad
Branches: vmlocking2
Diff to: previous 1.194.2.2: preferred, colored; branchpoint 1.194: preferred, colored
Changes since revision 1.194.2.2: +8 -5 lines
- Push kernel_lock back into exit, wait and sysctl system calls, mainly
  for visibility.
- Serialize calls to brk() from within the same process.
- Mark more syscalls MPSAFE.

Revision 1.194.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 21:39:39 2007 UTC (17 years, 1 month ago) by ad
Branches: vmlocking2
Diff to: previous 1.194.2.1: preferred, colored; branchpoint 1.194: preferred, colored
Changes since revision 1.194.2.1: +13 -11 lines
Sync with head.

Revision 1.196: download - view: text, markup, annotated - select for diffs
Wed Dec 26 16:01:36 2007 UTC (17 years, 1 month ago) by ad
Branches: MAIN
CVS tags: vmlocking2-base3
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +4 -3 lines
Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.

Revision 1.195: download - view: text, markup, annotated - select for diffs
Thu Dec 20 23:03:08 2007 UTC (17 years, 1 month ago) by dsl
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +12 -11 lines
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.194.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 15 03:16:55 2007 UTC (17 years, 2 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +4 -3 lines
- Use pool_cache for a few more items and make those caches static.
- Mark another 10 syscalls MPSAFE including execve(). A small bit of
  work is required to fix a couple of issues (tty, kqueue).

Revision 1.190.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:20:27 2007 UTC (17 years, 2 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.190.2.1: preferred, colored; branchpoint 1.190: preferred, colored
Changes since revision 1.190.2.1: +4 -3 lines
Sync with HEAD.

Revision 1.148.2.7: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:32:40 2007 UTC (17 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.148.2.6: preferred, colored
Changes since revision 1.148.2.6: +4 -3 lines
sync with head

Revision 1.183.6.8: download - view: text, markup, annotated - select for diffs
Mon Dec 3 16:14:48 2007 UTC (17 years, 2 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.183.6.7: preferred, colored; branchpoint 1.183: preferred, colored; next MAIN 1.184: preferred, colored
Changes since revision 1.183.6.7: +4 -3 lines
Sync with HEAD.

Revision 1.194: download - view: text, markup, annotated - select for diffs
Fri Nov 30 23:05:43 2007 UTC (17 years, 2 months ago) by ad
Branches: 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
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +4 -3 lines
Use membar_*().

Revision 1.190.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 19 00:48:37 2007 UTC (17 years, 2 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +15 -16 lines
Sync with HEAD.

Revision 1.169.2.16: download - view: text, markup, annotated - select for diffs
Fri Nov 16 19:51:37 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.15: preferred, colored; next MAIN 1.170: preferred, colored
Changes since revision 1.169.2.15: +4 -2 lines
Add missing callout_destroy().

Revision 1.148.2.6: download - view: text, markup, annotated - select for diffs
Thu Nov 15 11:44:40 2007 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.148.2.5: preferred, colored
Changes since revision 1.148.2.5: +15 -16 lines
sync with head.

Revision 1.183.6.7: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:04:39 2007 UTC (17 years, 3 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.183.6.6: preferred, colored; branchpoint 1.183: preferred, colored
Changes since revision 1.183.6.6: +7 -3 lines
Sync with HEAD.

Revision 1.188.2.2: download - view: text, markup, annotated - select for diffs
Tue Nov 13 16:02:01 2007 UTC (17 years, 3 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.188.2.1: preferred, colored; branchpoint 1.188: preferred, colored; next MAIN 1.189: preferred, colored
Changes since revision 1.188.2.1: +15 -16 lines
Sync with HEAD

Revision 1.193: download - view: text, markup, annotated - select for diffs
Mon Nov 12 23:11:59 2007 UTC (17 years, 3 months ago) by ad
Branches: MAIN
CVS tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +7 -3 lines
Add _lwp_ctl() system call: provides a bidirectional, per-LWP communication
area between processes and the kernel.

Revision 1.183.6.6: download - view: text, markup, annotated - select for diffs
Sun Nov 11 16:48:01 2007 UTC (17 years, 3 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.183.6.5: preferred, colored; branchpoint 1.183: preferred, colored
Changes since revision 1.183.6.5: +10 -15 lines
Sync with HEAD.

Revision 1.186.2.2: download - view: text, markup, annotated - select for diffs
Thu Nov 8 11:00:01 2007 UTC (17 years, 3 months ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.186.2.1: preferred, colored
Changes since revision 1.186.2.1: +10 -15 lines
sync with -HEAD

Revision 1.192: download - view: text, markup, annotated - select for diffs
Wed Nov 7 15:56:21 2007 UTC (17 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +7 -11 lines
Merge tty changes from the vmlocking branch.

Revision 1.191: download - view: text, markup, annotated - select for diffs
Wed Nov 7 00:23:21 2007 UTC (17 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +7 -8 lines
Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.186.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:31:33 2007 UTC (17 years, 3 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +32 -34 lines
sync with HEAD

Revision 1.183.6.5: download - view: text, markup, annotated - select for diffs
Sun Oct 28 20:11:11 2007 UTC (17 years, 3 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.183.6.4: preferred, colored; branchpoint 1.183: preferred, colored
Changes since revision 1.183.6.4: +4 -4 lines
Sync with HEAD.

Revision 1.148.2.5: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:35:22 2007 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.148.2.4: preferred, colored
Changes since revision 1.148.2.4: +32 -34 lines
sync with head.

Revision 1.183.6.4: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:48:30 2007 UTC (17 years, 3 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.183.6.3: preferred, colored; branchpoint 1.183: preferred, colored
Changes since revision 1.183.6.3: +30 -32 lines
Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.188.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 25 22:40:00 2007 UTC (17 years, 3 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +3 -3 lines
Sync with HEAD.

Revision 1.169.2.15: download - view: text, markup, annotated - select for diffs
Thu Oct 25 19:43:09 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.14: preferred, colored
Changes since revision 1.169.2.14: +6 -6 lines
- Simplify debugger/procfs reference counting of processes. Use a per-proc
  rwlock: rw_tryenter(RW_READER) to gain a reference, and rw_enter(RW_WRITER)
  by the process itself to drain out reference holders before major changes
  like exiting.
- Fix numerous bugs and locking issues in procfs.
- Mark procfs MPSAFE.

Revision 1.190: download - view: text, markup, annotated - select for diffs
Wed Oct 24 14:50:40 2007 UTC (17 years, 3 months ago) by ad
Branches: MAIN
CVS tags: jmcneill-base
Branch point for: mjf-devfs
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +4 -4 lines
Make ras_lookup() lockless.

Revision 1.169.2.14: download - view: text, markup, annotated - select for diffs
Tue Oct 23 20:17:09 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.13: preferred, colored
Changes since revision 1.169.2.13: +3 -3 lines
Sync with head.

Revision 1.169.2.13: download - view: text, markup, annotated - select for diffs
Fri Oct 19 13:08:08 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.12: preferred, colored
Changes since revision 1.169.2.12: +5 -5 lines
Replace the tty locks with a global tty_lock.

Revision 1.189: download - view: text, markup, annotated - select for diffs
Fri Oct 19 12:16:42 2007 UTC (17 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +3 -3 lines
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.187.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 14 11:48:39 2007 UTC (17 years, 4 months ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.187: preferred, colored; next MAIN 1.188: preferred, colored
Changes since revision 1.187: +29 -31 lines
sync with head.

Revision 1.188: download - view: text, markup, annotated - select for diffs
Fri Oct 12 14:29:37 2007 UTC (17 years, 4 months ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +29 -31 lines
Merge from vmlocking: fix a deadlock with (threaded) soft interrupts and
process exit.

Revision 1.183.6.3: download - view: text, markup, annotated - select for diffs
Tue Oct 2 18:28:59 2007 UTC (17 years, 4 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.183.6.2: preferred, colored; branchpoint 1.183: preferred, colored
Changes since revision 1.183.6.2: +3 -3 lines
Sync with HEAD.

Revision 1.183.2.3: download - view: text, markup, annotated - select for diffs
Mon Sep 10 10:55:57 2007 UTC (17 years, 5 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.183.2.2: preferred, colored; branchpoint 1.183: preferred, colored; next MAIN 1.184: preferred, colored
Changes since revision 1.183.2.2: +3 -3 lines
Sync with HEAD.

Revision 1.187: download - view: text, markup, annotated - select for diffs
Thu Sep 6 23:58:56 2007 UTC (17 years, 5 months ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +3 -3 lines
- 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.148.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:40:46 2007 UTC (17 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.148.2.3: preferred, colored
Changes since revision 1.148.2.3: +158 -141 lines
sync with head.

Revision 1.183.2.2: download - view: text, markup, annotated - select for diffs
Mon Sep 3 10:22:58 2007 UTC (17 years, 5 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.183.2.1: preferred, colored; branchpoint 1.183: preferred, colored
Changes since revision 1.183.2.1: +17 -13 lines
Sync with HEAD.

Revision 1.169.2.12: download - view: text, markup, annotated - select for diffs
Mon Aug 20 21:27:29 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.11: preferred, colored
Changes since revision 1.169.2.11: +9 -9 lines
Sync with HEAD.

Revision 1.169.2.11: download - view: text, markup, annotated - select for diffs
Sun Aug 19 22:10:14 2007 UTC (17 years, 5 months ago) by yamt
Branches: vmlocking
Diff to: previous 1.169.2.10: preferred, colored
Changes since revision 1.169.2.10: +28 -26 lines
proc_free: release proclist_lock earlier as suggested by Andrew Doran.
calling lwp_free with the lock held leads a deadlock.

    1. CPU1: do_sys_wait -> lwp_free busy-waits for an LWP exiting on CPU2,
     holding proclist_lock.

    2. CPU2: the exiting LWP is interrupted by softclock.

    3. CPU2: softclock -> sched_pstats tries to acquire proclist_lock.
     it also busy-waits because the owning LWP is running.

Revision 1.183.6.2: download - view: text, markup, annotated - select for diffs
Thu Aug 16 11:03:30 2007 UTC (17 years, 6 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.183.6.1: preferred, colored; branchpoint 1.183: preferred, colored
Changes since revision 1.183.6.1: +17 -13 lines
Sync with HEAD.

Revision 1.183.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:49:07 2007 UTC (17 years, 6 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +7 -7 lines
Sync with HEAD.

Revision 1.186: download - view: text, markup, annotated - select for diffs
Wed Aug 15 12:20:28 2007 UTC (17 years, 6 months ago) by ad
Branches: MAIN
Branch point for: matt-armv6
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +15 -11 lines
proc_free: don't destroy locks until the last LWP is confirmed off the CPU.
This is an ideal candidate for pool_cache.

Revision 1.185: download - view: text, markup, annotated - select for diffs
Wed Aug 15 12:07:32 2007 UTC (17 years, 6 months ago) by ad
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +4 -4 lines
Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.

Revision 1.183.6.1: download - view: text, markup, annotated - select for diffs
Thu Aug 9 02:37:19 2007 UTC (17 years, 6 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +7 -7 lines
Sync with HEAD.

Revision 1.184: download - view: text, markup, annotated - select for diffs
Tue Aug 7 12:45:54 2007 UTC (17 years, 6 months ago) by ad
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +7 -7 lines
Do cv_broadcast() on proc::p_waitcv to be on the safe side (the parent
could be multithreaded).

Revision 1.169.2.10: download - view: text, markup, annotated - select for diffs
Sun Jul 29 11:28:08 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.9: preferred, colored
Changes since revision 1.169.2.9: +3 -6 lines
Don't need kernel_lock for proc_free().

Revision 1.169.2.9: download - view: text, markup, annotated - select for diffs
Sun Jul 15 15:52:54 2007 UTC (17 years, 7 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.8: preferred, colored
Changes since revision 1.169.2.8: +12 -3 lines
Sync with head.

Revision 1.171.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:09:46 2007 UTC (17 years, 7 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.171: preferred, colored; next MAIN 1.172: preferred, colored
Changes since revision 1.171: +126 -112 lines
Sync with head.

Revision 1.183: download - view: text, markup, annotated - select for diffs
Mon Jul 9 21:10:52 2007 UTC (17 years, 7 months ago) by ad
Branches: MAIN
CVS tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +12 -2 lines
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.182: download - view: text, markup, annotated - select for diffs
Fri Jun 15 18:29:53 2007 UTC (17 years, 8 months ago) by ad
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +14 -12 lines
proc_free: avoid a potential race where we could free struct proc before
the last LWP in the process is off the CPU. Noted by yamt@.

Revision 1.181: download - view: text, markup, annotated - select for diffs
Wed Jun 13 12:14:10 2007 UTC (17 years, 8 months ago) by yamt
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +11 -3 lines
exit_lwps: fix a deadlock.

Revision 1.169.2.8: download - view: text, markup, annotated - select for diffs
Sat Jun 9 23:58:04 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.7: preferred, colored
Changes since revision 1.169.2.7: +3 -3 lines
Sync with head.

Revision 1.169.2.7: download - view: text, markup, annotated - select for diffs
Fri Jun 8 14:17:18 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.6: preferred, colored
Changes since revision 1.169.2.6: +90 -77 lines
Sync with head.

Revision 1.180: download - view: text, markup, annotated - select for diffs
Thu May 31 06:24:23 2007 UTC (17 years, 8 months ago) by rmind
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +3 -3 lines
Make AIO initialization MP-safe.

Actually, lwp_exit() with (l != curlwp) will not work.
This fix might be pulled up from vmlocking branch.

Revision 1.169.2.6: download - view: text, markup, annotated - select for diffs
Sun May 27 00:11:31 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.5: preferred, colored
Changes since revision 1.169.2.5: +13 -12 lines
Don't free process substructures until we're sure that the last LWP
is off the cpu. Noted by yamt@.

Revision 1.179: download - view: text, markup, annotated - select for diffs
Thu May 17 14:51:39 2007 UTC (17 years, 9 months ago) by yamt
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +5 -14 lines
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.166.2.9: download - view: text, markup, annotated - select for diffs
Thu May 17 13:41:45 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.166.2.8: preferred, colored; next MAIN 1.167: preferred, colored
Changes since revision 1.166.2.8: +77 -53 lines
sync with head.

Revision 1.178: download - view: text, markup, annotated - select for diffs
Tue May 8 20:10:15 2007 UTC (17 years, 9 months ago) by dsl
Branches: MAIN
CVS tags: yamt-idlelwp-base8
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +14 -14 lines
Add the child 'rusage' of an exiting process to its own 'rusage' exactly
once, and prior to passing it to the caller of sys_wait4() and at the same
time as adding it to the parent.
Commands like:
time sh -c 'i=0; while [ $i -lt 1000 ]; do i=$(expr $i + 1); done'
now give same output.

Revision 1.177: download - view: text, markup, annotated - select for diffs
Mon May 7 16:53:17 2007 UTC (17 years, 9 months ago) by dsl
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +70 -50 lines
Split sys_wait4() so that compat code can fiddle with the returned 'status'
and 'rusage' without having to copy data to/from stackgap buffers.
The old split (find_stopped_child) could be removed.
amd64 seems to run netbsd32, linux and linux32 emulations. sparc64 compiles.

Revision 1.166.2.8: download - view: text, markup, annotated - select for diffs
Mon May 7 10:55:45 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.166.2.7: preferred, colored
Changes since revision 1.166.2.7: +14 -17 lines
sync with head.

Revision 1.176: download - view: text, markup, annotated - select for diffs
Mon May 7 09:30:14 2007 UTC (17 years, 9 months ago) by dsl
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +8 -4 lines
Add child rusage values to exiting process in 'find_stopped_child'
so that it is (correctlly) available to the caller of wait4().
The self and child rusage values remain split for zombies.

Revision 1.175: download - view: text, markup, annotated - select for diffs
Mon Apr 30 20:11:41 2007 UTC (17 years, 9 months ago) by dsl
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +10 -17 lines
Remove proc->p_ru and the 'rusage' pool.
I think it existed to cache the numbers in kernel memory of a zombie when
proc->p_stats was part of the 'u' area - so got freed earlier and wouldn't
(easily) be accessible from a separate process.  However since both the
p_ru and p_stats fields are freed at the same time it is no longer needed.
Ride the recent 4.99.19 version change.

Revision 1.174: download - view: text, markup, annotated - select for diffs
Mon Apr 30 14:44:30 2007 UTC (17 years, 9 months ago) by rmind
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +6 -2 lines
Import of POSIX Asynchronous I/O.
Seems to be quite stable. Some work still left to do.

Please note, that syscalls are not yet MP-safe, because
of the file and vnode subsystems.

Reviewed by: <tech-kern>, <ad>

Revision 1.166.2.7: download - view: text, markup, annotated - select for diffs
Sun Apr 15 16:03:49 2007 UTC (17 years, 10 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.166.2.6: preferred, colored
Changes since revision 1.166.2.6: +7 -7 lines
sync with head.

Revision 1.169.2.5: download - view: text, markup, annotated - select for diffs
Tue Apr 10 13:26:38 2007 UTC (17 years, 10 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.4: preferred, colored
Changes since revision 1.169.2.4: +8 -25 lines
Sync with head.

Revision 1.169.2.4: download - view: text, markup, annotated - select for diffs
Thu Apr 5 21:44:47 2007 UTC (17 years, 10 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.3: preferred, colored
Changes since revision 1.169.2.3: +10 -2 lines
exit1: make the LWP unswappable as it is exiting.

Revision 1.162.2.1: download - view: text, markup, annotated - select for diffs
Sun Apr 1 16:16:20 2007 UTC (17 years, 10 months ago) by bouyer
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Diff to: previous 1.162: preferred, colored; next MAIN 1.163: preferred, colored
Changes since revision 1.162: +19 -29 lines
Apply patch (requested by chs in ticket #554):
	sys/kern/kern_exit.c	patch
	sys/kern/kern_lwp.c	patch
	sys/kern/kern_proc.c	patch
	sys/sys/proc.h		patch
Add a new SDYING process state. In exit1() release structures before curlwp is
NULL. It should fix the problem described in PR 34892.

Revision 1.171.4.1: download - view: text, markup, annotated - select for diffs
Thu Mar 29 19:27:56 2007 UTC (17 years, 10 months ago) by reinoud
Branches: reinoud-bufcleanup
Diff to: previous 1.171: preferred, colored; next MAIN 1.172: preferred, colored
Changes since revision 1.171: +9 -27 lines
Pullup to -current

Revision 1.173: download - view: text, markup, annotated - select for diffs
Thu Mar 29 17:35:17 2007 UTC (17 years, 10 months ago) by ad
Branches: MAIN
CVS tags: thorpej-atomic-base, thorpej-atomic
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +7 -7 lines
cv_wakeup -> cv_signal

Revision 1.166.2.6: download - view: text, markup, annotated - select for diffs
Sat Mar 24 14:56:00 2007 UTC (17 years, 10 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.166.2.5: preferred, colored
Changes since revision 1.166.2.5: +4 -22 lines
sync with head.

Revision 1.169.2.3: download - view: text, markup, annotated - select for diffs
Wed Mar 21 20:11:51 2007 UTC (17 years, 10 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.2: preferred, colored
Changes since revision 1.169.2.2: +7 -12 lines
- Replace more simple_locks, and fix up in a few places.
- Use condition variables.
- LOCK_ASSERT -> KASSERT.

Revision 1.172: download - view: text, markup, annotated - select for diffs
Wed Mar 21 18:26:00 2007 UTC (17 years, 10 months ago) by ad
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +4 -22 lines
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.169.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 13 17:50:51 2007 UTC (17 years, 11 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169.2.1: preferred, colored
Changes since revision 1.169.2.1: +1 -3 lines
Pull in the initial set of changes for the vmlocking branch.

Revision 1.169.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 13 16:51:53 2007 UTC (17 years, 11 months ago) by ad
Branches: vmlocking
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +9 -9 lines
Sync with head.

Revision 1.166.2.5: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:58:33 2007 UTC (17 years, 11 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.166.2.4: preferred, colored
Changes since revision 1.166.2.4: +30 -31 lines
Sync with HEAD.

Revision 1.171: download - view: text, markup, annotated - select for diffs
Sun Mar 11 23:40:58 2007 UTC (17 years, 11 months ago) by ad
Branches: MAIN
Branch point for: reinoud-bufcleanup, mjf-ufs-trans
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +7 -7 lines
Adjust previous: move the release of specificdata after the very last
file system operation.

Revision 1.170: download - view: text, markup, annotated - select for diffs
Sun Mar 11 23:19:49 2007 UTC (17 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +9 -9 lines
exit1: destroy the proc/lwp specificdata after calling uvm_proc_exit, as
file systems can still be using it.

Revision 1.166.2.4: download - view: text, markup, annotated - select for diffs
Fri Mar 9 15:16:23 2007 UTC (17 years, 11 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.166.2.3: preferred, colored
Changes since revision 1.166.2.3: +3 -3 lines
Checkpoint:

- Addition of scheduler-specific pointers in the struct proc, lwp and
  schedstate_percpu.
- Addition of sched_lwp_fork(), sched_lwp_exit() and sched_slept() hooks.
- mi_switch() now has only one argument.
- sched_nextlwp(void) becomes sched_switch(struct lwp *) and does an
  enqueueing of LWP.
- Addition of general kern.sched sysctl node.
- Remove twice called uvmexp.swtch++, other cleanups.

Discussed on tech-kern@

Revision 1.169: download - view: text, markup, annotated - select for diffs
Fri Mar 9 14:11:24 2007 UTC (17 years, 11 months ago) by ad
Branches: MAIN
Branch point for: vmlocking
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +23 -24 lines
- Make the proclist_lock a mutex. The write:read ratio is unfavourable,
  and mutexes are cheaper use than RW locks.
- LOCK_ASSERT -> KASSERT in some places.
- Hold proclist_lock/kernel_lock longer in a couple of places.

Revision 1.166.2.3: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:54:20 2007 UTC (17 years, 11 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.166.2.2: preferred, colored
Changes since revision 1.166.2.2: +7 -7 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.148.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:11:06 2007 UTC (17 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.148.2.2: preferred, colored
Changes since revision 1.148.2.2: +461 -346 lines
sync with head.

Revision 1.168: download - view: text, markup, annotated - select for diffs
Thu Feb 22 06:34:43 2007 UTC (17 years, 11 months ago) by thorpej
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +4 -4 lines
TRUE -> true, FALSE -> false

Revision 1.166.2.2: download - view: text, markup, annotated - select for diffs
Tue Feb 20 21:48:45 2007 UTC (17 years, 11 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.166.2.1: preferred, colored
Changes since revision 1.166.2.1: +3 -3 lines
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.167: download - view: text, markup, annotated - select for diffs
Sat Feb 17 22:31:42 2007 UTC (17 years, 11 months ago) by pavel
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +5 -5 lines
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.166.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 17 10:30:54 2007 UTC (17 years, 11 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +3 -12 lines
- separate context switching and thread scheduling.
- introduce idle lwp.
- change some related MD/MI interfaces and implement i386 version.

Revision 1.166: download - view: text, markup, annotated - select for diffs
Fri Feb 16 00:39:16 2007 UTC (18 years ago) by ad
Branches: MAIN
Branch point for: yamt-idlelwp
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +13 -18 lines
proc_free() was returning a NULL rusage pointer to wait() when a traced
process was reparented. Change proc_free() to copy the rusage to a buffer
on the stack if required, so it can be passed both to the debugger and
to the real parent process.

Fixes kern/35582 (kernel panics with gdb).

Revision 1.165: download - view: text, markup, annotated - select for diffs
Fri Feb 9 21:55:30 2007 UTC (18 years ago) by ad
Branches: MAIN
CVS tags: post-newlock2-merge
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +464 -344 lines
Merge newlock2 to head.

Revision 1.158.2.15: download - view: text, markup, annotated - select for diffs
Fri Feb 9 13:00:43 2007 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.14: preferred, colored; branchpoint 1.158: preferred, colored; next MAIN 1.159: preferred, colored
Changes since revision 1.158.2.14: +9 -2 lines
lwp_wait() and lwp_userret() need to be called without the kernel_lock.

Revision 1.158.2.14: download - view: text, markup, annotated - select for diffs
Mon Feb 5 16:44:40 2007 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.13: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.13: +4 -4 lines
IPL_STATCLOCK needs to be >= IPL_CLOCK, so assume that proc::p_stmutex is
always a spinlock.

Revision 1.158.2.13: download - view: text, markup, annotated - select for diffs
Mon Feb 5 13:16:48 2007 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.12: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.12: +23 -16 lines
- When clearing signals dequeue siginfo first and free later, once
  outside the lock permiter.
- Push kernel_lock back in a a couple of places.
- Adjust limcopy() to be MP safe (this needs redoing).
- Fix a couple of bugs noticed along the way.
- Catch up with condvar changes.

Revision 1.158.2.12: download - view: text, markup, annotated - select for diffs
Sat Feb 3 16:32:50 2007 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.11: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.11: +7 -7 lines
- Require that cv_signal/cv_broadcast be called with the interlock held.
- Provide 'async' versions that's don't need the interlock.

Revision 1.158.2.11: download - view: text, markup, annotated - select for diffs
Wed Jan 31 19:56:38 2007 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.10: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.10: +6 -2 lines
- Have callers to mi_switch() drop the kernel lock.
- Fix a deadlock and some typos.
- Unbreak ptrace().

Revision 1.158.2.10: download - view: text, markup, annotated - select for diffs
Tue Jan 30 13:51:40 2007 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.9: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.9: +5 -56 lines
Remove support for SA. Ok core@.

Revision 1.158.2.9: download - view: text, markup, annotated - select for diffs
Sat Jan 13 17:54:48 2007 UTC (18 years, 1 month ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.8: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.8: +3 -3 lines
Fix use after free bug in proc_free().

Revision 1.158.2.8: download - view: text, markup, annotated - select for diffs
Fri Jan 12 01:04:06 2007 UTC (18 years, 1 month ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.7: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.7: +5 -7 lines
Sync with head.

Revision 1.158.2.7: download - view: text, markup, annotated - select for diffs
Thu Jan 11 22:22:59 2007 UTC (18 years, 1 month ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.6: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.6: +16 -5 lines
Checkpoint work in progress.

Revision 1.148.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:50:05 2006 UTC (18 years, 1 month ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.148.2.1: preferred, colored
Changes since revision 1.148.2.1: +26 -8 lines
sync with head.

Revision 1.158.2.6: download - view: text, markup, annotated - select for diffs
Fri Dec 29 20:27:43 2006 UTC (18 years, 1 month ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.5: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.5: +173 -155 lines
Checkpoint work in progress.

Revision 1.164: download - view: text, markup, annotated - select for diffs
Fri Dec 22 08:04:01 2006 UTC (18 years, 1 month ago) by ad
Branches: MAIN
CVS tags: newlock2-nbase, newlock2-base
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +3 -5 lines
lwp::l_acflag is no longer useful.

Revision 1.158.4.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:18:44 2006 UTC (18 years, 2 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.158.4.1: preferred, colored; branchpoint 1.158: preferred, colored; next MAIN 1.159: preferred, colored
Changes since revision 1.158.4.1: +7 -6 lines
sync with head.

Revision 1.163: download - view: text, markup, annotated - select for diffs
Wed Dec 6 10:02:22 2006 UTC (18 years, 2 months ago) by yamt
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +3 -3 lines
use KSI_INIT rather than memset.  no functional changes.

Revision 1.158.2.5: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:39:21 2006 UTC (18 years, 2 months ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.4: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.4: +9 -3 lines
Sync with head.

Revision 1.158.2.4: download - view: text, markup, annotated - select for diffs
Fri Nov 17 16:34:36 2006 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.3: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.3: +249 -199 lines
Checkpoint work in progress.

Revision 1.162: download - view: text, markup, annotated - select for diffs
Wed Nov 1 10:17:58 2006 UTC (18 years, 3 months ago) by yamt
Branches: MAIN
CVS tags: netbsd-4-base
Branch point for: netbsd-4
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +6 -5 lines
remove some __unused from function parameters.

Revision 1.158.2.3: download - view: text, markup, annotated - select for diffs
Tue Oct 24 21:10:21 2006 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.2: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.2: +13 -13 lines
- 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.158.4.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:07:10 2006 UTC (18 years, 3 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +12 -6 lines
sync with head

Revision 1.158.2.2: download - view: text, markup, annotated - select for diffs
Sat Oct 21 15:20:46 2006 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.158.2.1: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.2.1: +109 -79 lines
Checkpoint work in progress on locking and per-LWP signals. Very much a
a work in progress and there is still a lot to do.

Revision 1.161: download - view: text, markup, annotated - select for diffs
Thu Oct 12 01:32:15 2006 UTC (18 years, 4 months ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +5 -5 lines
- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.160: download - view: text, markup, annotated - select for diffs
Wed Oct 11 04:51:06 2006 UTC (18 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +9 -2 lines
Don't free specificdata in lwp_exit2(); it's not safe to block there.
Instead, free an LWP's specificdata from lwp_exit() (if it is not the
last LWP) or exit1() (if it is the last LWP).  For consistency, free the
proc's specificdata from exit1() as well.  Add lwp_finispecific() and
proc_finispecific() functions to make this more convenient.

Revision 1.159: download - view: text, markup, annotated - select for diffs
Sat Sep 23 15:36:12 2006 UTC (18 years, 4 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +2 -3 lines
Remove duplicated includes, from Jeff Ito -> PR kern/26113. Thanks.

Revision 1.158.2.1: download - view: text, markup, annotated - select for diffs
Mon Sep 11 18:19:09 2006 UTC (18 years, 5 months ago) by ad
Branches: newlock2
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +104 -59 lines
- Allocate and free turnstiles where needed.
- Split proclist_mutex and alllwp_mutex out of the proclist_lock,
  and use in interrupt context.
- Fix an MP race in enterpgrp()/setsid().
- Acquire proclist_lock and p_crmutex in some obvious places.

Revision 1.154.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:57:16 2006 UTC (18 years, 5 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.154: preferred, colored; next MAIN 1.155: preferred, colored
Changes since revision 1.154: +25 -14 lines
sync with head

Revision 1.155.2.4: download - view: text, markup, annotated - select for diffs
Sun Sep 3 15:25:22 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.155.2.3: preferred, colored; branchpoint 1.155: preferred, colored; next MAIN 1.156: preferred, colored
Changes since revision 1.155.2.3: +7 -5 lines
sync with head.

Revision 1.158: download - view: text, markup, annotated - select for diffs
Wed Aug 23 19:49:09 2006 UTC (18 years, 5 months ago) by manu
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +7 -5 lines
1) Complete Linux exit_group() emulation
Members of the thread group must die without reporting to the parent and
without going to zombie stage. We do that by reparenting to init before
catching a SIGKILL. The parent will not see the child death.

The thread group leader must report the exit status, even if it exits
because of another thread calling exit_group(). We do that by storing the
exit status in struct linux_emuldata_shared, and the exit hook has the
duty of setting struct proc's p_xstat for the thread group leader.

2) For exit/fork/exec hooks, move the NPTL specific code to separate functions
that are shared between COMPAT_LINUX and COMPAT_LINUX32

3) Fix LINUX_CLONE_PARENT_SETTID semantics

Revision 1.155.2.3: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:45:46 2006 UTC (18 years, 6 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.155.2.2: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.2.2: +14 -3 lines
sync with head

Revision 1.157: download - view: text, markup, annotated - select for diffs
Wed Jul 19 21:11:37 2006 UTC (18 years, 6 months ago) by ad
Branches: MAIN
CVS tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +14 -3 lines
- Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.

Revision 1.148.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:09:37 2006 UTC (18 years, 7 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +25 -16 lines
sync with head.

Revision 1.154.6.2: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:38:07 2006 UTC (18 years, 8 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.154.6.1: preferred, colored; branchpoint 1.154: preferred, colored; next MAIN 1.155: preferred, colored
Changes since revision 1.154.6.1: +6 -8 lines
Sync with head.

Revision 1.155.6.1: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:40 2006 UTC (18 years, 8 months ago) by tron
Branches: peter-altq
Diff to: previous 1.155: preferred, colored; next MAIN 1.156: preferred, colored
Changes since revision 1.155: +6 -8 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.155.2.2: download - view: text, markup, annotated - select for diffs
Wed May 24 10:58:41 2006 UTC (18 years, 8 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.155.2.1: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.2.1: +891 -0 lines
sync with head.

Revision 1.156: download - view: text, markup, annotated - select for diffs
Sun May 14 21:15:11 2006 UTC (18 years, 9 months ago) by elad
Branches: MAIN
CVS tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +6 -8 lines
integrate kauth.

Revision 1.155.4.2: download - view: text, markup, annotated - select for diffs
Sat May 6 23:31:30 2006 UTC (18 years, 9 months ago) by christos
Branches: elad-kernelauth
Diff to: previous 1.155.4.1: preferred, colored; branchpoint 1.155: preferred, colored; next MAIN 1.156: preferred, colored
Changes since revision 1.155.4.1: +3 -2 lines
- Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
  that need it.

Approved by core.

Revision 1.154.6.1: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:39:58 2006 UTC (18 years, 9 months ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +4 -4 lines
Sync with head.

Revision 1.155.4.1: download - view: text, markup, annotated - select for diffs
Wed Mar 8 00:53:40 2006 UTC (18 years, 11 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +5 -8 lines
Adapt to kernel authorization KPI.

Revision 1.155.2.1
Sun Mar 5 07:21:38 2006 UTC (18 years, 11 months ago) by yamt
Branches: yamt-pdpolicy
FILE REMOVED
Changes since revision 1.155: +0 -893 lines
file kern_exit.c was added on branch yamt-pdpolicy on 2006-05-24 10:58:41 +0000

Revision 1.155: download - view: text, markup, annotated - select for diffs
Sun Mar 5 07:21:38 2006 UTC (18 years, 11 months ago) by christos
Branches: MAIN
CVS tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +4 -4 lines
implement PT_SYSCALL

Revision 1.154: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:24:29 2005 UTC (19 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-uio_vmspace
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +4 -4 lines
merge ktrace-lwp.

Revision 1.117.2.10: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:09:44 2005 UTC (19 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.117.2.9: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117.2.9: +18 -10 lines
Sync with HEAD. Here we go again...

Revision 1.145.2.3: download - view: text, markup, annotated - select for diffs
Tue Oct 4 14:16:42 2005 UTC (19 years, 4 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Diff to: previous 1.145.2.2: preferred, colored; branchpoint 1.145: preferred, colored; next MAIN 1.146: preferred, colored
Changes since revision 1.145.2.2: +4 -2 lines
Pull up following revision(s) (requested by yamt in ticket #842):
	sys/sys/proc.h: revision 1.206
	sys/kern/kern_lwp.c: revision 1.30
	sys/kern/kern_exit.c: revision 1.151
protect p_nrlwps by sched_lock.  no objection on tech-kern@.  PR/29652.

Revision 1.153: download - view: text, markup, annotated - select for diffs
Sat Oct 1 21:07:38 2005 UTC (19 years, 4 months ago) by jdolecek
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +3 -3 lines
log when traced process is orphaned

PR: 17388 by Greg A. Woods

Revision 1.152: download - view: text, markup, annotated - select for diffs
Sat Oct 1 06:12:44 2005 UTC (19 years, 4 months ago) by yamt
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +3 -3 lines
simplify lwp exit code.

Revision 1.151: download - view: text, markup, annotated - select for diffs
Sun Aug 28 14:57:18 2005 UTC (19 years, 5 months ago) by yamt
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +4 -2 lines
protect p_nrlwps by sched_lock.  no objection on tech-kern@.  PR/29652.

Revision 1.139.4.1: download - view: text, markup, annotated - select for diffs
Wed Aug 24 03:57:26 2005 UTC (19 years, 5 months ago) by riz
Branches: netbsd-2
CVS tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1
Diff to: previous 1.139: preferred, colored; next MAIN 1.140: preferred, colored
Changes since revision 1.139: +4 -4 lines
Pull up following revision(s) (requested by yamt in ticket #5609):
	sys/kern/kern_exit.c: revision 1.149
exit_lwps: fix a race which causes a panic "setrunnable: lwp %p state was %d".

Revision 1.145.2.2: download - view: text, markup, annotated - select for diffs
Sun Aug 21 22:06:14 2005 UTC (19 years, 5 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.145.2.1: preferred, colored; branchpoint 1.145: preferred, colored
Changes since revision 1.145.2.1: +11 -2 lines
Pull up revision 1.150 (requested by yamt in ticket #679):
exit_lwps: fix a race with eg. sa_setwoken.
ie. "exit_lwps: lwp_wait1 failed with error 11"
PR/30689.

Revision 1.145.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 21 22:04:22 2005 UTC (19 years, 5 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +4 -4 lines
Pull up revision 1.149 (requested by yamt in ticket #678):
exit_lwps: fix a race which causes a panic "setrunnable: lwp %p state was %d".

Revision 1.150: download - view: text, markup, annotated - select for diffs
Wed Aug 10 09:44:02 2005 UTC (19 years, 6 months ago) by yamt
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +11 -2 lines
exit_lwps: fix a race with eg. sa_setwoken.
ie. "exit_lwps: lwp_wait1 failed with error 11"
PR/30689.

Revision 1.149: download - view: text, markup, annotated - select for diffs
Wed Aug 10 09:42:03 2005 UTC (19 years, 6 months ago) by yamt
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +4 -4 lines
exit_lwps: fix a race which causes a panic "setrunnable: lwp %p state was %d".

Revision 1.148: download - view: text, markup, annotated - select for diffs
Sun May 29 22:24:15 2005 UTC (19 years, 8 months ago) by christos
Branches: MAIN
Branch point for: yamt-lazymbuf
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +2 -5 lines
- add const.
- remove unnecessary casts.
- add __UNCONST casts and mark them with XXXUNCONST as necessary.

Revision 1.147: download - view: text, markup, annotated - select for diffs
Sun May 8 18:44:39 2005 UTC (19 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +3 -3 lines
Panic strings should not end with \n.

Revision 1.143.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:29:23 2005 UTC (19 years, 9 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.143: preferred, colored; next MAIN 1.144: preferred, colored
Changes since revision 1.143: +15 -14 lines
sync with -current

Revision 1.117.2.9: download - view: text, markup, annotated - select for diffs
Fri Apr 1 14:30:56 2005 UTC (19 years, 10 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.117.2.8: preferred, colored
Changes since revision 1.117.2.8: +3 -3 lines
Sync with HEAD.

Revision 1.146: download - view: text, markup, annotated - select for diffs
Wed Mar 30 17:07:50 2005 UTC (19 years, 10 months ago) by christos
Branches: MAIN
CVS tags: kent-audio2-base
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +3 -3 lines
PR/19837: Stephen Ma: signal(SIGCHLD, SIG_IGN) should not create zombies.

Revision 1.144.2.1: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:36:11 2005 UTC (19 years, 11 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.144: preferred, colored; next MAIN 1.145: preferred, colored
Changes since revision 1.144: +13 -13 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.117.2.8: download - view: text, markup, annotated - select for diffs
Fri Mar 4 16:51:58 2005 UTC (19 years, 11 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.117.2.7: preferred, colored
Changes since revision 1.117.2.7: +13 -13 lines
Sync with HEAD.

Hi Perry!

Revision 1.145: download - view: text, markup, annotated - select for diffs
Sat Feb 26 21:34:55 2005 UTC (19 years, 11 months ago) by perry
Branches: MAIN
CVS tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +13 -13 lines
nuke trailing whitespace

Revision 1.117.2.7: download - view: text, markup, annotated - select for diffs
Fri Feb 4 11:47:42 2005 UTC (20 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.117.2.6: preferred, colored
Changes since revision 1.117.2.6: +3 -2 lines
Sync with HEAD.

Revision 1.144: download - view: text, markup, annotated - select for diffs
Mon Jan 24 21:27:02 2005 UTC (20 years ago) by dbj
Branches: MAIN
CVS tags: yamt-km-base2, yamt-km-base
Branch point for: yamt-km
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +3 -2 lines
clear p->p_cwdi of exiting processes and
avoid dereferencing invalid p_cwdi in checkdirs
this fixes a race condition between exiting processes and mount
see discussion on tech-kern:
 http://mail-index.netbsd.org/tech-kern/2004/10/04/0006.html
 http://mail-index.netbsd.org/tech-kern/2004/10/08/0005.html

Revision 1.117.2.6: download - view: text, markup, annotated - select for diffs
Tue Oct 19 15:58:04 2004 UTC (20 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.117.2.5: preferred, colored
Changes since revision 1.117.2.5: +3 -3 lines
Sync with HEAD

Revision 1.143: download - view: text, markup, annotated - select for diffs
Fri Oct 1 16:30:52 2004 UTC (20 years, 4 months ago) by yamt
Branches: MAIN
CVS tags: kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: kent-audio2
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +3 -3 lines
introduce a function, proclist_foreach_call, to iterate all procs on
a proclist and call the specified function for each of them.
primarily to fix a procfs locking problem, but i think that it's useful for
others as well.

while i'm here, introduce PROCLIST_FOREACH macro, which is similar to
LIST_FOREACH but skips marker entries which are used by proclist_foreach_call.

Revision 1.117.2.5: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:35:03 2004 UTC (20 years, 4 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.117.2.4: preferred, colored
Changes since revision 1.117.2.4: +4 -4 lines
Fix the sync with head I botched.

Revision 1.117.2.4: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:53:02 2004 UTC (20 years, 4 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.117.2.3: preferred, colored
Changes since revision 1.117.2.3: +4 -4 lines
Sync with HEAD.

Revision 1.117.2.3: download - view: text, markup, annotated - select for diffs
Thu Aug 12 11:42:19 2004 UTC (20 years, 6 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.117.2.2: preferred, colored
Changes since revision 1.117.2.2: +3 -3 lines
Sync with HEAD.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Sat Aug 7 03:34:37 2004 UTC (20 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +3 -3 lines
Use the P_ZOMBIE macro instead of open-coding it. No functional change.

Revision 1.117.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:52:44 2004 UTC (20 years, 6 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.117.2.1: preferred, colored
Changes since revision 1.117.2.1: +312 -256 lines
Sync with HEAD

Revision 1.141: download - view: text, markup, annotated - select for diffs
Mon May 31 15:33:38 2004 UTC (20 years, 8 months ago) by pk
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +3 -3 lines
cwdfree() signature has been changed to accomodate fine-grained locking.

Revision 1.140: download - view: text, markup, annotated - select for diffs
Tue May 4 21:23:39 2004 UTC (20 years, 9 months ago) by pk
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +118 -96 lines
exit1: if !BIGLOCK, once the exiting process has been placed on the zombie
list and the proclist lock is released, we shouldn't touch the process
structure anymore, since it may be collected immediately by a waiting
parent.

Revision 1.93.6.3: download - view: text, markup, annotated - select for diffs
Sun Mar 28 08:02:36 2004 UTC (20 years, 10 months ago) by jmc
Branches: netbsd-1-6
Diff to: previous 1.93.6.2: preferred, colored; branchpoint 1.93: preferred, colored; next MAIN 1.94: preferred, colored
Changes since revision 1.93.6.2: +16 -5 lines
Pullup rev 1.104-1.106 (requested by junyoung in ticket #1615)

Make sure that, if orphaned child is being traced, it's reparented back
to the original parent before it's killed.

Revision 1.139: download - view: text, markup, annotated - select for diffs
Sun Mar 14 01:08:47 2004 UTC (20 years, 11 months ago) by cl
Branches: MAIN
CVS tags: netbsd-2-base, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0
Branch point for: netbsd-2
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +24 -21 lines
add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
  * VP id
  * lock on VP data
  * LWP on VP
  * recently blocked LWP on VP
  * queue of LWPs woken which ran on this VP before sleep
  * faultaddr
  * LWP cache for upcalls
  * upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP

Revision 1.138: download - view: text, markup, annotated - select for diffs
Fri Mar 5 07:27:22 2004 UTC (20 years, 11 months ago) by dbj
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +8 -3 lines
add some spltty() calls around TTY_LOCK() calls that didn't have them

Revision 1.137: download - view: text, markup, annotated - select for diffs
Tue Mar 2 09:15:26 2004 UTC (20 years, 11 months ago) by yamt
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +8 -2 lines
once exit1() releases big kernel lock, the struct proc can be freed and
re-used by another cpu immediately.  in that case, lwp_exit2() will
access freed memory.  to fix this:

- remove curlwp from p_lwps in exit1() rather than letting lwp_exit2() do so.
- add assertions to ensure freed proc has no lwps.

kern/24329 from me and kern/24574 from Havard Eidnes.

Revision 1.136: download - view: text, markup, annotated - select for diffs
Wed Feb 18 14:42:20 2004 UTC (20 years, 11 months ago) by hannken
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +4 -4 lines
Run pmap_deactivate() earlier in exit1(). Prevents a panic on sparc MP
where p->p_vmspace was 0xdeadbeef in pmap_deactivate().

Approved by: YAMAMOTO Takashi <yamt@netbsd.org>

Revision 1.135: download - view: text, markup, annotated - select for diffs
Mon Feb 9 13:11:21 2004 UTC (21 years ago) by yamt
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +4 -2 lines
- borrow vmspace0 in uvm_proc_exit instead of uvmspace_free.
  the latter is not a appropriate place to do so and it broke vfork.
- deactivate pmap before calling cpu_exit() to keep a balance of
  pmap_activate/deactivate.

Revision 1.134: download - view: text, markup, annotated - select for diffs
Sat Feb 7 10:05:52 2004 UTC (21 years ago) by yamt
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +2 -9 lines
don't deactivate pmap in exit1 because we'll touch the pmap later.
instead, borrow vmspace0 immediately before destroying the pmap
in uvmspace_free.

Revision 1.133: download - view: text, markup, annotated - select for diffs
Sun Jan 4 11:33:31 2004 UTC (21 years, 1 month ago) by jdolecek
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +83 -137 lines
Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
  as FPU state), and is the last potentially blocking operation;
  all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
  by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
  for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread

Revision 1.132: download - view: text, markup, annotated - select for diffs
Sat Jan 3 19:43:55 2004 UTC (21 years, 1 month ago) by jdolecek
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +5 -5 lines
fix some comments, use NULL instead of 0 for pointer comparison

Revision 1.131: download - view: text, markup, annotated - select for diffs
Fri Jan 2 18:52:17 2004 UTC (21 years, 1 month ago) by cl
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +12 -9 lines
kernel part of no-syscall upcall stack return:  libpthread registers
an offset between ss_sp and struct sa_stackinfo_t (located in struct
__pthread_st) when calling sa_register.  The kernel increments the
sast_gen counter in struct sastack when an upcall stack is used.
libpthread increments the sasi_stackgen counter in struct
sa_stackinfo_t when an upcall stack is freed.  The kernel compares the
two counters to decide if a stack is free or in use.

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

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

Revision 1.130: download - view: text, markup, annotated - select for diffs
Sat Dec 6 04:16:33 2003 UTC (21 years, 2 months ago) by atatat
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +14 -2 lines
The missing pieces of PROC_PID_STOPEXIT/P_STOPEXIT, a sysctl tweakable
flag that makes a process stop as it exits.

Revision 1.129: download - view: text, markup, annotated - select for diffs
Mon Nov 17 22:52:09 2003 UTC (21 years, 3 months ago) by cl
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +5 -9 lines
- use list to keep track of free stacks.
- use splay tree for the pagefault check if the thread was running on
  an upcall stack.

=> removes the limitation that all upcall stacks need to be
   adjoining and that all upcall stacks have to be loaded with the
   1st sys_sa_stacks call.
=> enables keeping information associated with a stack in the kernel
   which makes it simpler to find out which LWP is using a stack.
=> allows increasing the SA_MAXNUMSTACKS without having to
   allocate an array of that size.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Wed Nov 12 21:07:38 2003 UTC (21 years, 3 months ago) by dsl
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +76 -47 lines
- Count number of zombies and stopped children and requeue them at the top
  of the sibling list so that find_stopped_child can be optimised to avoid
  traversing the entire sibling list - helps when a process has a lot of
  children.
- Modify locking in pfind() and pgfind() to that the caller can rely on the
  result being valid, allow caller to request that zombies be findable.
- Rename pfind() to p_find() to ensure we break binary compatibility.
- Remove svr4_pfind since p_find willnow do the job.
- Modify some of the SMP locking of the proc lists - signals are still stuffed.

Welcome to 1.6ZF

Revision 1.127: download - view: text, markup, annotated - select for diffs
Thu Nov 6 09:30:13 2003 UTC (21 years, 3 months ago) by dsl
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +16 -7 lines
Ensure that the controlling tty is unlinked from the session and pgrp.
Due to the way the console is handled, neither the revoke() nor vrele()
is guaranteed to be seen by the real, underlying tty.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Thu Nov 6 09:16:22 2003 UTC (21 years, 3 months ago) by dsl
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +12 -16 lines
Remove a pile of redundant (caddr_t) casts.

Revision 1.125: download - view: text, markup, annotated - select for diffs
Mon Nov 3 22:34:51 2003 UTC (21 years, 3 months ago) by cl
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +2 -8 lines
Reimplement VP donation such that multiple unblocked upcalls can be
combined.  Also prepare for adding VP repossession later.

- kern_sa.c: sa_yield/sa_switch: detect if there are pending unblocked
  upcalls.
- kern_sa.c: sa_unblock_userret/sa_setwoken: queue LWPs about to invoke
  an unblocked upcall on the sa_wokenq.  put queued LWPs in a state where
  they can be put in the cache.  notify LWP on the VP about pending
  upcalls.
- kern_sa.c: sa_upcall_userret: check sa_wokenq for pending upcalls,
  generate unblocked upcalls with multiple event sas
- kern_sa.c: sa_vp_repossess/sa_vp_donate: g/c, restore original
  sa_vp_repossess

Revision 1.93.6.2: download - view: text, markup, annotated - select for diffs
Wed Oct 22 06:15:50 2003 UTC (21 years, 3 months ago) by jmc
Branches: netbsd-1-6
CVS tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002
Diff to: previous 1.93.6.1: preferred, colored; branchpoint 1.93: preferred, colored
Changes since revision 1.93.6.1: +8 -8 lines
Pullup rev 1.96 (requested by junyoung in ticket #1533)

Move the call up exit hooks before curproc = NULL so that we can
use lockmgr in exit hooks.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Tue Sep 16 13:46:24 2003 UTC (21 years, 5 months ago) by cl
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +5 -2 lines
fix SA/pthread pagefault failure:
- prevent BLOCKED upcalls on double page faults and during upcalls
- make libpthread handle blocked threads which hold locks
- prevent UNBLOCKED upcalls from overtaking their BLOCKED upcall
this adds a new syscall sa_unblockyield
see also http://mail-index.netbsd.org/tech-kern/2003/09/15/0020.html

Revision 1.123: download - view: text, markup, annotated - select for diffs
Sat Sep 13 15:32:40 2003 UTC (21 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +36 -4 lines
provide siginfo_t in for SIGCHLD

Revision 1.122: download - view: text, markup, annotated - select for diffs
Thu Sep 11 01:32:09 2003 UTC (21 years, 5 months ago) by cl
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +2 -5 lines
KNF and use f instead of s to temporarily save l_flag

Revision 1.121: download - view: text, markup, annotated - select for diffs
Wed Aug 20 14:04:00 2003 UTC (21 years, 5 months ago) by yamt
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +3 -3 lines
use LSDEAD instead of SDEAD for lwp state.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Wed Aug 20 13:50:53 2003 UTC (21 years, 5 months ago) by yamt
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +3 -3 lines
fix indent.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Thu Aug 7 16:31:44 2003 UTC (21 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +3 -7 lines
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Thu Jul 17 18:16:58 2003 UTC (21 years, 7 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +15 -3 lines
Changes from Stephan Uphoff to patch problems with LWPs blocking when they
shouldn't, and MP.

Revision 1.117.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 2 15:26:37 2003 UTC (21 years, 7 months ago) by darrenr
Branches: ktrace-lwp
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +4 -4 lines
Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Sun Jun 29 22:31:20 2003 UTC (21 years, 7 months ago) by fvdl
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +2 -2 lines
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Sat Jun 28 14:21:53 2003 UTC (21 years, 7 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +4 -4 lines
Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.115: download - view: text, markup, annotated - select for diffs
Wed Mar 19 11:36:33 2003 UTC (21 years, 11 months ago) by dsl
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +55 -47 lines
Alternative pid/proc allocater, removes all searches associated with pid
lookup and allocation, and any dependency on NPROC or MAXUSERS.
NO_PID changed to -1 (and renamed NO_PGID) to remove artificial limit
on PID_MAX.
As discussed on tech-kern.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Wed Mar 12 15:26:33 2003 UTC (21 years, 11 months ago) by dsl
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +9 -9 lines
Need to call calcru while l->l_stat == LSONPROC

Revision 1.113: download - view: text, markup, annotated - select for diffs
Wed Mar 5 11:40:55 2003 UTC (21 years, 11 months ago) by dsl
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +13 -11 lines
Get processes execution time before the LWPs state is changed

Revision 1.112: download - view: text, markup, annotated - select for diffs
Sat Feb 22 01:00:14 2003 UTC (21 years, 11 months ago) by nathanw
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +4 -3 lines
Set P_WEXIT earlier; specifically, before a pool_get(, PR_WAITOK) that
could sleep.

Pointed out by enami.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Fri Feb 21 16:32:19 2003 UTC (21 years, 11 months ago) by skrll
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +3 -3 lines
typo in comment.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Mon Feb 17 23:45:47 2003 UTC (22 years ago) by nathanw
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +3 -3 lines
Test p->p_sa instead of p->p_flag & P_SA, as the latter may have been
cleared by sigexit().

Revision 1.109: download - view: text, markup, annotated - select for diffs
Fri Feb 14 10:11:57 2003 UTC (22 years ago) by dsl
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +171 -119 lines
Split sys_wait4 so that code isn't duplicated in compat tree.
(approved by christos)

Revision 1.108: download - view: text, markup, annotated - select for diffs
Mon Jan 27 20:30:32 2003 UTC (22 years ago) by nathanw
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +6 -4 lines
Call exit_lwps() from exit1() if there is more than one LWP (as
recorded by p_nlwps) *or* if the process was a SA process. Since
cached SA LWPs aren't counted in p_nlwps, it was possible for
them to not be cleaned up and remain on the alllwp list, pointing to a
dead proc.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Sat Jan 18 10:06:26 2003 UTC (22 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +195 -42 lines
Merge the nathanw_sa branch.

Revision 1.106.2.1: download - view: text, markup, annotated - select for diffs
Wed Dec 18 01:06:07 2002 UTC (22 years, 2 months ago) by gmcgarry
Branches: gmcgarry_ucred
Diff to: previous 1.106: preferred, colored; next MAIN 1.107: preferred, colored
Changes since revision 1.106: +4 -7 lines
Merge pcred and ucred, and poolify.  TBD: check backward compatibility
and factor-out some higher-level functionality.

Revision 1.89.2.27: download - view: text, markup, annotated - select for diffs
Wed Dec 11 06:43:03 2002 UTC (22 years, 2 months ago) by thorpej
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.89.2.26: preferred, colored; next MAIN 1.90: preferred, colored
Changes since revision 1.89.2.26: +16 -5 lines
Sync with HEAD.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Sat Nov 30 09:59:22 2002 UTC (22 years, 2 months ago) by jdolecek
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: gmcgarry_ucred
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +3 -3 lines
fix typo in comment. pointed out by David Sainty

Revision 1.105: download - view: text, markup, annotated - select for diffs
Sat Nov 30 09:54:43 2002 UTC (22 years, 2 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +4 -3 lines
fix bug in previous - if child was traced and p_opptr == p_pptr,
need to reparent the process to initproc, so that child wouldn't
have its p_pptr pointer still pointing on the exited parent

pointed out by Dave Sainty in private mail (the patch in kern/14443
didn't have this bug)

Revision 1.104: download - view: text, markup, annotated - select for diffs
Thu Nov 28 21:41:29 2002 UTC (22 years, 2 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +15 -5 lines
exit1(): make sure that, if orphaned child is being traced, it's
reparented back to original parent before it's killed.
This makes the original parent aware that the child has exited if
the debugger failed to wait() on the debugged zombie before exiting.
Since we clear tracing flags before killing the child, the reparenting
logic in wait4() wouldn't be triggered, so it's necessary to do it here.

Problem reported and fix provided in kern/14443 by David Sainty.

Revision 1.89.2.26: download - view: text, markup, annotated - select for diffs
Mon Nov 25 21:42:40 2002 UTC (22 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.25: preferred, colored
Changes since revision 1.89.2.25: +3 -3 lines
Get the kernel lock in lwp_exit_hook().

Revision 1.89.2.25: download - view: text, markup, annotated - select for diffs
Mon Nov 11 22:13:41 2002 UTC (22 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.24: preferred, colored
Changes since revision 1.89.2.24: +7 -2 lines
Catch up to -current

Revision 1.103: download - view: text, markup, annotated - select for diffs
Wed Oct 23 09:14:16 2002 UTC (22 years, 3 months ago) by jdolecek
Branches: MAIN
CVS tags: kqueue-aftermerge
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +7 -2 lines
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe

Revision 1.89.2.24: download - view: text, markup, annotated - select for diffs
Tue Oct 22 00:18:30 2002 UTC (22 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.23: preferred, colored
Changes since revision 1.89.2.23: +4 -3 lines
In sys_wait4, initialize q before it is used.

Found and reported by Bill Studenmund.

Revision 1.89.2.23: download - view: text, markup, annotated - select for diffs
Fri Oct 18 02:44:51 2002 UTC (22 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.22: preferred, colored
Changes since revision 1.89.2.22: +2 -3 lines
Catch up to -current.

Revision 1.89.2.22: download - view: text, markup, annotated - select for diffs
Fri Oct 11 22:27:23 2002 UTC (22 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.21: preferred, colored
Changes since revision 1.89.2.21: +5 -3 lines
Clear P_SA in p->p_flag as well as L_SA in l->l_flag to avoid
problems with the signal code when we're exiting.

Revision 1.90.2.6: download - view: text, markup, annotated - select for diffs
Thu Oct 10 18:43:06 2002 UTC (22 years, 4 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.90.2.5: preferred, colored; branchpoint 1.90: preferred, colored; next MAIN 1.91: preferred, colored
Changes since revision 1.90.2.5: +6 -7 lines
sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.102: download - view: text, markup, annotated - select for diffs
Wed Sep 25 22:21:41 2002 UTC (22 years, 4 months ago) by thorpej
Branches: MAIN
CVS tags: kqueue-beforemerge, kqueue-base
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +2 -3 lines
Don't include <sys/map.h>.

Revision 1.89.2.21: download - view: text, markup, annotated - select for diffs
Tue Sep 17 21:22:02 2002 UTC (22 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.20: preferred, colored
Changes since revision 1.89.2.20: +9 -4 lines
Catch up to -current.

Revision 1.90.2.5: download - view: text, markup, annotated - select for diffs
Fri Sep 6 08:47:47 2002 UTC (22 years, 5 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.90.2.4: preferred, colored; branchpoint 1.90: preferred, colored
Changes since revision 1.90.2.4: +58 -12 lines
sync kqueue branch with HEAD

Revision 1.101: download - view: text, markup, annotated - select for diffs
Wed Sep 4 01:32:32 2002 UTC (22 years, 5 months ago) by matt
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +6 -6 lines
Use the queue macros from <sys/queue.h> instead of referring to the queue
members directly.  Use *_FOREACH whenever possible.

Revision 1.93.4.2: download - view: text, markup, annotated - select for diffs
Thu Aug 29 05:23:06 2002 UTC (22 years, 5 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.93.4.1: preferred, colored; branchpoint 1.93: preferred, colored; next MAIN 1.94: preferred, colored
Changes since revision 1.93.4.1: +52 -12 lines
catch up with -current.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Wed Aug 28 07:16:36 2002 UTC (22 years, 5 months ago) by gmcgarry
Branches: MAIN
CVS tags: gehenna-devsw-base
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +7 -2 lines
MI kernel support for user-level Restartable Atomic Sequences (RAS).

Revision 1.89.2.20: download - view: text, markup, annotated - select for diffs
Tue Aug 27 23:47:23 2002 UTC (22 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.19: preferred, colored
Changes since revision 1.89.2.19: +6 -6 lines
Catch up to -current.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Tue Aug 13 05:42:27 2002 UTC (22 years, 6 months ago) by manu
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +8 -8 lines
In exit1(), moved the call to the emulation exit hook to a place where it is
safet to sleep.

Revision 1.89.2.19: download - view: text, markup, annotated - select for diffs
Tue Aug 13 02:20:05 2002 UTC (22 years, 6 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.18: preferred, colored
Changes since revision 1.89.2.18: +21 -6 lines
Catch up to -current.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Wed Aug 7 11:13:41 2002 UTC (22 years, 6 months ago) by briggs
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +4 -2 lines
Only include sys/pmc.h if PERFCTRS is defined.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Wed Aug 7 05:16:24 2002 UTC (22 years, 6 months ago) by briggs
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +15 -2 lines
Implement pmc(9) -- An interface to hardware performance monitoring
counters.  These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface.  Initially, the Intel XScale
counters are the only ones supported.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Fri Aug 2 22:45:57 2002 UTC (22 years, 6 months ago) by manu
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +8 -8 lines
Move the call up exit hooks before curproc = NULL so that we can
use lockmgr in exit hooks.

Revision 1.89.2.18: download - view: text, markup, annotated - select for diffs
Thu Aug 1 02:46:18 2002 UTC (22 years, 6 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.17: preferred, colored
Changes since revision 1.89.2.17: +26 -6 lines
Catch up to -current.

Revision 1.93.6.1: download - view: text, markup, annotated - select for diffs
Mon Jul 29 15:37:28 2002 UTC (22 years, 6 months ago) by lukem
Branches: netbsd-1-6
CVS tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +26 -6 lines
Pull up revision 1.95 (requested by jdolocek in ticket #557):
Make sure that the pointer to old parent process for ptraced children
gets reset properly when the old parent exits before the child. A flag
is set in old parent process when the child is reparented in ptrace(2).
If it's set when process is exiting, all running processes have their
'old parent process' pointer checked and reset if appropriate. Also
change to use 'struct proc *' pointer directly, rather than pid_t.
This fixes security/14444 by David Sainty.
Reviewed by Christos Zoulas.

Revision 1.89.2.17: download - view: text, markup, annotated - select for diffs
Fri Jul 26 01:19:55 2002 UTC (22 years, 6 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.16: preferred, colored
Changes since revision 1.89.2.16: +4 -3 lines
Don't bother calling exit_lwps() if there's only one (the usual case).

Revision 1.95: download - view: text, markup, annotated - select for diffs
Thu Jul 25 20:04:02 2002 UTC (22 years, 6 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +26 -6 lines
Make sure that the pointer to old parent process for ptraced children
gets reset properly when the old parent exits before the child. A flag
is set in old parent process when the child is reparented in ptrace(2).
If it's set when process is exiting, all running processes have their
'old parent process' pointer checked and reset if appropriate. Also
change to use 'struct proc *' pointer directly, rather than pid_t.
This fixes security/14444 by David Sainty.

Reviewed by Christos Zoulas.

Revision 1.89.2.16: download - view: text, markup, annotated - select for diffs
Wed Jul 17 18:01:37 2002 UTC (22 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.15: preferred, colored
Changes since revision 1.89.2.15: +8 -8 lines
Whitespace.

Revision 1.89.2.15: download - view: text, markup, annotated - select for diffs
Fri Jul 12 03:02:55 2002 UTC (22 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.14: preferred, colored
Changes since revision 1.89.2.14: +70 -57 lines
Move LWP-cleanup code into its own function.

Revision 1.89.2.14: download - view: text, markup, annotated - select for diffs
Fri Jul 12 01:40:15 2002 UTC (22 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.13: preferred, colored
Changes since revision 1.89.2.13: +2 -3 lines
No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.89.2.13: download - view: text, markup, annotated - select for diffs
Mon Jun 24 22:10:41 2002 UTC (22 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.12: preferred, colored
Changes since revision 1.89.2.12: +10 -10 lines
Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.90.2.4: download - view: text, markup, annotated - select for diffs
Sun Jun 23 17:49:27 2002 UTC (22 years, 7 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.90.2.3: preferred, colored; branchpoint 1.90: preferred, colored
Changes since revision 1.90.2.3: +4 -12 lines
catch up with -current on kqueue branch

Revision 1.93.4.1: download - view: text, markup, annotated - select for diffs
Thu Jun 20 16:02:19 2002 UTC (22 years, 7 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +8 -2 lines
catch up with -current.

Revision 1.89.2.12: download - view: text, markup, annotated - select for diffs
Thu Jun 20 03:47:12 2002 UTC (22 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.11: preferred, colored
Changes since revision 1.89.2.11: +7 -3 lines
Catch up to -current.

Revision 1.94: download - view: text, markup, annotated - select for diffs
Mon Jun 17 16:22:50 2002 UTC (22 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +8 -2 lines
Niels Provos systrace work, ported to NetBSD by kittenz and reworked...

Revision 1.89.2.11: download - view: text, markup, annotated - select for diffs
Mon Apr 1 21:23:30 2002 UTC (22 years, 10 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.10: preferred, colored
Changes since revision 1.89.2.10: +5 -4 lines
CVS removed a couple too many #include's.

Revision 1.89.2.10: download - view: text, markup, annotated - select for diffs
Mon Apr 1 07:47:52 2002 UTC (22 years, 10 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.9: preferred, colored
Changes since revision 1.89.2.9: +4 -14 lines
Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.93: download - view: text, markup, annotated - select for diffs
Sun Mar 17 23:41:30 2002 UTC (22 years, 11 months ago) by christos
Branches: MAIN
CVS tags: netbsd-1-6-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +4 -12 lines
oops, forgot to commit the caller of exithook...

Revision 1.92.4.2: download - view: text, markup, annotated - select for diffs
Sun Mar 10 21:05:11 2002 UTC (22 years, 11 months ago) by thorpej
Branches: newlock
Diff to: previous 1.92.4.1: preferred, colored; branchpoint 1.92: preferred, colored; next MAIN 1.93: preferred, colored
Changes since revision 1.92.4.1: +6 -3 lines
Some suggestions from Bill Sommerfeld:
* Use a pool cache for turnstiles, so you can save the memset().  Add
  some asserts to make sure that inactive turnstiles end up in their
  freshly-constructed state.
* Invalidate p->p_ts before returning p to the proc pool (only done if
  DIAGNOSTIC).
* Fix up some comments in kern_turnstile.c
* Bugfix in turnstile_remque(): typo ("==" should have been "=").

Revision 1.92.4.1: download - view: text, markup, annotated - select for diffs
Sun Mar 10 19:08:22 2002 UTC (22 years, 11 months ago) by thorpej
Branches: newlock
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +4 -2 lines
First cut implementation of turnstiles, a specialized sleep queue used for
kernel synchronization objects.  A detailed description of turnstiles
can be found in:

	Solaris Internals: Core Kernel Architecture, by Jim Mauro
	   and Richard McDougall, section 3.7.

Note this implementation does not yet implement priority inheritence,
nor does it currently differentiate between reader and writer queues
(though they are provided for in the API).

Revision 1.89.2.9: download - view: text, markup, annotated - select for diffs
Wed Feb 6 19:47:52 2002 UTC (23 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.8: preferred, colored
Changes since revision 1.89.2.8: +5 -12 lines
Use sa_getcachelwp() instead of manual cache frobbing in exit1().

Revision 1.90.2.3: download - view: text, markup, annotated - select for diffs
Thu Jan 10 19:59:47 2002 UTC (23 years, 1 month ago) by thorpej
Branches: kqueue
Diff to: previous 1.90.2.2: preferred, colored; branchpoint 1.90: preferred, colored
Changes since revision 1.90.2.2: +4 -1 lines
Sync kqueue branch with -current.

Revision 1.89.2.8: download - view: text, markup, annotated - select for diffs
Sat Nov 17 00:40:29 2001 UTC (23 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.7: preferred, colored
Changes since revision 1.89.2.7: +16 -3 lines
Set the exit hook to cause LWPs to exit.

Revision 1.89.2.7: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:16:35 2001 UTC (23 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.6: preferred, colored
Changes since revision 1.89.2.6: +4 -1 lines
Catch up to -current.

Revision 1.91.4.1: download - view: text, markup, annotated - select for diffs
Mon Nov 12 21:18:46 2001 UTC (23 years, 3 months ago) by thorpej
Branches: thorpej-mips-cache
Diff to: previous 1.91: preferred, colored; next MAIN 1.92: preferred, colored
Changes since revision 1.91: +4 -1 lines
Sync the thorpej-mips-cache branch with -current.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Mon Nov 12 15:25:08 2001 UTC (23 years, 3 months ago) by lukem
Branches: MAIN
CVS tags: thorpej-mips-cache-base, newlock-base, ifpoll-base
Branch point for: newlock
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +4 -1 lines
add RCSIDs

Revision 1.89.2.6: download - view: text, markup, annotated - select for diffs
Mon Nov 5 19:59:02 2001 UTC (23 years, 3 months ago) by briggs
Branches: nathanw_sa
Diff to: previous 1.89.2.5: preferred, colored
Changes since revision 1.89.2.5: +2 -2 lines
KERNEL_PROC_LOCK/KERNEL_PROC_UNLOCK take struct lwp *, not struct proc *.

Revision 1.91.2.1: download - view: text, markup, annotated - select for diffs
Wed Sep 26 15:28:21 2001 UTC (23 years, 4 months ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.91: preferred, colored; next MAIN 1.92: preferred, colored
Changes since revision 1.91: +2 -2 lines
* add a VCLONED vnode flag that indicates a vnode representing a cloned
  device.
* rename REVOKEALL to REVOKEALIAS, and add a REVOKECLONE flag, to pass
  to VOP_REVOKE
* the revoke system call will revoke all aliases, as before, but not the
  clones
* vdevgone is called when detaching a device, so make it use REVOKECLONE
  to get rid of all clones as well
* clean up all uses of VOP_OPEN wrt. locking.
* add a few VOPS to spec_vnops that need to do something when it's a
  clone vnode (access and getattr)
* add a copy of the vnode vattr structure of the original 'master' vnode
  to the specinfo of a cloned vnode. could possibly redirect getattr to
  the 'master' vnode, but this has issues with revoke
* add a vdev_reassignvp function that disassociates a vnode from its
  original device, and reassociates it with the specified dev_t. to be
  used by cloning devices only, in case a new minor is allocated.
* change all direct references in drivers to v_devcookie and v_rdev
  to vdev_privdata(vp) and vdev_rdev(vp). for diagnostic purposes
  when debugging race conditions that still exist wrt. locking and
  revoking vnodes.
* make the locking state of a vnode consistent when passed to
  d_open and d_close (unlocked). locked would be better, but has
  some deadlock issues

Revision 1.89.2.5: download - view: text, markup, annotated - select for diffs
Fri Aug 24 04:20:07 2001 UTC (23 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.4: preferred, colored
Changes since revision 1.89.2.4: +9 -1 lines
A few files and lwp/proc conversions I missed in the last big update.
GENERIC runs again.

Revision 1.89.2.4: download - view: text, markup, annotated - select for diffs
Fri Aug 24 00:11:27 2001 UTC (23 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.3: preferred, colored
Changes since revision 1.89.2.3: +4 -3 lines
Catch up with -current.

Revision 1.90.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 3 04:13:41 2001 UTC (23 years, 6 months ago) by lukem
Branches: kqueue
Diff to: previous 1.90.2.1: preferred, colored; branchpoint 1.90: preferred, colored
Changes since revision 1.90.2.1: +4 -3 lines
update to -current

Revision 1.91: download - view: text, markup, annotated - select for diffs
Wed Jul 18 19:10:27 2001 UTC (23 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache, thorpej-devvp
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +4 -3 lines
Add `WALLSIG' which causes wait4(2) to wait for all processes, regardless
of exit signal.  Add Linux-compatible aliases __WCLONE (for WALTSIG) and
__WALL (for WALLSIG), for compatibility with the Linux clone(2) API.

Revision 1.90.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 10 13:52:10 2001 UTC (23 years, 7 months ago) by lukem
Branches: kqueue
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +6 -1 lines
add calls to KNOTE(9) as appropriate

Revision 1.89.2.3: download - view: text, markup, annotated - select for diffs
Mon Jul 9 22:31:55 2001 UTC (23 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.2: preferred, colored
Changes since revision 1.89.2.2: +7 -5 lines
Prevent entering exit1() from multiple LWPs in a process.
Use setrunnable() instead of tweaking l_stat and calling setrunnable();
avoids the embarassment of having swapped-out LWPs on the run queue.

Revision 1.89.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 9 01:57:52 2001 UTC (23 years, 10 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89.2.1: preferred, colored
Changes since revision 1.89.2.1: +9 -1 lines
Catch up with -current.

Revision 1.74.2.5: download - view: text, markup, annotated - select for diffs
Mon Mar 12 13:31:36 2001 UTC (23 years, 11 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.74.2.4: preferred, colored; branchpoint 1.74: preferred, colored; next MAIN 1.75: preferred, colored
Changes since revision 1.74.2.4: +15 -12 lines
Sync with HEAD.

Revision 1.89.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 5 22:49:39 2001 UTC (23 years, 11 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +155 -35 lines
Initial commit of scheduler activations and lightweight process support.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Mon Mar 5 20:38:21 2001 UTC (23 years, 11 months ago) by fvdl
Branches: MAIN
CVS tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: kqueue
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +5 -1 lines
Avoid spinning forever when hardclock() wants to grab the kernel lock
held by the reaper. From Bill Sommerfeld.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Mon Feb 26 21:09:57 2001 UTC (23 years, 11 months ago) by lukem
Branches: MAIN
Branch point for: nathanw_sa
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +11 -12 lines
minor KNF

Revision 1.74.2.4: download - view: text, markup, annotated - select for diffs
Sun Feb 11 19:16:46 2001 UTC (24 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.74.2.3: preferred, colored; branchpoint 1.74: preferred, colored
Changes since revision 1.74.2.3: +1 -20 lines
Sync with HEAD.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Sat Feb 10 05:05:27 2001 UTC (24 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +1 -20 lines
Don't uvm_deallocate() the address space in exit1().  The address
space is already torn down in uvmspace_free() when the vmspace
refrence count reaches 0.  Move the shmexit() call into uvmspace_free().

Note that there is a beneficial side-effect of deferring the unmap
to uvmspace_free() -- on systems where TLB invalidations are
particularly expensive, the unmapping of the address space won't
have to cause TLB invalidations; uvmspace_free() is going to be
run in a context other than the exiting process's, so the "pmap is
active" test will evaluate to FALSE in the pmap module.

Revision 1.74.2.3: download - view: text, markup, annotated - select for diffs
Fri Jan 5 17:36:38 2001 UTC (24 years, 1 month ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.74.2.2: preferred, colored; branchpoint 1.74: preferred, colored
Changes since revision 1.74.2.2: +3 -3 lines
Sync with HEAD

Revision 1.87: download - view: text, markup, annotated - select for diffs
Fri Dec 22 22:59:00 2000 UTC (24 years, 1 month ago) by jdolecek
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +4 -4 lines
split off thread specific stuff from struct sigacts to struct sigctx, leaving
    only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.

Revision 1.74.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 22 16:05:19 2000 UTC (24 years, 2 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.74.2.1: preferred, colored; branchpoint 1.74: preferred, colored
Changes since revision 1.74.2.1: +7 -1 lines
Sync with HEAD.

Revision 1.74.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 20 18:08:59 2000 UTC (24 years, 2 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +24 -34 lines
Update thorpej_scsipi to -current as of a month ago

Revision 1.86: download - view: text, markup, annotated - select for diffs
Tue Nov 7 12:41:52 2000 UTC (24 years, 3 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +7 -1 lines
add void *p_emuldata into struct proc - this can be used to hold per-process
	emulation-specific data
add process exit, exec and fork function hooks into struct emul:
* e_proc_fork() - called in fork1() after the new forked process is setup
* e_proc_exec() - called in sys_execve() after the executed process is setup
* e_proc_exit() - called in exit1() after all the other process cleanups are
  done, right before machine-dependant switch to new context; also called
  for "old" emulation from sys_execve() if emulation of executed program and
  the original process is different

This was discussed on tech-kern.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Tue Aug 22 17:28:28 2000 UTC (24 years, 5 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +6 -2 lines
Define the MI parts of the "big kernel lock" perimeter.  From
Bill Sommerfeld.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Sat Aug 12 22:41:55 2000 UTC (24 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +2 -2 lines
Don't bother with a trampoline to start the pagedaemon and
reaper threads.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Sat Aug 12 22:26:01 2000 UTC (24 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +3 -3 lines
In reaper(), use ltsleep() instead of simple_unlock()/tsleep().

Revision 1.82: download - view: text, markup, annotated - select for diffs
Tue Aug 1 04:57:30 2000 UTC (24 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +7 -18 lines
ANSI'ify.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Tue Jun 27 17:41:18 2000 UTC (24 years, 7 months ago) by mrg
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +1 -3 lines
remove include of <vm/vm.h>

Revision 1.80: download - view: text, markup, annotated - select for diffs
Mon Jun 26 14:21:14 2000 UTC (24 years, 7 months ago) by mrg
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +1 -2 lines
remove/move more mach vm header files:

	<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Sat May 27 00:11:12 2000 UTC (24 years, 8 months ago) by sommerfeld
Branches: MAIN
CVS tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +2 -2 lines
Remove a gratuitous use of curproc

Revision 1.78: download - view: text, markup, annotated - select for diffs
Mon May 8 19:58:17 2000 UTC (24 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +2 -2 lines
__predict_false() the test for init exiting.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Mon May 8 19:06:36 2000 UTC (24 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +2 -2 lines
Don't reset file size limit to infinity on exit.  Instead, temporarily
raise the limit to infinity when writing out the accounting file.

From Artur Grabowski <art@stacken.kth.se>.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Thu Mar 30 09:27:11 2000 UTC (24 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +11 -11 lines
Get rid of register declarations.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Thu Mar 23 06:30:11 2000 UTC (24 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +2 -2 lines
New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue Sep 28 14:47:03 1999 UTC (25 years, 4 months ago) by bouyer
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase
Branch point for: thorpej_scsipi
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +2 -3 lines
Remplace kern.shortcorename sysctl with a more flexible sheme,
core filename format, which allow to change the name of the core dump,
and to relocate it in a directory. Credits to Bill Sommerfeld for giving me
the idea :)
The default core filename format can be changed by options DEFCORENAME and/or
kern.defcorename
Create a new sysctl tree, proc, which holds per-process values (for now
the corename format, and resources limits). Process is designed by its pid
at the second level name. These values are inherited on fork, and the corename
fomat is reset to defcorename on suid/sgid exec.
Create a p_sugid() function, to take appropriate actions on suid/sgid
exec (for now set the P_SUGID flag and reset the per-proc corename).
Adjust dosetrlimit() to allow changing limits of one proc by another, with
credential controls.

Revision 1.65.4.2: download - view: text, markup, annotated - select for diffs
Mon Aug 2 22:19:12 1999 UTC (25 years, 6 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.65.4.1: preferred, colored; branchpoint 1.65: preferred, colored; next MAIN 1.66: preferred, colored
Changes since revision 1.65.4.1: +54 -23 lines
Update from trunk.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Thu Jul 22 21:08:31 1999 UTC (25 years, 6 months ago) by thorpej
Branches: MAIN
CVS tags: chs-ubc2-base
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +8 -2 lines
Add a read/write lock to the proclists and PID hash table.  Use the
write lock when doing PID allocation, and during the process exit path.
Use a read lock every where else, including within schedcpu() (interrupt
context).  Note that holding the write lock implies blocking schedcpu()
from running (blocks softclock).

PID allocation is now MP-safe.

Note this actually fixes a bug on single processor systems that was probably
extremely difficult to tickle; it was possible that schedcpu() would run
off a bad pointer if the right clock interrupt happened to come in the
middle of a LIST_INSERT_HEAD() or LIST_REMOVE() to/from allproc.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Thu Jul 22 18:13:37 1999 UTC (25 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +31 -12 lines
Rework the process exit path, in preparation for making process exit
and PID allocation MP-safe.  A new process state is added: SDEAD.  This
state indicates that a process is dead, but not yet a zombie (has not
yet been processed by the process reaper).

SDEAD processes exist on both the zombproc list (via p_list) and deadproc
(via p_hash; the proc has been removed from the pidhash earlier in the exit
path).  When the reaper deals with a process, it changes the state to
SZOMB, so that wait4 can process it.

Add a P_ZOMBIE() macro, which treats a proc in SZOMB or SDEAD as a zombie,
and update various parts of the kernel to reflect the new state.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Tue Jul 20 21:54:05 1999 UTC (25 years, 7 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +9 -7 lines
Move the call of cpu_wait() out of the wait4() functions, and into the
body of reaper(), right before the call to uvm_exit().  cpu_wait() must
be done before uvm_exit() because the resources it frees might be located
in the PCB.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Thu Jul 15 23:18:43 1999 UTC (25 years, 7 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +9 -5 lines
A few things to make the Linux clone(2) emulation work a bit better:
- When the exit signal is specified to be 0, don't just assume they
  meant SIGCHLD.  In the Linux world, this appears to mean "don't deliver
  an exit signal at all".
- Simplify P_EXITSIG(); don't check against initproc here, just change
  the exit signal to SIGCHLD if reparenting to initproc.

A very simple clone(2) test program now works, and the MpegTV package
starts, but doesn't run properly yet (I believe there is a separate
bug which keeps it from working properly).

Revision 1.65.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 21 01:24:01 1999 UTC (25 years, 7 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +22 -7 lines
Sync w/ -current.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Thu May 13 17:28:30 1999 UTC (25 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +3 -3 lines
Fix a (currently) harmless brian-o in last.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Thu May 13 00:59:04 1999 UTC (25 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +16 -7 lines
Allow an alternate exit signal (i.e. not SIGCHLD) to be delivered to the
parent, specified at fork time.  Specify a new flag to wait4(2), WALTSIG,
to wait for processes which use an alternate exit signal.

This is required for clone(2).

Revision 1.67: download - view: text, markup, annotated - select for diffs
Fri Apr 30 21:23:49 1999 UTC (25 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +6 -1 lines
Pull signal actions out of struct user, make them a separate proc
substructure, and allow them to be shared.

Required for clone(2).

Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri Apr 30 20:54:04 1999 UTC (25 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +2 -1 lines
Oops, forgot to commit this one.  Free the cwdinfo on exit.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Wed Mar 24 05:51:22 1999 UTC (25 years, 10 months ago) by mrg
Branches: MAIN
CVS tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +1 -14 lines
completely remove Mach VM support.  all that is left is the all the
header files as UVM still uses (most of) these.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Tue Feb 23 02:57:18 1999 UTC (25 years, 11 months ago) by ross
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -6 lines
Replace the recent scheduler mods with calls to scheduler_{fork,wait}_hook(),
(inlined) so scheduler functionality can be kept in a single .h/.c set.
Also, the wait hook has changed the way it clips the scheduler history.

Revision 1.45.8.1: download - view: text, markup, annotated - select for diffs
Thu Feb 4 06:23:08 1999 UTC (26 years ago) by cgd
Branches: netbsd-1-3
Diff to: previous 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45: +6 -1 lines
pull up revs 1.62-1.63 from trunk (bad)

Revision 1.63: download - view: text, markup, annotated - select for diffs
Sat Jan 23 22:23:19 1999 UTC (26 years ago) by sommerfe
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +6 -7 lines
Tweak to earlier fix to p_estcpu:
	- no longer conditionalized
	- when traced, charge time to real parent, not debugger
	- make it clear for future rototillers that p_estcpu should be moved
	  to the "copy" region of struct proc.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sat Jan 23 08:25:36 1999 UTC (26 years ago) by ross
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +7 -1 lines
Fix the recently infamous "sucky performance" problem by charging wait(2)'ing
parents for children's p_estcpu. I think this problem has always been there.
It's particularly noticable with X because the server builds up non-trivial
CPU, and hence, non-trivial p_estcpu scheduler penalty. The repeatedly
forked children were always starting from scratch and receiving a scheduler
preference.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Wed Nov 11 22:37:13 1998 UTC (26 years, 3 months ago) by thorpej
Branches: MAIN
CVS tags: kenh-if-detach-base, kenh-if-detach
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +1 -7 lines
Remove some code accidentally readded when Christos implement P_NOCLDWAIT.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Mon Oct 19 22:19:26 1998 UTC (26 years, 4 months ago) by tron
Branches: MAIN
CVS tags: chs-ubc-base, chs-ubc
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +2 -1 lines
Defopt SYSVMSG, SYSVSEM and SYSVSHM.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Fri Sep 18 18:48:22 1998 UTC (26 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +24 -1 lines
Add NOCLDWAIT (from FreeBSD)

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat Sep 12 17:20:02 1998 UTC (26 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +7 -7 lines
Make copyrights consistent; fix weird/trailing spaces add missing (c) etc.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Fri Sep 11 12:50:10 1998 UTC (26 years, 5 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +4 -3 lines
Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
  versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
  sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
  sys_sigpending() and sys_sigsuspend() into separate functions, and call them
  from all the emulations rather than hard-coding everything.  (Avoids uses
  the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
  pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
  bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
  in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified.  Other ports and
emulations need to be updated.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Tue Sep 8 23:57:58 1998 UTC (26 years, 5 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +108 -17 lines
Implement a new kernel thread, the "reaper", which performs the task
of freeing the VM resources once a process has exited.  A valid thread
must do this work, as doing so may block in a multi-processor environment.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Tue Sep 1 01:02:33 1998 UTC (26 years, 5 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +3 -4 lines
Use the pool allocator and the "nointr" pool page allocator for rusage
structures.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Mon Aug 31 23:20:16 1998 UTC (26 years, 5 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +3 -3 lines
Use the pool allocator and "nointr" pool page allocator for pcred and
plimit structures.

Revision 1.51.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 8 03:06:54 1998 UTC (26 years, 6 months ago) by eeh
Branches: eeh-paddr_t
Diff to: previous 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51: +2 -2 lines
Revert cdevsw mmap routines to return int.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sun Aug 2 04:41:32 1998 UTC (26 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +3 -2 lines
Use a pool for proc structures.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Jul 31 22:50:49 1998 UTC (26 years, 6 months ago) by perry
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -2 lines
fix sizeofs so they comply with the KNF style guide. yes, it is pedantic.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Thu Jun 25 21:17:16 1998 UTC (26 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -1 lines
defopt KTRACE

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat May 2 18:33:20 1998 UTC (26 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -4 lines
New fktrace syscall from Darren Reed [with fixes from me]

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:22:28 1998 UTC (26 years, 11 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +3 -3 lines
Merge with Lite2 + local changes

Revision 1.1.1.3 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:12:56 1998 UTC (26 years, 11 months ago) by fvdl
Branches: WFJ-920714, CSRG
CVS tags: lite-2
Diff to: previous 1.1.1.2: preferred, colored
Changes since revision 1.1.1.2: +17 -56 lines
Import 4.4BSD-Lite2

Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:09:39 1998 UTC (26 years, 11 months ago) by fvdl
Branches: WFJ-920714, CSRG
CVS tags: lite-1, date-03-may-96
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +492 -1 lines
Import 4.4BSD-Lite for reference

Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Feb 10 14:09:28 1998 UTC (27 years ago) by mrg
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +3 -1 lines
- add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Feb 5 07:59:49 1998 UTC (27 years ago) by mrg
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +11 -1 lines
initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sat Jan 3 02:48:43 1998 UTC (27 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +3 -3 lines
Don't call shmexit() if the vmspace ref count is not 1.  Update for new
argument to shmexit().

Revision 1.45.6.1: download - view: text, markup, annotated - select for diffs
Mon Sep 8 23:10:33 1997 UTC (27 years, 5 months ago) by thorpej
Branches: thorpej-signal
Diff to: previous 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45: +9 -2 lines
Significantly restructure the way signal state for a process is stored.
Rather than using bitmasks to redundantly store the information kept
in the process's sigacts (because the sigacts was kept in the u-area),
hang sigacts directly off the process, and access it directly.

Simplify signal setup code tremendously by storing information in
the sigacts as an array of struct sigactions, rather than in a different
format, since userspace uses sigactions.

Make sigacts sharable by adding reference counting.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Mon Apr 28 13:17:05 1997 UTC (27 years, 9 months ago) by mycroft
Branches: MAIN
CVS tags: thorpej-signal-base, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, bouyer-scsipi
Branch point for: thorpej-signal, netbsd-1-3
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +15 -9 lines
Delay turning off P_TRACED until the process is actually waited on.  It can't
have any signals delivered while exiting, so this should be okay.  Change the
test for a traced process in wait4() to exclude a process that was started by
the debugger; in this case, only one SIGCHLD should be delivered.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Apr 28 04:49:27 1997 UTC (27 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +3 -2 lines
Reinstate P_FSTRACE, with different semantics:
* Never send a SIGCHLD to the parent if P_FSTRACE is set.
* Do not permit mixing ptrace(2) and procfs; only permit using the one that
  was attached.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon Apr 28 02:51:41 1997 UTC (27 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +1 -6 lines
Remove remnants of P_FSTRACE, which is no longer used.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Apr 23 18:59:53 1997 UTC (27 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +1 -5 lines
Nuke the old COMPAT_09 truncation of UIDs, GIDs, process and process group IDs.

Revision 1.41.4.2: download - view: text, markup, annotated - select for diffs
Fri Feb 7 05:33:10 1997 UTC (28 years ago) by mikel
Branches: is-newarp
Diff to: previous 1.41.4.1: preferred, colored; branchpoint 1.41: preferred, colored; next MAIN 1.42: preferred, colored
Changes since revision 1.41.4.1: +419 -0 lines
check options argument to wait{3,4,pid}(); from Klaus Klein in PR 3182.

Revision 1.41.4.1
Fri Feb 7 05:33:09 1997 UTC (28 years ago) by mikel
Branches: is-newarp
FILE REMOVED
Changes since revision 1.41: +0 -419 lines
file kern_exit.c was added on branch is-newarp on 1997-02-07 05:33:10 +0000

Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Feb 7 05:33:09 1997 UTC (28 years ago) by mikel
Branches: MAIN
CVS tags: mrg-vm-swap, is-newarp-before-merge, is-newarp-base
Branch point for: is-newarp
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -3 lines
check options argument to wait{3,4,pid}(); from Klaus Klein in PR 3182.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Thu Oct 17 16:31:54 1996 UTC (28 years, 4 months ago) by perry
Branches: MAIN
CVS tags: thorpej-setroot
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -5 lines
removed #ifdef tahoe

Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Apr 22 01:38:25 1996 UTC (28 years, 9 months ago) by christos
Branches: MAIN
CVS tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +1 -2 lines
remove include of <sys/cpu.h>

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Feb 9 18:59:29 1996 UTC (29 years ago) by christos
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +8 -3 lines
More proto fixes

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Feb 9 01:19:21 1996 UTC (29 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +9 -5 lines
If parent is in ppwait, wake it up early to prevent deadlock.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sun Feb 4 02:15:25 1996 UTC (29 years ago) by christos
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +11 -8 lines
First pass at prototyping

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Dec 24 11:23:33 1995 UTC (29 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +9 -9 lines
Remove the process from zombproc and its parent's child list before freeing
its resources.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sat Dec 9 04:09:32 1995 UTC (29 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -3 lines
Add a limfree(), and use it.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sat Oct 7 06:28:13 1995 UTC (29 years, 4 months ago) by mycroft
Branches: MAIN
CVS tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +5 -5 lines
Prefix names of system call implementation functions with `sys_'.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Sep 27 20:26:51 1995 UTC (29 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -2 lines
Fix typo in declaration of exit(), pointed out by Chris Demetriou.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Tue Sep 19 21:44:59 1995 UTC (29 years, 5 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +16 -13 lines
Make system calls conform to a standard prototype and bring those
prototypes into scope.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sat Jun 24 20:33:59 1995 UTC (29 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +4 -76 lines
Extracted all of the compat_xxx routines, and created a library [libcompat]
for them. There are a few #ifdef COMPAT_XX remaining, but they are not easy
or worth eliminating (yet).

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Dec 24 15:07:26 1994 UTC (30 years, 1 month ago) by cgd
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +4 -2 lines
various cleanups for -Wall.  some inspired by James Jegers.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Oct 30 21:47:39 1994 UTC (30 years, 3 months ago) by cgd
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -3 lines
be more careful with types, also pull in headers where necessary.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Oct 20 22:54:35 1994 UTC (30 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -4 lines
Minor change; use proc_reparent().

Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Oct 20 04:22:45 1994 UTC (30 years, 4 months ago) by cgd
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +64 -50 lines
update for new syscall args description mechanism

Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue Aug 30 03:05:33 1994 UTC (30 years, 5 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +15 -54 lines
Convert process, file, and namei lists and hash tables to use queue.h.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Wed Jun 29 06:32:26 1994 UTC (30 years, 7 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +507 -1 lines
New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu May 19 05:57:44 1994 UTC (30 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +1 -1 lines
update to lite

Revision 1.22: download - view: text, markup, annotated - select for diffs
Tue May 17 08:03:05 1994 UTC (30 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +1 -1 lines
forgot a cast, and killed phil!

Revision 1.21: download - view: text, markup, annotated - select for diffs
Fri May 13 09:29:06 1994 UTC (30 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +1 -1 lines
SHUT UP!

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu May 5 22:28:44 1994 UTC (30 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +1 -1 lines
a conditional p_regs!

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu May 5 08:46:53 1994 UTC (30 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +1 -1 lines
Remove now-bogus cast.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Thu May 5 05:38:07 1994 UTC (30 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +1 -1 lines
lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed May 4 03:41:52 1994 UTC (30 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +1 -1 lines
Rename a lot of process flags.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Apr 29 04:41:30 1994 UTC (30 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +1 -1 lines
kill syscall name aliases. no user-visible changes

Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Feb 11 03:09:17 1994 UTC (31 years ago) by cgd
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +1 -1 lines
Mike Karels' solution to Andrew Herbert <andrew@werple.apana.org.au>'s
kern_exit race condition problem.  this is a hack:
	don't vrele() or vgoneall() if we don't have the vnode
	any more.  no vgoneall() is necessary, because if the refcnt
	is zero, there's nobody to take it away from!
a possible "real" long term solution would be to change the extra ref
into a bit in the vnode's flags, and DTRT in the places where the last
ref is killed.  That has some problems, too.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Jan 20 21:22:47 1994 UTC (31 years, 1 month ago) by ws
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +1 -1 lines
Make procfs really work for debugging.
Implement not & notepg files in procfs.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Jan 4 11:30:26 1994 UTC (31 years, 1 month ago) by cgd
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +1 -1 lines
field name change

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Dec 22 13:42:27 1993 UTC (31 years, 1 month ago) by cgd
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +1 -1 lines
various bug fixes from BSDI, via jsp.  Kill some iffy fixes
by wfj (and replace them with better ones from BSDI).  add support
for p_vnode, and add proc_reparent() function, from jsp.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Dec 18 04:20:31 1993 UTC (31 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +1 -1 lines
Canonicalize all #includes.

Revision 1.7.4.6: download - view: text, markup, annotated - select for diffs
Sun Nov 14 20:31:44 1993 UTC (31 years, 3 months ago) by mycroft
Branches: magnum
Diff to: previous 1.7.4.5: preferred, colored; branchpoint 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7.4.5: +1 -1 lines
Canonicalize all #includes.

Revision 1.7.4.5: download - view: text, markup, annotated - select for diffs
Sun Nov 14 14:47:05 1993 UTC (31 years, 3 months ago) by cgd
Branches: magnum
Diff to: previous 1.7.4.4: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.4.4: +1 -1 lines
Update from trunk:
Add the System V message queue and semaphore facilities.  Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Nov 14 13:22:55 1993 UTC (31 years, 3 months ago) by cgd
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +1 -1 lines
Add the System V message queue and semaphore facilities.  Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>

Revision 1.7.4.4: download - view: text, markup, annotated - select for diffs
Tue Oct 26 13:02:55 1993 UTC (31 years, 3 months ago) by mycroft
Branches: magnum
Diff to: previous 1.7.4.3: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.4.3: +1 -1 lines
Merge changes from trunk.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Oct 20 23:04:33 1993 UTC (31 years, 4 months ago) by cgd
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -1 lines
ACCOUNTING define doesn't exist any more...

Revision 1.7.4.3: download - view: text, markup, annotated - select for diffs
Thu Sep 30 17:03:59 1993 UTC (31 years, 4 months ago) by deraadt
Branches: magnum
Diff to: previous 1.7.4.2: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.4.2: +1 -1 lines
calcru() calculates times from ticks.

Revision 1.7.4.2: download - view: text, markup, annotated - select for diffs
Fri Sep 24 08:51:00 1993 UTC (31 years, 4 months ago) by mycroft
Branches: magnum
Diff to: previous 1.7.4.1: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.4.1: +1 -1 lines
Make all files using spl*() #include cpu.h.  Changes from trunk.
init_main.c: New method of pseudo-device of initialization.
kern_clock.c: hardclock() and softclock() now take a pointer to a clockframe.
softclock() only does callouts.
kern_synch.c: Remove spurious declaration of endtsleep().  Adjust uses of
averunnable for new struct loadav.
subr_prf.c: Allow printf() formats in panic().
tty.c: averunnable changes.
vfs_subr.c: va_size and va_bytes are now quads.

Revision 1.7.4.1: download - view: text, markup, annotated - select for diffs
Tue Sep 14 18:24:13 1993 UTC (31 years, 5 months ago) by mycroft
Branches: magnum
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -1 lines
init_main.c:  clock changes from 4.4; initclocks() is called after vfsinit().
No startrtclock() or enablertclock().  Some pseudo-device cruft, but this needs
to be updated.
kern_clock.c:  from 4.4: gatherstats() --> statclock().  statclock(),
hardclock(), and softclock() take a `struct clockframe *'.  New initclocks(),
harclock(), statclock(), startprofclock(), and stopprofclock().
kern_synch.c:  from 4.4: machine-independent swtch(), which is now where
process time is integrated.  Calls cpu_swtch() with the current process as an
arg.
subr_autoconf.c:  Fix typo.
subr_prf.c:  msgbufp and msgbufmapped are define in machdep.c
tty.c:  Make TIOCHPCL #ifdef COMPAT_43.
Incorporate changes from main branch.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu Sep 9 22:03:59 1993 UTC (31 years, 5 months ago) by phil
Branches: MAIN
CVS tags: magnum-base
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -1 lines
These changes are due to a mismatch with user functions prototyped as
func(short) and the fact the the kernel uses full ints.  This caused
problems on the pc532 port.  These fixes take the good 16 bits passed
by the user program and converts them into the correct form for the
kernel.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Tue Jul 13 22:13:20 1993 UTC (31 years, 7 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Branch point for: magnum
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +1 -1 lines
break args structs out, into syscallname_args structs, so gcc2 doesn't
whine so much.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Jul 4 23:30:35 1993 UTC (31 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +1 -1 lines
change exit() to kexit(), so prototypes are "safe" with stdio.h, etc.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Jun 27 06:01:34 1993 UTC (31 years, 7 months ago) by andrew
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +1 -1 lines
ANSIfications - removed all implicit function return types and argument
definitions.  Ensured that all files include "systm.h" to gain access to
general prototypes.  Casts where necessary.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat May 22 11:41:36 1993 UTC (31 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +1 -1 lines
add include of select.h if necessary for protos, or delete if extraneous

Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue May 18 18:19:15 1993 UTC (31 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -1 lines
make kernel select interface be one-stop shopping & clean it all up.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun May 2 09:23:15 1993 UTC (31 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -1 lines
add barebones accounting, enabled w/"options ACCOUNTING", via /dev/acct

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (31 years, 11 months ago) by cgd
Branches: WFJ-920714, CSRG
CVS tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8, WFJ-386bsd-01
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -1 lines
initial import of 386bsd-0.1 sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (31 years, 11 months ago) by cgd
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>