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


Default branch: MAIN


Revision 1.298 / (download) - annotate - [select for diffs], Sun Oct 8 12:38:58 2023 UTC (6 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.297: +6 -7 lines
Diff to previous 1.297 (colored)

Defer some wakeups till lock release.

Revision 1.297 / (download) - annotate - [select for diffs], Wed Oct 4 20:48:13 2023 UTC (6 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.296: +22 -17 lines
Diff to previous 1.296 (colored)

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) - annotate - [select for diffs], Wed Oct 4 20:42:38 2023 UTC (6 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.295: +3 -3 lines
Diff to previous 1.295 (colored)

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) - annotate - [select for diffs], Wed Oct 4 20:29:18 2023 UTC (6 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.294: +5 -4 lines
Diff to previous 1.294 (colored)

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

Revision 1.294 / (download) - annotate - [select for diffs], Wed Oct 4 20:28:06 2023 UTC (6 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.293: +2 -4 lines
Diff to previous 1.293 (colored)

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) - annotate - [select for diffs], Sun Dec 5 08:13:12 2021 UTC (2 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.292: +3 -3 lines
Diff to previous 1.292 (colored)

s/sytle/style/ in comment.

Revision 1.292 / (download) - annotate - [select for diffs], Sun Oct 10 18:07:51 2021 UTC (2 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.291: +24 -12 lines
Diff to previous 1.291 (colored)

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) - annotate - [select for diffs], Mon Dec 14 14:38:13 2020 UTC (3 years, 3 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.290: +3 -3 lines
Diff to previous 1.290 (colored) next main 1.291 (colored)

Sync w/ HEAD.

Revision 1.291 / (download) - annotate - [select for diffs], Sat Dec 5 18:17:01 2020 UTC (3 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.290: +3 -3 lines
Diff to previous 1.290 (colored)

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) - annotate - [select for diffs], Sat May 23 23:42:43 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.289: +20 -20 lines
Diff to previous 1.289 (colored)

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

Revision 1.287.2.2 / (download) - annotate - [select for diffs], Sat Apr 25 11:24:05 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.287.2.1: +4 -12 lines
Diff to previous 1.287.2.1 (colored) to branchpoint 1.287 (colored) next main 1.288 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

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

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

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

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

Nudged in this direction by ad@ and chs@.

Revision 1.271.2.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:42 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.271.2.3: +1 -0 lines
Diff to previous 1.271.2.3 (colored) to branchpoint 1.271 (colored) next main 1.272 (colored)

Sync with HEAD

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

Sync with HEAD

Revision 1.288 / (download) - annotate - [select for diffs], Sun Apr 19 20:31:59 2020 UTC (3 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base1
Changes since 1.287: +3 -2 lines
Diff to previous 1.287 (colored)

- 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) - annotate - [select for diffs], Mon Apr 13 08:05:03 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.271.2.2: +8 -1 lines
Diff to previous 1.271.2.2 (colored) to branchpoint 1.271 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.271.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:51 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.271.2.1: +34 -22 lines
Diff to previous 1.271.2.1 (colored) to branchpoint 1.271 (colored)

Merge changes from current as of 20200406

Revision 1.287 / (download) - annotate - [select for diffs], Sat Apr 4 20:20:12 2020 UTC (4 years ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.286: +13 -6 lines
Diff to previous 1.286 (colored)

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

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

Revision 1.286 / (download) - annotate - [select for diffs], Thu Mar 26 21:31:55 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.285: +5 -3 lines
Diff to previous 1.285 (colored)

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) - annotate - [select for diffs], Sun Mar 8 15:05:18 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.284: +6 -6 lines
Diff to previous 1.284 (colored)

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) - annotate - [select for diffs], Sat Feb 29 20:21:02 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.278.2.2: +15 -6 lines
Diff to previous 1.278.2.2 (colored) to branchpoint 1.278 (colored) next main 1.279 (colored)

Sync with head.

Revision 1.284 / (download) - annotate - [select for diffs], Sat Feb 22 21:07:46 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.283: +7 -7 lines
Diff to previous 1.283 (colored)

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) - annotate - [select for diffs], Sat Feb 15 18:12:15 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.282: +3 -6 lines
Diff to previous 1.282 (colored)

- 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) - annotate - [select for diffs], Wed Jan 29 15:47:52 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.281: +9 -2 lines
Diff to previous 1.281 (colored)

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

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

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

- Add some comments.

Revision 1.281 / (download) - annotate - [select for diffs], Mon Jan 27 21:09:33 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.280: +7 -2 lines
Diff to previous 1.280 (colored)

- 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) - annotate - [select for diffs], Sat Jan 25 22:38:50 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.278.2.1: +3 -2 lines
Diff to previous 1.278.2.1 (colored) to branchpoint 1.278 (colored)

Sync with head.

Revision 1.280 / (download) - annotate - [select for diffs], Wed Jan 22 12:23:04 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2
Changes since 1.279: +3 -2 lines
Diff to previous 1.279 (colored)

Catch a leaked hold of kernel_lock sooner with DIAGNOSTIC and make the
message a bit more informative.

Revision 1.278.2.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:35 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.278: +11 -19 lines
Diff to previous 1.278 (colored)

Sync with head.

Revision 1.279 / (download) - annotate - [select for diffs], Wed Jan 8 17:38:42 2020 UTC (4 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base1
Changes since 1.278: +11 -19 lines
Diff to previous 1.278 (colored)

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) - annotate - [select for diffs], Fri Dec 6 21:36:10 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.277: +3 -2 lines
Diff to previous 1.277 (colored)

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) - annotate - [select for diffs], Tue Oct 15 19:01:06 2019 UTC (4 years, 5 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.276: +3 -2 lines
Diff to previous 1.276 (colored) next main 1.277 (colored)

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) - annotate - [select for diffs], Thu Oct 3 22:48:44 2019 UTC (4 years, 6 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.276: +3 -2 lines
Diff to previous 1.276 (colored)

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) - annotate - [select for diffs], Thu Jun 13 20:20:18 2019 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
CVS Tags: netbsd-9-base
Branch point for: netbsd-9
Changes since 1.275: +9 -3 lines
Diff to previous 1.275 (colored)

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) - annotate - [select for diffs], Mon Jun 10 22:09:03 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.271: +8 -17 lines
Diff to previous 1.271 (colored)

Sync with HEAD

Revision 1.275 / (download) - annotate - [select for diffs], Fri May 17 03:34:26 2019 UTC (4 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.274: +3 -2 lines
Diff to previous 1.274 (colored)

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) - annotate - [select for diffs], Fri Mar 1 09:02:03 2019 UTC (5 years, 1 month ago) by hannken
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.273: +6 -2 lines
Diff to previous 1.273 (colored)

Move pointer to fstrans private data into "struct lwp".

Ride NetBSD 8.99.35

Revision 1.270.2.3 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:03 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.270.2.2: +3 -2 lines
Diff to previous 1.270.2.2 (colored) to branchpoint 1.270 (colored) next main 1.271 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.268.8.2 / (download) - annotate - [select for diffs], Fri Nov 30 10:32:22 2018 UTC (5 years, 4 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.268.8.1: +3 -2 lines
Diff to previous 1.268.8.1 (colored) to branchpoint 1.268 (colored) next main 1.269 (colored)

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) - annotate - [select for diffs], Thu Nov 29 12:37:22 2018 UTC (5 years, 4 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.272: +3 -2 lines
Diff to previous 1.272 (colored)

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) - annotate - [select for diffs], Sat Jul 28 04:38:08 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.270.2.1: +2 -17 lines
Diff to previous 1.270.2.1 (colored) to branchpoint 1.270 (colored)

Sync with HEAD

Revision 1.272 / (download) - annotate - [select for diffs], Thu Jul 12 10:46:48 2018 UTC (5 years, 9 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.271: +2 -17 lines
Diff to previous 1.271 (colored)

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) - annotate - [select for diffs], Mon May 21 04:36:15 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.270: +3 -2 lines
Diff to previous 1.270 (colored)

Sync with HEAD

Revision 1.271 / (download) - annotate - [select for diffs], Mon May 7 21:03:45 2018 UTC (5 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625, pgoyette-compat-0521
Branch point for: phil-wifi
Changes since 1.270: +3 -2 lines
Diff to previous 1.270 (colored)

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) - annotate - [select for diffs], Thu Apr 12 13:42:48 2018 UTC (6 years ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.268: +5 -6 lines
Diff to previous 1.268 (colored)

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) - annotate - [select for diffs], Sun Dec 3 11:38:44 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.241.2.3: +423 -78 lines
Diff to previous 1.241.2.3 (colored) next main 1.242 (colored)

update from HEAD

Revision 1.270 / (download) - annotate - [select for diffs], Tue Nov 7 19:44:04 2017 UTC (6 years, 5 months ago) by christos
Branch: 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
Changes since 1.269: +3 -2 lines
Diff to previous 1.269 (colored)

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) - annotate - [select for diffs], Mon Aug 28 00:46:07 2017 UTC (6 years, 7 months ago) by kamil
Branch: MAIN
Changes since 1.268: +5 -6 lines
Diff to previous 1.268 (colored)

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) - annotate - [select for diffs], Mon Mar 20 06:57:47 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.258.2.2: +2 -14 lines
Diff to previous 1.258.2.2 (colored) to branchpoint 1.258 (colored) next main 1.259 (colored)

Sync with HEAD

Revision 1.244.4.6 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:56 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.244.4.5: +2 -14 lines
Diff to previous 1.244.4.5 (colored) to branchpoint 1.244 (colored) next main 1.245 (colored)

Sync with HEAD

Revision 1.268 / (download) - annotate - [select for diffs], Mon Jan 9 00:31:30 2017 UTC (7 years, 3 months ago) by kamil
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, 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
Changes since 1.267: +2 -14 lines
Diff to previous 1.267 (colored)

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) - annotate - [select for diffs], Sat Jan 7 08:56:49 2017 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.258.2.1: +111 -9 lines
Diff to previous 1.258.2.1 (colored) to branchpoint 1.258 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.244.4.5 / (download) - annotate - [select for diffs], Mon Dec 5 10:55:26 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.244.4.4: +114 -12 lines
Diff to previous 1.244.4.4 (colored) to branchpoint 1.244 (colored)

Sync with HEAD

Revision 1.267 / (download) - annotate - [select for diffs], Sun Nov 13 15:25:01 2016 UTC (7 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, nick-nhusb-base-20161204
Changes since 1.266: +5 -4 lines
Diff to previous 1.266 (colored)

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) - annotate - [select for diffs], Thu Nov 10 17:07:14 2016 UTC (7 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.265: +4 -6 lines
Diff to previous 1.265 (colored)

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) - annotate - [select for diffs], Wed Nov 9 00:30:17 2016 UTC (7 years, 5 months ago) by kre
Branch: MAIN
Changes since 1.264: +79 -7 lines
Diff to previous 1.264 (colored)


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) - annotate - [select for diffs], Sat Nov 5 02:59:22 2016 UTC (7 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.263: +6 -6 lines
Diff to previous 1.263 (colored)

Return 0 if WNOHANG and no kids.

Revision 1.263 / (download) - annotate - [select for diffs], Fri Nov 4 18:14:04 2016 UTC (7 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.262: +29 -2 lines
Diff to previous 1.262 (colored)

deduplicate the complex lock reparent dance.

Revision 1.262 / (download) - annotate - [select for diffs], Fri Nov 4 18:12:06 2016 UTC (7 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.261: +6 -2 lines
Diff to previous 1.261 (colored)

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) - annotate - [select for diffs], Fri Nov 4 14:49:17 2016 UTC (7 years, 5 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.258: +10 -10 lines
Diff to previous 1.258 (colored)

Sync with HEAD

Revision 1.261 / (download) - annotate - [select for diffs], Thu Nov 3 20:58:25 2016 UTC (7 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104
Changes since 1.260: +5 -5 lines
Diff to previous 1.260 (colored)

Fix wrong WIFCONTINUED() status.

Revision 1.244.4.4 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:02 2016 UTC (7 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.244.4.3: +7 -7 lines
Diff to previous 1.244.4.3 (colored) to branchpoint 1.244 (colored)

Sync with HEAD

Revision 1.260 / (download) - annotate - [select for diffs], Fri Sep 23 14:16:44 2016 UTC (7 years, 6 months ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20161004
Changes since 1.259: +6 -6 lines
Diff to previous 1.259 (colored)

Trailing whitespace

Revision 1.259 / (download) - annotate - [select for diffs], Fri Sep 23 14:09:39 2016 UTC (7 years, 6 months ago) by skrll
Branch: MAIN
Changes since 1.258: +3 -3 lines
Diff to previous 1.258 (colored)

Add netbsd32_clock_getcpuclockid2 and netbsd32_wait6 functions

Revision 1.244.4.3 / (download) - annotate - [select for diffs], Sun May 29 08:44:37 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.244.4.2: +17 -3 lines
Diff to previous 1.244.4.2 (colored) to branchpoint 1.244 (colored)

Sync with HEAD

Revision 1.258 / (download) - annotate - [select for diffs], Wed Apr 27 21:15:40 2016 UTC (7 years, 11 months ago) by christos
Branch: 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
Changes since 1.257: +5 -3 lines
Diff to previous 1.257 (colored)

We need a flag for WCONTINUED so that we can reset it... Fixes bash issue.

Revision 1.257 / (download) - annotate - [select for diffs], Mon Apr 25 16:35:47 2016 UTC (7 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.256: +14 -2 lines
Diff to previous 1.256 (colored)

set the return value to the pid if we found one (from kre@)

Revision 1.244.4.2 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:16 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.244.4.1: +287 -53 lines
Diff to previous 1.244.4.1 (colored) to branchpoint 1.244 (colored)

Sync with HEAD

Revision 1.256 / (download) - annotate - [select for diffs], Wed Apr 6 03:51:26 2016 UTC (8 years ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422
Changes since 1.255: +4 -4 lines
Diff to previous 1.255 (colored)

Implement WIFCONTINUED using the linux value instead of the FreeBSD one...

Revision 1.255 / (download) - annotate - [select for diffs], Tue Apr 5 14:07:31 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.254: +8 -9 lines
Diff to previous 1.254 (colored)

Simplify even more to make it clear how the status is set.

Revision 1.254 / (download) - annotate - [select for diffs], Tue Apr 5 13:01:46 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.253: +3 -3 lines
Diff to previous 1.253 (colored)

Set the exit status code properly.

Revision 1.253 / (download) - annotate - [select for diffs], Mon Apr 4 23:07:06 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.252: +4 -6 lines
Diff to previous 1.252 (colored)

no need to pass the coredump flag to exit1() since it is set and known
in one place.

Revision 1.252 / (download) - annotate - [select for diffs], Mon Apr 4 20:47:57 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.251: +31 -23 lines
Diff to previous 1.251 (colored)

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) - annotate - [select for diffs], Sun Apr 3 23:50:49 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.250: +19 -4 lines
Diff to previous 1.250 (colored)

restore the early breaks for the exact process match.

Revision 1.250 / (download) - annotate - [select for diffs], Sun Apr 3 02:28:46 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.249: +26 -16 lines
Diff to previous 1.249 (colored)

implement WCONTINUED, untested
fill out more siginfo fields.
use geteuid instead of getuid

Revision 1.249 / (download) - annotate - [select for diffs], Sat Apr 2 20:38:40 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.248: +242 -38 lines
Diff to previous 1.248 (colored)

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) - annotate - [select for diffs], Sun Dec 27 12:10:05 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.244: +16 -9 lines
Diff to previous 1.244 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.236.2.2.4.2 / (download) - annotate - [select for diffs], Sun Nov 15 20:44:13 2015 UTC (8 years, 5 months ago) by bouyer
Branch: netbsd-6-1
Changes since 1.236.2.2.4.1: +3 -3 lines
Diff to previous 1.236.2.2.4.1 (colored) to branchpoint 1.236.2.2 (colored) next main 1.236.2.3 (colored)

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) - annotate - [select for diffs], Sun Nov 15 20:44:10 2015 UTC (8 years, 5 months ago) by bouyer
Branch: netbsd-6
Changes since 1.236.2.4: +3 -3 lines
Diff to previous 1.236.2.4 (colored) to branchpoint 1.236 (colored) next main 1.237 (colored)

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) - annotate - [select for diffs], Sun Nov 15 20:44:10 2015 UTC (8 years, 5 months ago) by bouyer
Branch: netbsd-6-0
Changes since 1.236.2.2.2.1: +3 -3 lines
Diff to previous 1.236.2.2.2.1 (colored) to branchpoint 1.236.2.2 (colored) next main 1.236.2.3 (colored)

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) - annotate - [select for diffs], Sun Nov 15 20:38:18 2015 UTC (8 years, 5 months ago) by bouyer
Branch: netbsd-6-1
Changes since 1.236.2.2: +11 -4 lines
Diff to previous 1.236.2.2 (colored)

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) - annotate - [select for diffs], Sun Nov 15 20:38:01 2015 UTC (8 years, 5 months ago) by bouyer
Branch: netbsd-6-0
Changes since 1.236.2.2: +11 -4 lines
Diff to previous 1.236.2.2 (colored)

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) - annotate - [select for diffs], Sun Nov 15 20:37:04 2015 UTC (8 years, 5 months ago) by bouyer
Branch: netbsd-6
Changes since 1.236.2.3: +11 -4 lines
Diff to previous 1.236.2.3 (colored) to branchpoint 1.236 (colored)

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) - annotate - [select for diffs], Sat Nov 7 20:50:07 2015 UTC (8 years, 5 months ago) by snj
Branch: netbsd-5
Changes since 1.214.4.3: +3 -3 lines
Diff to previous 1.214.4.3 (colored) to branchpoint 1.214 (colored) next main 1.215 (colored)

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) - annotate - [select for diffs], Sat Nov 7 20:49:19 2015 UTC (8 years, 5 months ago) by snj
Branch: netbsd-5-1
Changes since 1.214.4.2.2.1: +3 -3 lines
Diff to previous 1.214.4.2.2.1 (colored) to branchpoint 1.214.4.2 (colored) next main 1.214.4.3 (colored)

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) - annotate - [select for diffs], Sat Nov 7 20:48:58 2015 UTC (8 years, 5 months ago) by snj
Branch: netbsd-5-2
Changes since 1.214.4.2.6.1: +3 -3 lines
Diff to previous 1.214.4.2.6.1 (colored) to branchpoint 1.214.4.2 (colored) next main 1.214.4.3 (colored)

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) - annotate - [select for diffs], Sat Nov 7 20:43:23 2015 UTC (8 years, 5 months ago) by snj
Branch: netbsd-5
Changes since 1.214.4.2: +11 -4 lines
Diff to previous 1.214.4.2 (colored) to branchpoint 1.214 (colored)

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) - annotate - [select for diffs], Sat Nov 7 20:42:59 2015 UTC (8 years, 5 months ago) by snj
Branch: netbsd-5-1
Changes since 1.214.4.2: +11 -4 lines
Diff to previous 1.214.4.2 (colored)

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) - annotate - [select for diffs], Sat Nov 7 20:42:25 2015 UTC (8 years, 5 months ago) by snj
Branch: netbsd-5-2
Changes since 1.214.4.2: +11 -4 lines
Diff to previous 1.214.4.2 (colored)

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) - annotate - [select for diffs], Thu Nov 5 09:30:20 2015 UTC (8 years, 5 months ago) by snj
Branch: netbsd-7-0
CVS Tags: netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Changes since 1.244.6.1: +3 -3 lines
Diff to previous 1.244.6.1 (colored) to branchpoint 1.244 (colored) next main 1.245 (colored)

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) - annotate - [select for diffs], Thu Nov 5 09:30:10 2015 UTC (8 years, 5 months ago) by snj
Branch: 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
Changes since 1.244.2.1: +3 -3 lines
Diff to previous 1.244.2.1 (colored) to branchpoint 1.244 (colored) next main 1.245 (colored)

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) - annotate - [select for diffs], Thu Nov 5 09:05:18 2015 UTC (8 years, 5 months ago) by snj
Branch: netbsd-7-0
Changes since 1.244: +11 -4 lines
Diff to previous 1.244 (colored)

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) - annotate - [select for diffs], Thu Nov 5 09:04:55 2015 UTC (8 years, 5 months ago) by snj
Branch: netbsd-7
Changes since 1.244: +11 -4 lines
Diff to previous 1.244 (colored)

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) - annotate - [select for diffs], Tue Oct 13 06:47:21 2015 UTC (8 years, 6 months ago) by pgoyette
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.247: +3 -3 lines
Diff to previous 1.247 (colored)

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) - annotate - [select for diffs], Tue Oct 13 00:28:22 2015 UTC (8 years, 6 months ago) by pgoyette
Branch: MAIN
Changes since 1.246: +10 -3 lines
Diff to previous 1.246 (colored)

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) - annotate - [select for diffs], Tue Oct 13 00:27:19 2015 UTC (8 years, 6 months ago) by pgoyette
Branch: MAIN
Changes since 1.245: +3 -3 lines
Diff to previous 1.245 (colored)

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) - annotate - [select for diffs], Fri Oct 2 16:54:15 2015 UTC (8 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.244: +7 -7 lines
Diff to previous 1.244 (colored)

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) - annotate - [select for diffs], Wed Aug 20 00:04:28 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.241.2.2: +3 -5 lines
Diff to previous 1.241.2.2 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.243.6.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:55:58 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.243: +5 -7 lines
Diff to previous 1.243 (colored) next main 1.244 (colored)

Rebase.

Revision 1.235.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.235.2.2: +6 -8 lines
Diff to previous 1.235.2.2 (colored) to branchpoint 1.235 (colored) next main 1.236 (colored)

sync with head.

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

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

Revision 1.236.2.3 / (download) - annotate - [select for diffs], Wed May 21 21:04:31 2014 UTC (9 years, 10 months ago) by bouyer
Branch: netbsd-6
Changes since 1.236.2.2: +5 -7 lines
Diff to previous 1.236.2.2 (colored) to branchpoint 1.236 (colored)

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) - annotate - [select for diffs], Sun May 18 17:46:07 2014 UTC (9 years, 10 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.243: +5 -7 lines
Diff to previous 1.243 (colored) next main 1.244 (colored)

sync with head

Revision 1.244 / (download) - annotate - [select for diffs], Mon May 5 15:45:32 2014 UTC (9 years, 11 months ago) by christos
Branch: 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
Changes since 1.243: +5 -7 lines
Diff to previous 1.243 (colored)

Free pid for linux processes. Reported by Mark Davies, fix by dsl@
XXX: pullup 6

Revision 1.241.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:18:57 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.241.2.1: +3 -3 lines
Diff to previous 1.241.2.1 (colored)

resync from head

Revision 1.243 / (download) - annotate - [select for diffs], Sun Jun 9 01:13:47 2013 UTC (10 years, 10 months ago) by riz
Branch: 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
Changes since 1.242: +3 -3 lines
Diff to previous 1.242 (colored)

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) - annotate - [select for diffs], Tue Nov 20 03:02:42 2012 UTC (11 years, 4 months ago) by tls
Branch: tls-maxphys
Changes since 1.241: +13 -26 lines
Diff to previous 1.241 (colored)

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

Revision 1.236.2.1.2.1 / (download) - annotate - [select for diffs], Thu Nov 1 16:45:03 2012 UTC (11 years, 5 months ago) by matt
Branch: matt-nb6-plus
Changes since 1.236.2.1: +13 -26 lines
Diff to previous 1.236.2.1 (colored) next main 1.236.2.2 (colored)

sync with netbsd-6-0-RELEASE.

Revision 1.235.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:28 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.235.2.1: +54 -53 lines
Diff to previous 1.235.2.1 (colored) to branchpoint 1.235 (colored)

sync with head

Revision 1.236.2.2 / (download) - annotate - [select for diffs], Mon Oct 1 23:07:07 2012 UTC (11 years, 6 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-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
Changes since 1.236.2.1: +13 -26 lines
Diff to previous 1.236.2.1 (colored) to branchpoint 1.236 (colored)

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

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

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

Should fix PR/46168 and PR/46402.

Revision 1.241 / (download) - annotate - [select for diffs], Sun Aug 5 14:53:25 2012 UTC (11 years, 8 months ago) by riastradh
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.240: +31 -29 lines
Diff to previous 1.240 (colored)

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) - annotate - [select for diffs], Fri Jul 27 20:52:49 2012 UTC (11 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.239: +8 -2 lines
Diff to previous 1.239 (colored)

revert racy vfork() parent-blocking-before-child-execs-or-exits code.
ok rmind

Revision 1.239 / (download) - annotate - [select for diffs], Sun Jul 22 22:40:19 2012 UTC (11 years, 8 months ago) by rmind
Branch: MAIN
Changes since 1.238: +9 -3 lines
Diff to previous 1.238 (colored)

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) - annotate - [select for diffs], Sun Apr 29 23:05:04 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.235.6.2: +5 -8 lines
Diff to previous 1.235.6.2 (colored) to branchpoint 1.235 (colored) next main 1.236 (colored)

sync to latest -current.

Revision 1.235.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:23 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.235: +9 -60 lines
Diff to previous 1.235 (colored)

sync with head

Revision 1.236.2.1 / (download) - annotate - [select for diffs], Thu Apr 12 17:05:36 2012 UTC (12 years ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-0-RC2, netbsd-6-0-RC1
Branch point for: matt-nb6-plus
Changes since 1.236: +5 -8 lines
Diff to previous 1.236 (colored)

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) - annotate - [select for diffs], Sun Apr 8 11:27:45 2012 UTC (12 years ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Changes since 1.237: +5 -8 lines
Diff to previous 1.237 (colored)

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) - annotate - [select for diffs], Fri Feb 24 09:11:45 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.235.6.1: +7 -60 lines
Diff to previous 1.235.6.1 (colored) to branchpoint 1.235 (colored)

sync to -current.

Revision 1.237 / (download) - annotate - [select for diffs], Sun Feb 19 21:06:50 2012 UTC (12 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Changes since 1.236: +7 -60 lines
Diff to previous 1.236 (colored)

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

Revision 1.235.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:28 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.235: +8 -3 lines
Diff to previous 1.235 (colored)

merge to -current.

Revision 1.236 / (download) - annotate - [select for diffs], Wed Feb 15 11:59:30 2012 UTC (12 years, 2 months ago) by martin
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.235: +8 -3 lines
Diff to previous 1.235 (colored)

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) - annotate - [select for diffs], Sun Oct 9 20:30:37 2011 UTC (12 years, 6 months ago) by chs
Branch: 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
Changes since 1.234: +4 -3 lines
Diff to previous 1.234 (colored)

mark exit_psignal() as __noclone to work around a gcc 4.5 bug on arm.

Revision 1.233.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:19 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.233: +7 -2 lines
Diff to previous 1.233 (colored) next main 1.234 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.227.2.5 / (download) - annotate - [select for diffs], Sun Jun 12 00:24:28 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.227.2.4: +5 -0 lines
Diff to previous 1.227.2.4 (colored) to branchpoint 1.227 (colored) next main 1.228 (colored)

sync with head

Revision 1.234 / (download) - annotate - [select for diffs], Mon Jun 6 22:04:34 2011 UTC (12 years, 10 months ago) by matt
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Changes since 1.233: +7 -2 lines
Diff to previous 1.233 (colored)

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) - annotate - [select for diffs], Mon Jun 6 09:09:28 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.231: +4 -3 lines
Diff to previous 1.231 (colored) next main 1.232 (colored)

Sync with HEAD.

Revision 1.227.2.4 / (download) - annotate - [select for diffs], Tue May 31 03:05:01 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.227.2.3: +1 -1 lines
Diff to previous 1.227.2.3 (colored) to branchpoint 1.227 (colored)

sync with head

Revision 1.233 / (download) - annotate - [select for diffs], Sun May 1 00:11:52 2011 UTC (12 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.232: +3 -3 lines
Diff to previous 1.232 (colored)

Rename limfree() to lim_free(), misc clean up.  No functional change.

Revision 1.227.2.3 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:14 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.227.2.2: +6 -3 lines
Diff to previous 1.227.2.2 (colored) to branchpoint 1.227 (colored)

sync with head

Revision 1.231.4.1 / (download) - annotate - [select for diffs], Sat Mar 5 15:10:39 2011 UTC (13 years, 1 month ago) by bouyer
Branch: bouyer-quota2
Changes since 1.231: +3 -2 lines
Diff to previous 1.231 (colored) next main 1.232 (colored)

Sync with HEAD

Revision 1.232 / (download) - annotate - [select for diffs], Mon Feb 21 20:23:28 2011 UTC (13 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.231: +3 -2 lines
Diff to previous 1.231 (colored)

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) - annotate - [select for diffs], Sat Dec 18 01:36:19 2010 UTC (13 years, 3 months ago) by rmind
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.230: +4 -2 lines
Diff to previous 1.230 (colored)

- 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) - annotate - [select for diffs], Tue Aug 17 06:47:26 2010 UTC (13 years, 8 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.225.2.1: +4 -4 lines
Diff to previous 1.225.2.1 (colored) to branchpoint 1.225 (colored) next main 1.226 (colored)

Sync with HEAD.

Revision 1.205.2.6 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:38 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.205.2.5: +6 -6 lines
Diff to previous 1.205.2.5 (colored) to branchpoint 1.205 (colored) next main 1.206 (colored)

sync with head.

Revision 1.230 / (download) - annotate - [select for diffs], Wed Jul 7 01:30:37 2010 UTC (13 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.229: +3 -3 lines
Diff to previous 1.229 (colored)

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

Revision 1.227.2.2 / (download) - annotate - [select for diffs], Sat Jul 3 01:19:53 2010 UTC (13 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.227.2.1: +4 -4 lines
Diff to previous 1.227.2.1 (colored) to branchpoint 1.227 (colored)

sync with head

Revision 1.229 / (download) - annotate - [select for diffs], Thu Jul 1 02:38:30 2010 UTC (13 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.228: +4 -4 lines
Diff to previous 1.228 (colored)

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) - annotate - [select for diffs], Sun May 30 05:17:56 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.227: +3 -3 lines
Diff to previous 1.227 (colored)

sync with head

Revision 1.228 / (download) - annotate - [select for diffs], Tue May 11 09:30:29 2010 UTC (13 years, 11 months ago) by pooka
Branch: MAIN
Changes since 1.227: +3 -3 lines
Diff to previous 1.227 (colored)

the crowd went crazy
as typo left the stage

Revision 1.225.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:09 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.225: +15 -4 lines
Diff to previous 1.225 (colored)

Sync with HEAD.

Revision 1.214.4.1.2.1.2.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:28:16 2010 UTC (13 years, 11 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.214.4.1.2.1: +2 -2 lines
Diff to previous 1.214.4.1.2.1 (colored) next main 1.214.4.2 (colored)

sync to netbsd-5

Revision 1.205.2.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:16 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.205.2.4: +37 -32 lines
Diff to previous 1.205.2.4 (colored) to branchpoint 1.205 (colored)

sync with head

Revision 1.227 / (download) - annotate - [select for diffs], Wed Mar 3 00:47:30 2010 UTC (14 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.226: +2 -4 lines
Diff to previous 1.226 (colored)

remove redundant checks of PK_MARKER.

Revision 1.226 / (download) - annotate - [select for diffs], Mon Mar 1 21:10:15 2010 UTC (14 years, 1 month ago) by darran
Branch: MAIN
Changes since 1.225: +15 -2 lines
Diff to previous 1.225 (colored)

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) - annotate - [select for diffs], Wed Nov 4 21:23:02 2009 UTC (14 years, 5 months ago) by rmind
Branch: MAIN
CVS Tags: uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip
Changes since 1.224: +22 -29 lines
Diff to previous 1.224 (colored)

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) - annotate - [select for diffs], Sun Nov 1 21:05:30 2009 UTC (14 years, 5 months ago) by rmind
Branch: MAIN
Changes since 1.223: +9 -6 lines
Diff to previous 1.223 (colored)

do_sys_wait: clear rusage, instead of returning garbage.  Patch from
dholland@ via PR/40717, with minor change by me.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Oct 22 22:28:57 2009 UTC (14 years, 5 months ago) by rmind
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.222: +2 -4 lines
Diff to previous 1.222 (colored)

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) - annotate - [select for diffs], Thu Jul 23 23:32:34 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.218.2.1: +4 -3 lines
Diff to previous 1.218.2.1 (colored) to branchpoint 1.218 (colored) next main 1.219 (colored)

Sync with HEAD.

Revision 1.205.2.4 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:22 2009 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.205.2.3: +4 -3 lines
Diff to previous 1.205.2.3 (colored) to branchpoint 1.205 (colored)

sync with head.

Revision 1.214.4.1.2.1 / (download) - annotate - [select for diffs], Wed Jul 1 22:30:44 2009 UTC (14 years, 9 months ago) by snj
Branch: 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
Changes since 1.214.4.1: +3 -3 lines
Diff to previous 1.214.4.1 (colored) next main 1.214.4.2 (colored)

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) - annotate - [select for diffs], Wed Jul 1 22:30:30 2009 UTC (14 years, 9 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-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
Changes since 1.214.4.1: +3 -3 lines
Diff to previous 1.214.4.1 (colored) to branchpoint 1.214 (colored)

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) - annotate - [select for diffs], Sun Jun 28 11:42:43 2009 UTC (14 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.221: +4 -3 lines
Diff to previous 1.221 (colored)

wrap a long line.

Revision 1.205.2.3 / (download) - annotate - [select for diffs], Sat May 16 10:41:48 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.205.2.2: +3 -3 lines
Diff to previous 1.205.2.2 (colored) to branchpoint 1.205 (colored)

sync with head

Revision 1.218.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:56 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.218: +26 -36 lines
Diff to previous 1.218 (colored)

Sync with HEAD.

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

Revision 1.221 / (download) - annotate - [select for diffs], Fri May 8 13:32:59 2009 UTC (14 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, jym-xensuspend-base
Changes since 1.220: +3 -3 lines
Diff to previous 1.220 (colored)

exit1: fix a race with do_sys_wait/proc_free.

Revision 1.205.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:46 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.205.2.1: +104 -94 lines
Diff to previous 1.205.2.1 (colored) to branchpoint 1.205 (colored)

sync with head.

Revision 1.214.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:59 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.214.2.2: +25 -35 lines
Diff to previous 1.214.2.2 (colored) to branchpoint 1.214 (colored) next main 1.215 (colored)

Sync with HEAD.

Revision 1.220 / (download) - annotate - [select for diffs], Sat Apr 25 15:06:31 2009 UTC (14 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.219: +10 -11 lines
Diff to previous 1.219 (colored)

- 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) - annotate - [select for diffs], Sat Mar 28 21:38:55 2009 UTC (15 years ago) by rmind
Branch: MAIN
Changes since 1.218: +17 -26 lines
Diff to previous 1.218 (colored)

- 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) - annotate - [select for diffs], Tue Mar 3 18:32:55 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.214.2.1: +2 -3 lines
Diff to previous 1.214.2.1 (colored) to branchpoint 1.214 (colored)

Sync with HEAD.

Revision 1.214.4.1 / (download) - annotate - [select for diffs], Mon Feb 2 02:32:57 2009 UTC (15 years, 2 months ago) by snj
Branch: 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
Changes since 1.214: +21 -20 lines
Diff to previous 1.214 (colored)

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) - annotate - [select for diffs], Thu Jan 22 14:38:35 2009 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.217: +2 -3 lines
Diff to previous 1.217 (colored)

malloc -> kmem_alloc

Revision 1.214.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:38 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.214: +22 -25 lines
Diff to previous 1.214 (colored)

Sync with HEAD.

Revision 1.199.6.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:18 2009 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.199.6.4: +59 -9 lines
Diff to previous 1.199.6.4 (colored) to branchpoint 1.199 (colored) next main 1.200 (colored)

Sync with HEAD.

Revision 1.217 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:52 2009 UTC (15 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.216: +3 -3 lines
Diff to previous 1.216 (colored)

merge christos-time_t

Revision 1.211.2.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:08 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.211.2.1: +22 -25 lines
Diff to previous 1.211.2.1 (colored) to branchpoint 1.211 (colored) next main 1.212 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.202.2.3 / (download) - annotate - [select for diffs], Thu Nov 20 20:45:39 2008 UTC (15 years, 4 months ago) by christos
Branch: christos-time_t
Changes since 1.202.2.2: +2 -6 lines
Diff to previous 1.202.2.2 (colored) to branchpoint 1.202 (colored) next main 1.203 (colored)

merge with head.

Revision 1.216 / (download) - annotate - [select for diffs], Fri Nov 14 23:33:45 2008 UTC (15 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, christos-time_t-nbase, christos-time_t-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.215: +2 -6 lines
Diff to previous 1.215 (colored)

Make POSIX AIO loadable as a module.

Revision 1.202.2.2 / (download) - annotate - [select for diffs], Sat Nov 1 21:22:27 2008 UTC (15 years, 5 months ago) by christos
Branch: christos-time_t
Changes since 1.202.2.1: +117 -126 lines
Diff to previous 1.202.2.1 (colored) to branchpoint 1.202 (colored)

Sync with head.

Revision 1.215 / (download) - annotate - [select for diffs], Sat Nov 1 05:59:33 2008 UTC (15 years, 5 months ago) by wrstuden
Branch: MAIN
Changes since 1.214: +21 -20 lines
Diff to previous 1.214 (colored)

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) - annotate - [select for diffs], Sat Oct 25 14:10:26 2008 UTC (15 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RC1
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.213: +3 -3 lines
Diff to previous 1.213 (colored)

exit1: update a comment.

Revision 1.211.2.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:27 2008 UTC (15 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.211: +58 -5 lines
Diff to previous 1.211 (colored)

Sync with HEAD.

Revision 1.213 / (download) - annotate - [select for diffs], Wed Oct 15 06:51:20 2008 UTC (15 years, 6 months ago) by wrstuden
Branch: MAIN
CVS Tags: matt-mips64-base2, haad-dm-base1
Changes since 1.212: +57 -4 lines
Diff to previous 1.212 (colored)

Merge wrstuden-revivesa into HEAD.

Revision 1.212 / (download) - annotate - [select for diffs], Sat Oct 11 13:40:57 2008 UTC (15 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.211: +3 -3 lines
Diff to previous 1.211 (colored)

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) - annotate - [select for diffs], Mon Jul 21 19:13:45 2008 UTC (15 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.208.2.6: +7 -2 lines
Diff to previous 1.208.2.6 (colored) to branchpoint 1.208 (colored) next main 1.209 (colored)

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) - annotate - [select for diffs], Mon Jun 30 04:55:56 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.208.2.5: +4 -6 lines
Diff to previous 1.208.2.5 (colored) to branchpoint 1.208 (colored)

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) - annotate - [select for diffs], Sun Jun 29 09:33:14 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.199.6.3: +18 -36 lines
Diff to previous 1.199.6.3 (colored) to branchpoint 1.199 (colored)

Sync with HEAD.

Revision 1.208.2.5 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:50 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.208.2.4: +22 -51 lines
Diff to previous 1.208.2.4 (colored) to branchpoint 1.208 (colored)

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

Revision 1.210.2.1 / (download) - annotate - [select for diffs], Wed Jun 18 16:33:35 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.210: +20 -38 lines
Diff to previous 1.210 (colored) next main 1.211 (colored)

Sync with head.

Revision 1.202.4.3 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:02 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.202.4.2: +20 -38 lines
Diff to previous 1.202.4.2 (colored) to branchpoint 1.202 (colored) next main 1.203 (colored)

sync with head.

Revision 1.211 / (download) - annotate - [select for diffs], Mon Jun 16 09:51:14 2008 UTC (15 years, 10 months ago) by ad
Branch: 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
Changes since 1.210: +20 -38 lines
Diff to previous 1.210 (colored)

- 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) - annotate - [select for diffs], Sun Jun 8 14:54:57 2008 UTC (15 years, 10 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.208.2.3: +4 -3 lines
Diff to previous 1.208.2.3 (colored) to branchpoint 1.208 (colored)

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) - annotate - [select for diffs], Thu Jun 5 19:14:36 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.199.6.2: +1 -0 lines
Diff to previous 1.199.6.2 (colored) to branchpoint 1.199 (colored)

Sync with HEAD.

Also fix build.

Revision 1.202.4.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:39 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.202.4.1: +4 -15 lines
Diff to previous 1.202.4.1 (colored) to branchpoint 1.202 (colored)

sync with head

Revision 1.210 / (download) - annotate - [select for diffs], Mon Jun 2 16:18:09 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3
Branch point for: simonb-wapbl
Changes since 1.209: +3 -2 lines
Diff to previous 1.209 (colored)

Most contention on proc_lock is from getppid(), so cache the parent's PID.

Revision 1.199.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:08 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.199.6.1: +45 -91 lines
Diff to previous 1.199.6.1 (colored) to branchpoint 1.199 (colored)

Sync with HEAD.

Revision 1.208.2.3 / (download) - annotate - [select for diffs], Mon May 26 06:54:40 2008 UTC (15 years, 10 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.208.2.2: +13 -11 lines
Diff to previous 1.208.2.2 (colored) to branchpoint 1.208 (colored)

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) - annotate - [select for diffs], Fri May 23 06:52:19 2008 UTC (15 years, 10 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.208.2.1: +49 -4 lines
Diff to previous 1.208.2.1 (colored) to branchpoint 1.208 (colored)

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) - annotate - [select for diffs], Mon May 19 17:06:02 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: hpcarm-cleanup-nbase
Changes since 1.208: +3 -15 lines
Diff to previous 1.208 (colored)

Reduce ifdefs due to MULTIPROCESSOR slightly.

Revision 1.202.4.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:07 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.202: +48 -82 lines
Diff to previous 1.202 (colored)

sync with head.

Revision 1.205.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:24 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.205: +5 -11 lines
Diff to previous 1.205 (colored)

sync with head.

Revision 1.208.2.1 / (download) - annotate - [select for diffs], Sat May 10 23:49:03 2008 UTC (15 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.208: +4 -2 lines
Diff to previous 1.208 (colored)

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) - annotate - [select for diffs], Tue Apr 29 16:21:01 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Changes since 1.207: +5 -3 lines
Diff to previous 1.207 (colored)

Ignore processes with PK_MARKER set.

Revision 1.207 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:03 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.206: +2 -9 lines
Diff to previous 1.206 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.206 / (download) - annotate - [select for diffs], Mon Apr 28 15:36:01 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.205: +2 -3 lines
Diff to previous 1.205 (colored)

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) - annotate - [select for diffs], Sun Apr 27 11:39:20 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.204: +3 -4 lines
Diff to previous 1.204 (colored)

Disable preemption during the final stages of LWP exit.

Revision 1.204 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:24 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.203: +25 -27 lines
Diff to previous 1.203 (colored)

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

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

Revision 1.203 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:29 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.202: +22 -47 lines
Diff to previous 1.202 (colored)

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

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

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

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

Revision 1.199.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:01 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.199: +15 -10 lines
Diff to previous 1.199 (colored)

Sync with HEAD.

Revision 1.202.2.1 / (download) - annotate - [select for diffs], Sat Mar 29 20:47:00 2008 UTC (16 years ago) by christos
Branch: christos-time_t
Changes since 1.202: +3 -3 lines
Diff to previous 1.202 (colored)

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

Revision 1.202 / (download) - annotate - [select for diffs], Thu Mar 27 19:06:52 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42, christos-time_t
Changes since 1.201: +7 -4 lines
Diff to previous 1.201 (colored)

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) - annotate - [select for diffs], Mon Mar 24 09:39:01 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.148.2.9: +10 -8 lines
Diff to previous 1.148.2.9 (colored) next main 1.149 (colored)

sync with head.

Revision 1.201 / (download) - annotate - [select for diffs], Sun Mar 23 16:53:45 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Changes since 1.200: +9 -7 lines
Diff to previous 1.200 (colored)

Reorder a code block slightly, to allow proclist_mutex to be an adaptive
mutex (purely for testing).

Revision 1.186.2.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:58 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.186.2.3: +2 -10 lines
Diff to previous 1.186.2.3 (colored) next main 1.187 (colored)

sync with HEAD

Revision 1.200 / (download) - annotate - [select for diffs], Fri Mar 21 21:55:00 2008 UTC (16 years ago) by ad
Branch: MAIN
Changes since 1.199: +3 -3 lines
Diff to previous 1.199 (colored)

Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.

Revision 1.190.2.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:45 2008 UTC (16 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.190.2.3: +17 -27 lines
Diff to previous 1.190.2.3 (colored) to branchpoint 1.190 (colored) next main 1.191 (colored)

Sync with HEAD.

Revision 1.148.2.9 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:11 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.148.2.8: +2 -10 lines
Diff to previous 1.148.2.8 (colored)

sync with head.

Revision 1.199 / (download) - annotate - [select for diffs], Mon Jan 28 12:22:46 2008 UTC (16 years, 2 months ago) by yamt
Branch: 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
Changes since 1.198: +2 -10 lines
Diff to previous 1.198 (colored)

remove a special allocator for uareas, which is no longer necessary.
use pool_cache instead.

Revision 1.148.2.8 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:03 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.148.2.7: +27 -28 lines
Diff to previous 1.148.2.7 (colored)

sync with head

Revision 1.186.2.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:01 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.186.2.2: +34 -30 lines
Diff to previous 1.186.2.2 (colored)

sync with HEAD

Revision 1.194.6.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:55:49 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.194: +27 -28 lines
Diff to previous 1.194 (colored) next main 1.195 (colored)

Sync with HEAD

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

Merge vmlocking2 to head.

Revision 1.197 / (download) - annotate - [select for diffs], Mon Dec 31 15:32:11 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.196: +2 -7 lines
Diff to previous 1.196 (colored)

Remove systrace. Ok core@.

Revision 1.194.2.5 / (download) - annotate - [select for diffs], Fri Dec 28 14:35:45 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.194.2.4: +7 -5 lines
Diff to previous 1.194.2.4 (colored) to branchpoint 1.194 (colored) next main 1.195 (colored)

Fix previous.

Revision 1.194.2.4 / (download) - annotate - [select for diffs], Fri Dec 28 14:28:06 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.194.2.3: +5 -9 lines
Diff to previous 1.194.2.3 (colored) to branchpoint 1.194 (colored)

- 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) - annotate - [select for diffs], Thu Dec 27 00:45:58 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.190.2.2: +12 -11 lines
Diff to previous 1.190.2.2 (colored) to branchpoint 1.190 (colored)

Sync with HEAD.

Revision 1.194.2.3 / (download) - annotate - [select for diffs], Wed Dec 26 23:07:22 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.194.2.2: +8 -5 lines
Diff to previous 1.194.2.2 (colored) to branchpoint 1.194 (colored)

- 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) - annotate - [select for diffs], Wed Dec 26 21:39:39 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.194.2.1: +13 -11 lines
Diff to previous 1.194.2.1 (colored) to branchpoint 1.194 (colored)

Sync with head.

Revision 1.196 / (download) - annotate - [select for diffs], Wed Dec 26 16:01:36 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.195: +4 -3 lines
Diff to previous 1.195 (colored)

Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.

Revision 1.195 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:08 2007 UTC (16 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.194: +12 -11 lines
Diff to previous 1.194 (colored)

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

Revision 1.194.2.1 / (download) - annotate - [select for diffs], Sat Dec 15 03:16:55 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking2
Changes since 1.194: +4 -3 lines
Diff to previous 1.194 (colored)

- 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) - annotate - [select for diffs], Sat Dec 8 18:20:27 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.190.2.1: +4 -3 lines
Diff to previous 1.190.2.1 (colored) to branchpoint 1.190 (colored)

Sync with HEAD.

Revision 1.148.2.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:40 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.148.2.6: +4 -3 lines
Diff to previous 1.148.2.6 (colored)

sync with head

Revision 1.183.6.8 / (download) - annotate - [select for diffs], Mon Dec 3 16:14:48 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.183.6.7: +4 -3 lines
Diff to previous 1.183.6.7 (colored) to branchpoint 1.183 (colored) next main 1.184 (colored)

Sync with HEAD.

Revision 1.194 / (download) - annotate - [select for diffs], Fri Nov 30 23:05:43 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.193: +4 -3 lines
Diff to previous 1.193 (colored)

Use membar_*().

Revision 1.190.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:37 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.190: +15 -16 lines
Diff to previous 1.190 (colored)

Sync with HEAD.

Revision 1.169.2.16 / (download) - annotate - [select for diffs], Fri Nov 16 19:51:37 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.169.2.15: +4 -2 lines
Diff to previous 1.169.2.15 (colored) next main 1.170 (colored)

Add missing callout_destroy().

Revision 1.148.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:40 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.148.2.5: +15 -16 lines
Diff to previous 1.148.2.5 (colored)

sync with head.

Revision 1.183.6.7 / (download) - annotate - [select for diffs], Wed Nov 14 19:04:39 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.183.6.6: +7 -3 lines
Diff to previous 1.183.6.6 (colored) to branchpoint 1.183 (colored)

Sync with HEAD.

Revision 1.188.2.2 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:01 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.188.2.1: +15 -16 lines
Diff to previous 1.188.2.1 (colored) to branchpoint 1.188 (colored) next main 1.189 (colored)

Sync with HEAD

Revision 1.193 / (download) - annotate - [select for diffs], Mon Nov 12 23:11:59 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.192: +7 -3 lines
Diff to previous 1.192 (colored)

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

Revision 1.183.6.6 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:01 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.183.6.5: +10 -15 lines
Diff to previous 1.183.6.5 (colored) to branchpoint 1.183 (colored)

Sync with HEAD.

Revision 1.186.2.2 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:01 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.186.2.1: +10 -15 lines
Diff to previous 1.186.2.1 (colored)

sync with -HEAD

Revision 1.192 / (download) - annotate - [select for diffs], Wed Nov 7 15:56:21 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.191: +7 -11 lines
Diff to previous 1.191 (colored)

Merge tty changes from the vmlocking branch.

Revision 1.191 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:21 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.190: +7 -8 lines
Diff to previous 1.190 (colored)

Merge from vmlocking:

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

Revision 1.186.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:31:33 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
Changes since 1.186: +32 -34 lines
Diff to previous 1.186 (colored)

sync with HEAD

Revision 1.183.6.5 / (download) - annotate - [select for diffs], Sun Oct 28 20:11:11 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.183.6.4: +4 -4 lines
Diff to previous 1.183.6.4 (colored) to branchpoint 1.183 (colored)

Sync with HEAD.

Revision 1.148.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:22 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.148.2.4: +32 -34 lines
Diff to previous 1.148.2.4 (colored)

sync with head.

Revision 1.183.6.4 / (download) - annotate - [select for diffs], Fri Oct 26 15:48:30 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.183.6.3: +30 -32 lines
Diff to previous 1.183.6.3 (colored) to branchpoint 1.183 (colored)

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) - annotate - [select for diffs], Thu Oct 25 22:40:00 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.188: +3 -3 lines
Diff to previous 1.188 (colored)

Sync with HEAD.

Revision 1.169.2.15 / (download) - annotate - [select for diffs], Thu Oct 25 19:43:09 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.169.2.14: +6 -6 lines
Diff to previous 1.169.2.14 (colored)

- 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) - annotate - [select for diffs], Wed Oct 24 14:50:40 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Branch point for: mjf-devfs
Changes since 1.189: +4 -4 lines
Diff to previous 1.189 (colored)

Make ras_lookup() lockless.

Revision 1.169.2.14 / (download) - annotate - [select for diffs], Tue Oct 23 20:17:09 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.169.2.13: +3 -3 lines
Diff to previous 1.169.2.13 (colored)

Sync with head.

Revision 1.169.2.13 / (download) - annotate - [select for diffs], Fri Oct 19 13:08:08 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.169.2.12: +5 -5 lines
Diff to previous 1.169.2.12 (colored)

Replace the tty locks with a global tty_lock.

Revision 1.189 / (download) - annotate - [select for diffs], Fri Oct 19 12:16:42 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.188: +3 -3 lines
Diff to previous 1.188 (colored)

machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.187.2.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:39 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.187: +29 -31 lines
Diff to previous 1.187 (colored) next main 1.188 (colored)

sync with head.

Revision 1.188 / (download) - annotate - [select for diffs], Fri Oct 12 14:29:37 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Changes since 1.187: +29 -31 lines
Diff to previous 1.187 (colored)

Merge from vmlocking: fix a deadlock with (threaded) soft interrupts and
process exit.

Revision 1.183.6.3 / (download) - annotate - [select for diffs], Tue Oct 2 18:28:59 2007 UTC (16 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.183.6.2: +3 -3 lines
Diff to previous 1.183.6.2 (colored) to branchpoint 1.183 (colored)

Sync with HEAD.

Revision 1.183.2.3 / (download) - annotate - [select for diffs], Mon Sep 10 10:55:57 2007 UTC (16 years, 7 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.183.2.2: +3 -3 lines
Diff to previous 1.183.2.2 (colored) to branchpoint 1.183 (colored) next main 1.184 (colored)

Sync with HEAD.

Revision 1.187 / (download) - annotate - [select for diffs], Thu Sep 6 23:58:56 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap
Changes since 1.186: +3 -3 lines
Diff to previous 1.186 (colored)

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

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

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

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

Revision 1.148.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:40:46 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.148.2.3: +158 -141 lines
Diff to previous 1.148.2.3 (colored)

sync with head.

Revision 1.183.2.2 / (download) - annotate - [select for diffs], Mon Sep 3 10:22:58 2007 UTC (16 years, 7 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.183.2.1: +17 -13 lines
Diff to previous 1.183.2.1 (colored) to branchpoint 1.183 (colored)

Sync with HEAD.

Revision 1.169.2.12 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:29 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.169.2.11: +9 -9 lines
Diff to previous 1.169.2.11 (colored)

Sync with HEAD.

Revision 1.169.2.11 / (download) - annotate - [select for diffs], Sun Aug 19 22:10:14 2007 UTC (16 years, 7 months ago) by yamt
Branch: vmlocking
Changes since 1.169.2.10: +28 -26 lines
Diff to previous 1.169.2.10 (colored)

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) - annotate - [select for diffs], Thu Aug 16 11:03:30 2007 UTC (16 years, 8 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.183.6.1: +17 -13 lines
Diff to previous 1.183.6.1 (colored) to branchpoint 1.183 (colored)

Sync with HEAD.

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

Sync with HEAD.

Revision 1.186 / (download) - annotate - [select for diffs], Wed Aug 15 12:20:28 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.185: +15 -11 lines
Diff to previous 1.185 (colored)

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) - annotate - [select for diffs], Wed Aug 15 12:07:32 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.184: +4 -4 lines
Diff to previous 1.184 (colored)

Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.

Revision 1.183.6.1 / (download) - annotate - [select for diffs], Thu Aug 9 02:37:19 2007 UTC (16 years, 8 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.183: +7 -7 lines
Diff to previous 1.183 (colored)

Sync with HEAD.

Revision 1.184 / (download) - annotate - [select for diffs], Tue Aug 7 12:45:54 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.183: +7 -7 lines
Diff to previous 1.183 (colored)

Do cv_broadcast() on proc::p_waitcv to be on the safe side (the parent
could be multithreaded).

Revision 1.169.2.10 / (download) - annotate - [select for diffs], Sun Jul 29 11:28:08 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.169.2.9: +3 -6 lines
Diff to previous 1.169.2.9 (colored)

Don't need kernel_lock for proc_free().

Revision 1.169.2.9 / (download) - annotate - [select for diffs], Sun Jul 15 15:52:54 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.169.2.8: +12 -3 lines
Diff to previous 1.169.2.8 (colored)

Sync with head.

Revision 1.171.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:09:46 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.171: +126 -112 lines
Diff to previous 1.171 (colored) next main 1.172 (colored)

Sync with head.

Revision 1.183 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:52 2007 UTC (16 years, 9 months ago) by ad
Branch: 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
Changes since 1.182: +12 -2 lines
Diff to previous 1.182 (colored)

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) - annotate - [select for diffs], Fri Jun 15 18:29:53 2007 UTC (16 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.181: +14 -12 lines
Diff to previous 1.181 (colored)

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) - annotate - [select for diffs], Wed Jun 13 12:14:10 2007 UTC (16 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.180: +11 -3 lines
Diff to previous 1.180 (colored)

exit_lwps: fix a deadlock.

Revision 1.169.2.8 / (download) - annotate - [select for diffs], Sat Jun 9 23:58:04 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.169.2.7: +3 -3 lines
Diff to previous 1.169.2.7 (colored)

Sync with head.

Revision 1.169.2.7 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:18 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.169.2.6: +90 -77 lines
Diff to previous 1.169.2.6 (colored)

Sync with head.

Revision 1.180 / (download) - annotate - [select for diffs], Thu May 31 06:24:23 2007 UTC (16 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.179: +3 -3 lines
Diff to previous 1.179 (colored)

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) - annotate - [select for diffs], Sun May 27 00:11:31 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.169.2.5: +13 -12 lines
Diff to previous 1.169.2.5 (colored)

Don't free process substructures until we're sure that the last LWP
is off the cpu. Noted by yamt@.

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

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

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

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

Revision 1.166.2.9 / (download) - annotate - [select for diffs], Thu May 17 13:41:45 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.166.2.8: +77 -53 lines
Diff to previous 1.166.2.8 (colored) next main 1.167 (colored)

sync with head.

Revision 1.178 / (download) - annotate - [select for diffs], Tue May 8 20:10:15 2007 UTC (16 years, 11 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.177: +14 -14 lines
Diff to previous 1.177 (colored)

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) - annotate - [select for diffs], Mon May 7 16:53:17 2007 UTC (16 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.176: +70 -50 lines
Diff to previous 1.176 (colored)

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) - annotate - [select for diffs], Mon May 7 10:55:45 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.166.2.7: +14 -17 lines
Diff to previous 1.166.2.7 (colored)

sync with head.

Revision 1.176 / (download) - annotate - [select for diffs], Mon May 7 09:30:14 2007 UTC (16 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.175: +8 -4 lines
Diff to previous 1.175 (colored)

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) - annotate - [select for diffs], Mon Apr 30 20:11:41 2007 UTC (16 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.174: +10 -17 lines
Diff to previous 1.174 (colored)

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) - annotate - [select for diffs], Mon Apr 30 14:44:30 2007 UTC (16 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.173: +6 -2 lines
Diff to previous 1.173 (colored)

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) - annotate - [select for diffs], Sun Apr 15 16:03:49 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.166.2.6: +7 -7 lines
Diff to previous 1.166.2.6 (colored)

sync with head.

Revision 1.169.2.5 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:38 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.169.2.4: +8 -25 lines
Diff to previous 1.169.2.4 (colored)

Sync with head.

Revision 1.169.2.4 / (download) - annotate - [select for diffs], Thu Apr 5 21:44:47 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.169.2.3: +10 -2 lines
Diff to previous 1.169.2.3 (colored)

exit1: make the LWP unswappable as it is exiting.

Revision 1.162.2.1 / (download) - annotate - [select for diffs], Sun Apr 1 16:16:20 2007 UTC (17 years ago) by bouyer
Branch: 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
Changes since 1.162: +19 -29 lines
Diff to previous 1.162 (colored) next main 1.163 (colored)

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) - annotate - [select for diffs], Thu Mar 29 19:27:56 2007 UTC (17 years ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.171: +9 -27 lines
Diff to previous 1.171 (colored) next main 1.172 (colored)

Pullup to -current

Revision 1.173 / (download) - annotate - [select for diffs], Thu Mar 29 17:35:17 2007 UTC (17 years ago) by ad
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.172: +7 -7 lines
Diff to previous 1.172 (colored)

cv_wakeup -> cv_signal

Revision 1.166.2.6 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:00 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.166.2.5: +4 -22 lines
Diff to previous 1.166.2.5 (colored)

sync with head.

Revision 1.169.2.3 / (download) - annotate - [select for diffs], Wed Mar 21 20:11:51 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.169.2.2: +7 -12 lines
Diff to previous 1.169.2.2 (colored)

- Replace more simple_locks, and fix up in a few places.
- Use condition variables.
- LOCK_ASSERT -> KASSERT.

Revision 1.172 / (download) - annotate - [select for diffs], Wed Mar 21 18:26:00 2007 UTC (17 years ago) by ad
Branch: MAIN
Changes since 1.171: +4 -22 lines
Diff to previous 1.171 (colored)

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

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

Also, while here:

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

Revision 1.169.2.2 / (download) - annotate - [select for diffs], Tue Mar 13 17:50:51 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.169.2.1: +1 -3 lines
Diff to previous 1.169.2.1 (colored)

Pull in the initial set of changes for the vmlocking branch.

Revision 1.169.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:51:53 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.169: +9 -9 lines
Diff to previous 1.169 (colored)

Sync with head.

Revision 1.166.2.5 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:33 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.166.2.4: +30 -31 lines
Diff to previous 1.166.2.4 (colored)

Sync with HEAD.

Revision 1.171 / (download) - annotate - [select for diffs], Sun Mar 11 23:40:58 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
Branch point for: reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.170: +7 -7 lines
Diff to previous 1.170 (colored)

Adjust previous: move the release of specificdata after the very last
file system operation.

Revision 1.170 / (download) - annotate - [select for diffs], Sun Mar 11 23:19:49 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.169: +9 -9 lines
Diff to previous 1.169 (colored)

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) - annotate - [select for diffs], Fri Mar 9 15:16:23 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.166.2.3: +3 -3 lines
Diff to previous 1.166.2.3 (colored)

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) - annotate - [select for diffs], Fri Mar 9 14:11:24 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
Branch point for: vmlocking
Changes since 1.168: +23 -24 lines
Diff to previous 1.168 (colored)

- 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) - annotate - [select for diffs], Tue Feb 27 16:54:20 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.166.2.2: +7 -7 lines
Diff to previous 1.166.2.2 (colored)

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

Revision 1.148.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:06 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.148.2.2: +461 -346 lines
Diff to previous 1.148.2.2 (colored)

sync with head.

Revision 1.168 / (download) - annotate - [select for diffs], Thu Feb 22 06:34:43 2007 UTC (17 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.167: +4 -4 lines
Diff to previous 1.167 (colored)

TRUE -> true, FALSE -> false

Revision 1.166.2.2 / (download) - annotate - [select for diffs], Tue Feb 20 21:48:45 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.166.2.1: +3 -3 lines
Diff to previous 1.166.2.1 (colored)

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

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

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

Note: further work will go soon.

Revision 1.167 / (download) - annotate - [select for diffs], Sat Feb 17 22:31:42 2007 UTC (17 years, 1 month ago) by pavel
Branch: MAIN
Changes since 1.166: +5 -5 lines
Diff to previous 1.166 (colored)

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

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

Reviewed by Andrew Doran.

Revision 1.166.2.1 / (download) - annotate - [select for diffs], Sat Feb 17 10:30:54 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.166: +3 -12 lines
Diff to previous 1.166 (colored)

- separate context switching and thread scheduling.
- introduce idle lwp.
- change some related MD/MI interfaces and implement i386 version.

Revision 1.166 / (download) - annotate - [select for diffs], Fri Feb 16 00:39:16 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.165: +13 -18 lines
Diff to previous 1.165 (colored)

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) - annotate - [select for diffs], Fri Feb 9 21:55:30 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.164: +464 -344 lines
Diff to previous 1.164 (colored)

Merge newlock2 to head.

Revision 1.158.2.15 / (download) - annotate - [select for diffs], Fri Feb 9 13:00:43 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.158.2.14: +9 -2 lines
Diff to previous 1.158.2.14 (colored) to branchpoint 1.158 (colored) next main 1.159 (colored)

lwp_wait() and lwp_userret() need to be called without the kernel_lock.

Revision 1.158.2.14 / (download) - annotate - [select for diffs], Mon Feb 5 16:44:40 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.158.2.13: +4 -4 lines
Diff to previous 1.158.2.13 (colored) to branchpoint 1.158 (colored)

IPL_STATCLOCK needs to be >= IPL_CLOCK, so assume that proc::p_stmutex is
always a spinlock.

Revision 1.158.2.13 / (download) - annotate - [select for diffs], Mon Feb 5 13:16:48 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.158.2.12: +23 -16 lines
Diff to previous 1.158.2.12 (colored) to branchpoint 1.158 (colored)

- 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) - annotate - [select for diffs], Sat Feb 3 16:32:50 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.158.2.11: +7 -7 lines
Diff to previous 1.158.2.11 (colored) to branchpoint 1.158 (colored)

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

Revision 1.158.2.11 / (download) - annotate - [select for diffs], Wed Jan 31 19:56:38 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.158.2.10: +6 -2 lines
Diff to previous 1.158.2.10 (colored) to branchpoint 1.158 (colored)

- Have callers to mi_switch() drop the kernel lock.
- Fix a deadlock and some typos.
- Unbreak ptrace().

Revision 1.158.2.10 / (download) - annotate - [select for diffs], Tue Jan 30 13:51:40 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.158.2.9: +5 -56 lines
Diff to previous 1.158.2.9 (colored) to branchpoint 1.158 (colored)

Remove support for SA. Ok core@.

Revision 1.158.2.9 / (download) - annotate - [select for diffs], Sat Jan 13 17:54:48 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.158.2.8: +3 -3 lines
Diff to previous 1.158.2.8 (colored) to branchpoint 1.158 (colored)

Fix use after free bug in proc_free().

Revision 1.158.2.8 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:06 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.158.2.7: +5 -7 lines
Diff to previous 1.158.2.7 (colored) to branchpoint 1.158 (colored)

Sync with head.

Revision 1.158.2.7 / (download) - annotate - [select for diffs], Thu Jan 11 22:22:59 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.158.2.6: +16 -5 lines
Diff to previous 1.158.2.6 (colored) to branchpoint 1.158 (colored)

Checkpoint work in progress.

Revision 1.148.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:05 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.148.2.1: +26 -8 lines
Diff to previous 1.148.2.1 (colored)

sync with head.

Revision 1.158.2.6 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:43 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.158.2.5: +173 -155 lines
Diff to previous 1.158.2.5 (colored) to branchpoint 1.158 (colored)

Checkpoint work in progress.

Revision 1.164 / (download) - annotate - [select for diffs], Fri Dec 22 08:04:01 2006 UTC (17 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.163: +3 -5 lines
Diff to previous 1.163 (colored)

lwp::l_acflag is no longer useful.

Revision 1.158.4.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:44 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.158.4.1: +7 -6 lines
Diff to previous 1.158.4.1 (colored) to branchpoint 1.158 (colored) next main 1.159 (colored)

sync with head.

Revision 1.163 / (download) - annotate - [select for diffs], Wed Dec 6 10:02:22 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored)

use KSI_INIT rather than memset.  no functional changes.

Revision 1.158.2.5 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:21 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.158.2.4: +9 -3 lines
Diff to previous 1.158.2.4 (colored) to branchpoint 1.158 (colored)

Sync with head.

Revision 1.158.2.4 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:36 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.158.2.3: +249 -199 lines
Diff to previous 1.158.2.3 (colored) to branchpoint 1.158 (colored)

Checkpoint work in progress.

Revision 1.162 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (17 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.161: +6 -5 lines
Diff to previous 1.161 (colored)

remove some __unused from function parameters.

Revision 1.158.2.3 / (download) - annotate - [select for diffs], Tue Oct 24 21:10:21 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.158.2.2: +13 -13 lines
Diff to previous 1.158.2.2 (colored) to branchpoint 1.158 (colored)

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

Revision 1.158.4.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:10 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.158: +12 -6 lines
Diff to previous 1.158 (colored)

sync with head

Revision 1.158.2.2 / (download) - annotate - [select for diffs], Sat Oct 21 15:20:46 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.158.2.1: +109 -79 lines
Diff to previous 1.158.2.1 (colored) to branchpoint 1.158 (colored)

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) - annotate - [select for diffs], Thu Oct 12 01:32:15 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.160: +5 -5 lines
Diff to previous 1.160 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.160 / (download) - annotate - [select for diffs], Wed Oct 11 04:51:06 2006 UTC (17 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.159: +9 -2 lines
Diff to previous 1.159 (colored)

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) - annotate - [select for diffs], Sat Sep 23 15:36:12 2006 UTC (17 years, 6 months ago) by xtraeme
Branch: MAIN
Changes since 1.158: +2 -3 lines
Diff to previous 1.158 (colored)

Remove duplicated includes, from Jeff Ito -> PR kern/26113. Thanks.

Revision 1.158.2.1 / (download) - annotate - [select for diffs], Mon Sep 11 18:19:09 2006 UTC (17 years, 7 months ago) by ad
Branch: newlock2
Changes since 1.158: +104 -59 lines
Diff to previous 1.158 (colored)

- 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) - annotate - [select for diffs], Sat Sep 9 02:57:16 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.154: +25 -14 lines
Diff to previous 1.154 (colored) next main 1.155 (colored)

sync with head

Revision 1.155.2.4 / (download) - annotate - [select for diffs], Sun Sep 3 15:25:22 2006 UTC (17 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.155.2.3: +7 -5 lines
Diff to previous 1.155.2.3 (colored) to branchpoint 1.155 (colored) next main 1.156 (colored)

sync with head.

Revision 1.158 / (download) - annotate - [select for diffs], Wed Aug 23 19:49:09 2006 UTC (17 years, 7 months ago) by manu
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.157: +7 -5 lines
Diff to previous 1.157 (colored)

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) - annotate - [select for diffs], Fri Aug 11 15:45:46 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.155.2.2: +14 -3 lines
Diff to previous 1.155.2.2 (colored) to branchpoint 1.155 (colored)

sync with head

Revision 1.157 / (download) - annotate - [select for diffs], Wed Jul 19 21:11:37 2006 UTC (17 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.156: +14 -3 lines
Diff to previous 1.156 (colored)

- 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) - annotate - [select for diffs], Wed Jun 21 15:09:37 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.148: +25 -16 lines
Diff to previous 1.148 (colored)

sync with head.

Revision 1.154.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:07 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.154.6.1: +6 -8 lines
Diff to previous 1.154.6.1 (colored) to branchpoint 1.154 (colored) next main 1.155 (colored)

Sync with head.

Revision 1.155.6.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:40 2006 UTC (17 years, 10 months ago) by tron
Branch: peter-altq
Changes since 1.155: +6 -8 lines
Diff to previous 1.155 (colored) next main 1.156 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.155.2.2 / (download) - annotate - [select for diffs], Wed May 24 10:58:41 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.155.2.1: +891 -0 lines
Diff to previous 1.155.2.1 (colored) to branchpoint 1.155 (colored)

sync with head.

Revision 1.156 / (download) - annotate - [select for diffs], Sun May 14 21:15:11 2006 UTC (17 years, 11 months ago) by elad
Branch: 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
Changes since 1.155: +6 -8 lines
Diff to previous 1.155 (colored)

integrate kauth.

Revision 1.155.4.2 / (download) - annotate - [select for diffs], Sat May 6 23:31:30 2006 UTC (17 years, 11 months ago) by christos
Branch: elad-kernelauth
Changes since 1.155.4.1: +3 -2 lines
Diff to previous 1.155.4.1 (colored) to branchpoint 1.155 (colored) next main 1.156 (colored)

- 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) - annotate - [select for diffs], Sat Apr 22 11:39:58 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.154: +4 -4 lines
Diff to previous 1.154 (colored)

Sync with head.

Revision 1.155.4.1 / (download) - annotate - [select for diffs], Wed Mar 8 00:53:40 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.155: +5 -8 lines
Diff to previous 1.155 (colored)

Adapt to kernel authorization KPI.

Revision 1.155.2.1, Sun Mar 5 07:21:38 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.155: +0 -893 lines
FILE REMOVED

file kern_exit.c was added on branch yamt-pdpolicy on 2006-05-24 10:58:41 +0000

Revision 1.155 / (download) - annotate - [select for diffs], Sun Mar 5 07:21:38 2006 UTC (18 years, 1 month ago) by christos
Branch: 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
Changes since 1.154: +4 -4 lines
Diff to previous 1.154 (colored)

implement PT_SYSCALL

Revision 1.154 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:29 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.153: +4 -4 lines
Diff to previous 1.153 (colored)

merge ktrace-lwp.

Revision 1.117.2.10 / (download) - annotate - [select for diffs], Thu Nov 10 14:09:44 2005 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.117.2.9: +18 -10 lines
Diff to previous 1.117.2.9 (colored) next main 1.118 (colored)

Sync with HEAD. Here we go again...

Revision 1.145.2.3 / (download) - annotate - [select for diffs], Tue Oct 4 14:16:42 2005 UTC (18 years, 6 months ago) by tron
Branch: 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
Changes since 1.145.2.2: +4 -2 lines
Diff to previous 1.145.2.2 (colored) to branchpoint 1.145 (colored) next main 1.146 (colored)

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) - annotate - [select for diffs], Sat Oct 1 21:07:38 2005 UTC (18 years, 6 months ago) by jdolecek
Branch: 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
Changes since 1.152: +3 -3 lines
Diff to previous 1.152 (colored)

log when traced process is orphaned

PR: 17388 by Greg A. Woods

Revision 1.152 / (download) - annotate - [select for diffs], Sat Oct 1 06:12:44 2005 UTC (18 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.151: +3 -3 lines
Diff to previous 1.151 (colored)

simplify lwp exit code.

Revision 1.151 / (download) - annotate - [select for diffs], Sun Aug 28 14:57:18 2005 UTC (18 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.150: +4 -2 lines
Diff to previous 1.150 (colored)

protect p_nrlwps by sched_lock.  no objection on tech-kern@.  PR/29652.

Revision 1.139.4.1 / (download) - annotate - [select for diffs], Wed Aug 24 03:57:26 2005 UTC (18 years, 7 months ago) by riz
Branch: 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
Changes since 1.139: +4 -4 lines
Diff to previous 1.139 (colored) next main 1.140 (colored)

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) - annotate - [select for diffs], Sun Aug 21 22:06:14 2005 UTC (18 years, 7 months ago) by tron
Branch: netbsd-3
Changes since 1.145.2.1: +11 -2 lines
Diff to previous 1.145.2.1 (colored) to branchpoint 1.145 (colored)

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) - annotate - [select for diffs], Sun Aug 21 22:04:22 2005 UTC (18 years, 7 months ago) by tron
Branch: netbsd-3
Changes since 1.145: +4 -4 lines
Diff to previous 1.145 (colored)

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) - annotate - [select for diffs], Wed Aug 10 09:44:02 2005 UTC (18 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.149: +11 -2 lines
Diff to previous 1.149 (colored)

exit_lwps: fix a race with eg. sa_setwoken.
ie. "exit_lwps: lwp_wait1 failed with error 11"
PR/30689.

Revision 1.149 / (download) - annotate - [select for diffs], Wed Aug 10 09:42:03 2005 UTC (18 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.148: +4 -4 lines
Diff to previous 1.148 (colored)

exit_lwps: fix a race which causes a panic "setrunnable: lwp %p state was %d".

Revision 1.148 / (download) - annotate - [select for diffs], Sun May 29 22:24:15 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.147: +2 -5 lines
Diff to previous 1.147 (colored)

- add const.
- remove unnecessary casts.
- add __UNCONST casts and mark them with XXXUNCONST as necessary.

Revision 1.147 / (download) - annotate - [select for diffs], Sun May 8 18:44:39 2005 UTC (18 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored)

Panic strings should not end with \n.

Revision 1.143.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:23 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.143: +15 -14 lines
Diff to previous 1.143 (colored) next main 1.144 (colored)

sync with -current

Revision 1.117.2.9 / (download) - annotate - [select for diffs], Fri Apr 1 14:30:56 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.117.2.8: +3 -3 lines
Diff to previous 1.117.2.8 (colored)

Sync with HEAD.

Revision 1.146 / (download) - annotate - [select for diffs], Wed Mar 30 17:07:50 2005 UTC (19 years ago) by christos
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored)

PR/19837: Stephen Ma: signal(SIGCHLD, SIG_IGN) should not create zombies.

Revision 1.144.2.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:11 2005 UTC (19 years, 1 month ago) by yamt
Branch: yamt-km
Changes since 1.144: +13 -13 lines
Diff to previous 1.144 (colored) next main 1.145 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.117.2.8 / (download) - annotate - [select for diffs], Fri Mar 4 16:51:58 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.117.2.7: +13 -13 lines
Diff to previous 1.117.2.7 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.145 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:55 2005 UTC (19 years, 1 month ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.144: +13 -13 lines
Diff to previous 1.144 (colored)

nuke trailing whitespace

Revision 1.117.2.7 / (download) - annotate - [select for diffs], Fri Feb 4 11:47:42 2005 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.117.2.6: +3 -2 lines
Diff to previous 1.117.2.6 (colored)

Sync with HEAD.

Revision 1.144 / (download) - annotate - [select for diffs], Mon Jan 24 21:27:02 2005 UTC (19 years, 2 months ago) by dbj
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base
Branch point for: yamt-km
Changes since 1.143: +3 -2 lines
Diff to previous 1.143 (colored)

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) - annotate - [select for diffs], Tue Oct 19 15:58:04 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.117.2.5: +3 -3 lines
Diff to previous 1.117.2.5 (colored)

Sync with HEAD

Revision 1.143 / (download) - annotate - [select for diffs], Fri Oct 1 16:30:52 2004 UTC (19 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: kent-audio2
Changes since 1.142: +3 -3 lines
Diff to previous 1.142 (colored)

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) - annotate - [select for diffs], Tue Sep 21 13:35:03 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.117.2.4: +4 -4 lines
Diff to previous 1.117.2.4 (colored)

Fix the sync with head I botched.

Revision 1.117.2.4 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:02 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.117.2.3: +4 -4 lines
Diff to previous 1.117.2.3 (colored)

Sync with HEAD.

Revision 1.117.2.3 / (download) - annotate - [select for diffs], Thu Aug 12 11:42:19 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.117.2.2: +3 -3 lines
Diff to previous 1.117.2.2 (colored)

Sync with HEAD.

Revision 1.142 / (download) - annotate - [select for diffs], Sat Aug 7 03:34:37 2004 UTC (19 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.141: +3 -3 lines
Diff to previous 1.141 (colored)

Use the P_ZOMBIE macro instead of open-coding it. No functional change.

Revision 1.117.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:52:44 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.117.2.1: +312 -256 lines
Diff to previous 1.117.2.1 (colored)

Sync with HEAD

Revision 1.141 / (download) - annotate - [select for diffs], Mon May 31 15:33:38 2004 UTC (19 years, 10 months ago) by pk
Branch: MAIN
Changes since 1.140: +3 -3 lines
Diff to previous 1.140 (colored)

cwdfree() signature has been changed to accomodate fine-grained locking.

Revision 1.140 / (download) - annotate - [select for diffs], Tue May 4 21:23:39 2004 UTC (19 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.139: +118 -96 lines
Diff to previous 1.139 (colored)

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) - annotate - [select for diffs], Sun Mar 28 08:02:36 2004 UTC (20 years ago) by jmc
Branch: netbsd-1-6
Changes since 1.93.6.2: +16 -5 lines
Diff to previous 1.93.6.2 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored)

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) - annotate - [select for diffs], Sun Mar 14 01:08:47 2004 UTC (20 years, 1 month ago) by cl
Branch: 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
Changes since 1.138: +24 -21 lines
Diff to previous 1.138 (colored)

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) - annotate - [select for diffs], Fri Mar 5 07:27:22 2004 UTC (20 years, 1 month ago) by dbj
Branch: MAIN
Changes since 1.137: +8 -3 lines
Diff to previous 1.137 (colored)

add some spltty() calls around TTY_LOCK() calls that didn't have them

Revision 1.137 / (download) - annotate - [select for diffs], Tue Mar 2 09:15:26 2004 UTC (20 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.136: +8 -2 lines
Diff to previous 1.136 (colored)

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) - annotate - [select for diffs], Wed Feb 18 14:42:20 2004 UTC (20 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.135: +4 -4 lines
Diff to previous 1.135 (colored)

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) - annotate - [select for diffs], Mon Feb 9 13:11:21 2004 UTC (20 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.134: +4 -2 lines
Diff to previous 1.134 (colored)

- 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) - annotate - [select for diffs], Sat Feb 7 10:05:52 2004 UTC (20 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.133: +2 -9 lines
Diff to previous 1.133 (colored)

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) - annotate - [select for diffs], Sun Jan 4 11:33:31 2004 UTC (20 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.132: +83 -137 lines
Diff to previous 1.132 (colored)

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) - annotate - [select for diffs], Sat Jan 3 19:43:55 2004 UTC (20 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.131: +5 -5 lines
Diff to previous 1.131 (colored)

fix some comments, use NULL instead of 0 for pointer comparison

Revision 1.131 / (download) - annotate - [select for diffs], Fri Jan 2 18:52:17 2004 UTC (20 years, 3 months ago) by cl
Branch: MAIN
Changes since 1.130: +12 -9 lines
Diff to previous 1.130 (colored)

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) - annotate - [select for diffs], Sat Dec 6 04:16:33 2003 UTC (20 years, 4 months ago) by atatat
Branch: MAIN
Changes since 1.129: +14 -2 lines
Diff to previous 1.129 (colored)

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) - annotate - [select for diffs], Mon Nov 17 22:52:09 2003 UTC (20 years, 5 months ago) by cl
Branch: MAIN
Changes since 1.128: +5 -9 lines
Diff to previous 1.128 (colored)

- 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) - annotate - [select for diffs], Wed Nov 12 21:07:38 2003 UTC (20 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.127: +76 -47 lines
Diff to previous 1.127 (colored)

- 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) - annotate - [select for diffs], Thu Nov 6 09:30:13 2003 UTC (20 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.126: +16 -7 lines
Diff to previous 1.126 (colored)

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) - annotate - [select for diffs], Thu Nov 6 09:16:22 2003 UTC (20 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.125: +12 -16 lines
Diff to previous 1.125 (colored)

Remove a pile of redundant (caddr_t) casts.

Revision 1.125 / (download) - annotate - [select for diffs], Mon Nov 3 22:34:51 2003 UTC (20 years, 5 months ago) by cl
Branch: MAIN
Changes since 1.124: +2 -8 lines
Diff to previous 1.124 (colored)

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) - annotate - [select for diffs], Wed Oct 22 06:15:50 2003 UTC (20 years, 5 months ago) by jmc
Branch: 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
Changes since 1.93.6.1: +8 -8 lines
Diff to previous 1.93.6.1 (colored) to branchpoint 1.93 (colored)

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) - annotate - [select for diffs], Tue Sep 16 13:46:24 2003 UTC (20 years, 7 months ago) by cl
Branch: MAIN
Changes since 1.123: +5 -2 lines
Diff to previous 1.123 (colored)

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) - annotate - [select for diffs], Sat Sep 13 15:32:40 2003 UTC (20 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.122: +36 -4 lines
Diff to previous 1.122 (colored)

provide siginfo_t in for SIGCHLD

Revision 1.122 / (download) - annotate - [select for diffs], Thu Sep 11 01:32:09 2003 UTC (20 years, 7 months ago) by cl
Branch: MAIN
Changes since 1.121: +2 -5 lines
Diff to previous 1.121 (colored)

KNF and use f instead of s to temporarily save l_flag

Revision 1.121 / (download) - annotate - [select for diffs], Wed Aug 20 14:04:00 2003 UTC (20 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.120: +3 -3 lines
Diff to previous 1.120 (colored)

use LSDEAD instead of SDEAD for lwp state.

Revision 1.120 / (download) - annotate - [select for diffs], Wed Aug 20 13:50:53 2003 UTC (20 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

fix indent.

Revision 1.119 / (download) - annotate - [select for diffs], Thu Aug 7 16:31:44 2003 UTC (20 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.118: +3 -7 lines
Diff to previous 1.118 (colored)

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) - annotate - [select for diffs], Thu Jul 17 18:16:58 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.117: +15 -3 lines
Diff to previous 1.117 (colored)

Changes from Stephan Uphoff to patch problems with LWPs blocking when they
shouldn't, and MP.

Revision 1.117.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:26:37 2003 UTC (20 years, 9 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.117: +4 -4 lines
Diff to previous 1.117 (colored)

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) - annotate - [select for diffs], Sun Jun 29 22:31:20 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.116: +2 -2 lines
Diff to previous 1.116 (colored)

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) - annotate - [select for diffs], Sat Jun 28 14:21:53 2003 UTC (20 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.115: +4 -4 lines
Diff to previous 1.115 (colored)

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) - annotate - [select for diffs], Wed Mar 19 11:36:33 2003 UTC (21 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.114: +55 -47 lines
Diff to previous 1.114 (colored)

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) - annotate - [select for diffs], Wed Mar 12 15:26:33 2003 UTC (21 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.113: +9 -9 lines
Diff to previous 1.113 (colored)

Need to call calcru while l->l_stat == LSONPROC

Revision 1.113 / (download) - annotate - [select for diffs], Wed Mar 5 11:40:55 2003 UTC (21 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.112: +13 -11 lines
Diff to previous 1.112 (colored)

Get processes execution time before the LWPs state is changed

Revision 1.112 / (download) - annotate - [select for diffs], Sat Feb 22 01:00:14 2003 UTC (21 years, 1 month ago) by nathanw
Branch: MAIN
Changes since 1.111: +4 -3 lines
Diff to previous 1.111 (colored)

Set P_WEXIT earlier; specifically, before a pool_get(, PR_WAITOK) that
could sleep.

Pointed out by enami.

Revision 1.111 / (download) - annotate - [select for diffs], Fri Feb 21 16:32:19 2003 UTC (21 years, 1 month ago) by skrll
Branch: MAIN
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored)

typo in comment.

Revision 1.110 / (download) - annotate - [select for diffs], Mon Feb 17 23:45:47 2003 UTC (21 years, 2 months ago) by nathanw
Branch: MAIN
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored)

Test p->p_sa instead of p->p_flag & P_SA, as the latter may have been
cleared by sigexit().

Revision 1.109 / (download) - annotate - [select for diffs], Fri Feb 14 10:11:57 2003 UTC (21 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.108: +171 -119 lines
Diff to previous 1.108 (colored)

Split sys_wait4 so that code isn't duplicated in compat tree.
(approved by christos)

Revision 1.108 / (download) - annotate - [select for diffs], Mon Jan 27 20:30:32 2003 UTC (21 years, 2 months ago) by nathanw
Branch: MAIN
Changes since 1.107: +6 -4 lines
Diff to previous 1.107 (colored)

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) - annotate - [select for diffs], Sat Jan 18 10:06:26 2003 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.106: +195 -42 lines
Diff to previous 1.106 (colored)

Merge the nathanw_sa branch.

Revision 1.106.2.1 / (download) - annotate - [select for diffs], Wed Dec 18 01:06:07 2002 UTC (21 years, 4 months ago) by gmcgarry
Branch: gmcgarry_ucred
Changes since 1.106: +4 -7 lines
Diff to previous 1.106 (colored) next main 1.107 (colored)

Merge pcred and ucred, and poolify.  TBD: check backward compatibility
and factor-out some higher-level functionality.

Revision 1.89.2.27 / (download) - annotate - [select for diffs], Wed Dec 11 06:43:03 2002 UTC (21 years, 4 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.89.2.26: +16 -5 lines
Diff to previous 1.89.2.26 (colored) next main 1.90 (colored)

Sync with HEAD.

Revision 1.106 / (download) - annotate - [select for diffs], Sat Nov 30 09:59:22 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: 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
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored)

fix typo in comment. pointed out by David Sainty

Revision 1.105 / (download) - annotate - [select for diffs], Sat Nov 30 09:54:43 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.104: +4 -3 lines
Diff to previous 1.104 (colored)

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) - annotate - [select for diffs], Thu Nov 28 21:41:29 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.103: +15 -5 lines
Diff to previous 1.103 (colored)

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) - annotate - [select for diffs], Mon Nov 25 21:42:40 2002 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.25: +3 -3 lines
Diff to previous 1.89.2.25 (colored)

Get the kernel lock in lwp_exit_hook().

Revision 1.89.2.25 / (download) - annotate - [select for diffs], Mon Nov 11 22:13:41 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.24: +7 -2 lines
Diff to previous 1.89.2.24 (colored)

Catch up to -current

Revision 1.103 / (download) - annotate - [select for diffs], Wed Oct 23 09:14:16 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.102: +7 -2 lines
Diff to previous 1.102 (colored)

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) - annotate - [select for diffs], Tue Oct 22 00:18:30 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.23: +4 -3 lines
Diff to previous 1.89.2.23 (colored)

In sys_wait4, initialize q before it is used.

Found and reported by Bill Studenmund.

Revision 1.89.2.23 / (download) - annotate - [select for diffs], Fri Oct 18 02:44:51 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.22: +2 -3 lines
Diff to previous 1.89.2.22 (colored)

Catch up to -current.

Revision 1.89.2.22 / (download) - annotate - [select for diffs], Fri Oct 11 22:27:23 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.21: +5 -3 lines
Diff to previous 1.89.2.21 (colored)

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) - annotate - [select for diffs], Thu Oct 10 18:43:06 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.90.2.5: +6 -7 lines
Diff to previous 1.90.2.5 (colored) to branchpoint 1.90 (colored) next main 1.91 (colored)

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) - annotate - [select for diffs], Wed Sep 25 22:21:41 2002 UTC (21 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base
Changes since 1.101: +2 -3 lines
Diff to previous 1.101 (colored)

Don't include <sys/map.h>.

Revision 1.89.2.21 / (download) - annotate - [select for diffs], Tue Sep 17 21:22:02 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.20: +9 -4 lines
Diff to previous 1.89.2.20 (colored)

Catch up to -current.

Revision 1.90.2.5 / (download) - annotate - [select for diffs], Fri Sep 6 08:47:47 2002 UTC (21 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.90.2.4: +58 -12 lines
Diff to previous 1.90.2.4 (colored) to branchpoint 1.90 (colored)

sync kqueue branch with HEAD

Revision 1.101 / (download) - annotate - [select for diffs], Wed Sep 4 01:32:32 2002 UTC (21 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.100: +6 -6 lines
Diff to previous 1.100 (colored)

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) - annotate - [select for diffs], Thu Aug 29 05:23:06 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.93.4.1: +52 -12 lines
Diff to previous 1.93.4.1 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored)

catch up with -current.

Revision 1.100 / (download) - annotate - [select for diffs], Wed Aug 28 07:16:36 2002 UTC (21 years, 7 months ago) by gmcgarry
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.99: +7 -2 lines
Diff to previous 1.99 (colored)

MI kernel support for user-level Restartable Atomic Sequences (RAS).

Revision 1.89.2.20 / (download) - annotate - [select for diffs], Tue Aug 27 23:47:23 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.19: +6 -6 lines
Diff to previous 1.89.2.19 (colored)

Catch up to -current.

Revision 1.99 / (download) - annotate - [select for diffs], Tue Aug 13 05:42:27 2002 UTC (21 years, 8 months ago) by manu
Branch: MAIN
Changes since 1.98: +8 -8 lines
Diff to previous 1.98 (colored)

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) - annotate - [select for diffs], Tue Aug 13 02:20:05 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.18: +21 -6 lines
Diff to previous 1.89.2.18 (colored)

Catch up to -current.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Aug 7 11:13:41 2002 UTC (21 years, 8 months ago) by briggs
Branch: MAIN
Changes since 1.97: +4 -2 lines
Diff to previous 1.97 (colored)

Only include sys/pmc.h if PERFCTRS is defined.

Revision 1.97 / (download) - annotate - [select for diffs], Wed Aug 7 05:16:24 2002 UTC (21 years, 8 months ago) by briggs
Branch: MAIN
Changes since 1.96: +15 -2 lines
Diff to previous 1.96 (colored)

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) - annotate - [select for diffs], Fri Aug 2 22:45:57 2002 UTC (21 years, 8 months ago) by manu
Branch: MAIN
Changes since 1.95: +8 -8 lines
Diff to previous 1.95 (colored)

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

Revision 1.89.2.18 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:18 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.17: +26 -6 lines
Diff to previous 1.89.2.17 (colored)

Catch up to -current.

Revision 1.93.6.1 / (download) - annotate - [select for diffs], Mon Jul 29 15:37:28 2002 UTC (21 years, 8 months ago) by lukem
Branch: 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
Changes since 1.93: +26 -6 lines
Diff to previous 1.93 (colored)

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) - annotate - [select for diffs], Fri Jul 26 01:19:55 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.16: +4 -3 lines
Diff to previous 1.89.2.16 (colored)

Don't bother calling exit_lwps() if there's only one (the usual case).

Revision 1.95 / (download) - annotate - [select for diffs], Thu Jul 25 20:04:02 2002 UTC (21 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.94: +26 -6 lines
Diff to previous 1.94 (colored)

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) - annotate - [select for diffs], Wed Jul 17 18:01:37 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.15: +8 -8 lines
Diff to previous 1.89.2.15 (colored)

Whitespace.

Revision 1.89.2.15 / (download) - annotate - [select for diffs], Fri Jul 12 03:02:55 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.14: +70 -57 lines
Diff to previous 1.89.2.14 (colored)

Move LWP-cleanup code into its own function.

Revision 1.89.2.14 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:15 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.13: +2 -3 lines
Diff to previous 1.89.2.13 (colored)

No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.89.2.13 / (download) - annotate - [select for diffs], Mon Jun 24 22:10:41 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.12: +10 -10 lines
Diff to previous 1.89.2.12 (colored)

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) - annotate - [select for diffs], Sun Jun 23 17:49:27 2002 UTC (21 years, 9 months ago) by jdolecek
Branch: kqueue
Changes since 1.90.2.3: +4 -12 lines
Diff to previous 1.90.2.3 (colored) to branchpoint 1.90 (colored)

catch up with -current on kqueue branch

Revision 1.93.4.1 / (download) - annotate - [select for diffs], Thu Jun 20 16:02:19 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.93: +8 -2 lines
Diff to previous 1.93 (colored)

catch up with -current.

Revision 1.89.2.12 / (download) - annotate - [select for diffs], Thu Jun 20 03:47:12 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.11: +7 -3 lines
Diff to previous 1.89.2.11 (colored)

Catch up to -current.

Revision 1.94 / (download) - annotate - [select for diffs], Mon Jun 17 16:22:50 2002 UTC (21 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.93: +8 -2 lines
Diff to previous 1.93 (colored)

Niels Provos systrace work, ported to NetBSD by kittenz and reworked...

Revision 1.89.2.11 / (download) - annotate - [select for diffs], Mon Apr 1 21:23:30 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.10: +5 -4 lines
Diff to previous 1.89.2.10 (colored)

CVS removed a couple too many #include's.

Revision 1.89.2.10 / (download) - annotate - [select for diffs], Mon Apr 1 07:47:52 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.9: +4 -14 lines
Diff to previous 1.89.2.9 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.93 / (download) - annotate - [select for diffs], Sun Mar 17 23:41:30 2002 UTC (22 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-6-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.92: +4 -12 lines
Diff to previous 1.92 (colored)

oops, forgot to commit the caller of exithook...

Revision 1.92.4.2 / (download) - annotate - [select for diffs], Sun Mar 10 21:05:11 2002 UTC (22 years, 1 month ago) by thorpej
Branch: newlock
Changes since 1.92.4.1: +6 -3 lines
Diff to previous 1.92.4.1 (colored) to branchpoint 1.92 (colored) next main 1.93 (colored)

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) - annotate - [select for diffs], Sun Mar 10 19:08:22 2002 UTC (22 years, 1 month ago) by thorpej
Branch: newlock
Changes since 1.92: +4 -2 lines
Diff to previous 1.92 (colored)

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) - annotate - [select for diffs], Wed Feb 6 19:47:52 2002 UTC (22 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.8: +5 -12 lines
Diff to previous 1.89.2.8 (colored)

Use sa_getcachelwp() instead of manual cache frobbing in exit1().

Revision 1.90.2.3 / (download) - annotate - [select for diffs], Thu Jan 10 19:59:47 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.90.2.2: +4 -1 lines
Diff to previous 1.90.2.2 (colored) to branchpoint 1.90 (colored)

Sync kqueue branch with -current.

Revision 1.89.2.8 / (download) - annotate - [select for diffs], Sat Nov 17 00:40:29 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.7: +16 -3 lines
Diff to previous 1.89.2.7 (colored)

Set the exit hook to cause LWPs to exit.

Revision 1.89.2.7 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:35 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.6: +4 -1 lines
Diff to previous 1.89.2.6 (colored)

Catch up to -current.

Revision 1.91.4.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:18:46 2001 UTC (22 years, 5 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.91: +4 -1 lines
Diff to previous 1.91 (colored) next main 1.92 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.92 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:08 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, newlock-base, ifpoll-base
Branch point for: newlock
Changes since 1.91: +4 -1 lines
Diff to previous 1.91 (colored)

add RCSIDs

Revision 1.89.2.6 / (download) - annotate - [select for diffs], Mon Nov 5 19:59:02 2001 UTC (22 years, 5 months ago) by briggs
Branch: nathanw_sa
Changes since 1.89.2.5: +2 -2 lines
Diff to previous 1.89.2.5 (colored)

KERNEL_PROC_LOCK/KERNEL_PROC_UNLOCK take struct lwp *, not struct proc *.

Revision 1.91.2.1 / (download) - annotate - [select for diffs], Wed Sep 26 15:28:21 2001 UTC (22 years, 6 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored) next main 1.92 (colored)

* 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) - annotate - [select for diffs], Fri Aug 24 04:20:07 2001 UTC (22 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.4: +9 -1 lines
Diff to previous 1.89.2.4 (colored)

A few files and lwp/proc conversions I missed in the last big update.
GENERIC runs again.

Revision 1.89.2.4 / (download) - annotate - [select for diffs], Fri Aug 24 00:11:27 2001 UTC (22 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.3: +4 -3 lines
Diff to previous 1.89.2.3 (colored)

Catch up with -current.

Revision 1.90.2.2 / (download) - annotate - [select for diffs], Fri Aug 3 04:13:41 2001 UTC (22 years, 8 months ago) by lukem
Branch: kqueue
Changes since 1.90.2.1: +4 -3 lines
Diff to previous 1.90.2.1 (colored) to branchpoint 1.90 (colored)

update to -current

Revision 1.91 / (download) - annotate - [select for diffs], Wed Jul 18 19:10:27 2001 UTC (22 years, 9 months ago) by thorpej
Branch: 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
Changes since 1.90: +4 -3 lines
Diff to previous 1.90 (colored)

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) - annotate - [select for diffs], Tue Jul 10 13:52:10 2001 UTC (22 years, 9 months ago) by lukem
Branch: kqueue
Changes since 1.90: +6 -1 lines
Diff to previous 1.90 (colored)

add calls to KNOTE(9) as appropriate

Revision 1.89.2.3 / (download) - annotate - [select for diffs], Mon Jul 9 22:31:55 2001 UTC (22 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.2: +7 -5 lines
Diff to previous 1.89.2.2 (colored)

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) - annotate - [select for diffs], Mon Apr 9 01:57:52 2001 UTC (23 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.89.2.1: +9 -1 lines
Diff to previous 1.89.2.1 (colored)

Catch up with -current.

Revision 1.74.2.5 / (download) - annotate - [select for diffs], Mon Mar 12 13:31:36 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.74.2.4: +15 -12 lines
Diff to previous 1.74.2.4 (colored) to branchpoint 1.74 (colored) next main 1.75 (colored)

Sync with HEAD.

Revision 1.89.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:49:39 2001 UTC (23 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.89: +155 -35 lines
Diff to previous 1.89 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.90 / (download) - annotate - [select for diffs], Mon Mar 5 20:38:21 2001 UTC (23 years, 1 month ago) by fvdl
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: kqueue
Changes since 1.89: +5 -1 lines
Diff to previous 1.89 (colored)

Avoid spinning forever when hardclock() wants to grab the kernel lock
held by the reaper. From Bill Sommerfeld.

Revision 1.89 / (download) - annotate - [select for diffs], Mon Feb 26 21:09:57 2001 UTC (23 years, 1 month ago) by lukem
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.88: +11 -12 lines
Diff to previous 1.88 (colored)

minor KNF

Revision 1.74.2.4 / (download) - annotate - [select for diffs], Sun Feb 11 19:16:46 2001 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.74.2.3: +1 -20 lines
Diff to previous 1.74.2.3 (colored) to branchpoint 1.74 (colored)

Sync with HEAD.

Revision 1.88 / (download) - annotate - [select for diffs], Sat Feb 10 05:05:27 2001 UTC (23 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.87: +1 -20 lines
Diff to previous 1.87 (colored)

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) - annotate - [select for diffs], Fri Jan 5 17:36:38 2001 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.74.2.2: +3 -3 lines
Diff to previous 1.74.2.2 (colored) to branchpoint 1.74 (colored)

Sync with HEAD

Revision 1.87 / (download) - annotate - [select for diffs], Fri Dec 22 22:59:00 2000 UTC (23 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.86: +4 -4 lines
Diff to previous 1.86 (colored)

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) - annotate - [select for diffs], Wed Nov 22 16:05:19 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.74.2.1: +7 -1 lines
Diff to previous 1.74.2.1 (colored) to branchpoint 1.74 (colored)

Sync with HEAD.

Revision 1.74.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:08:59 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.74: +24 -34 lines
Diff to previous 1.74 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.86 / (download) - annotate - [select for diffs], Tue Nov 7 12:41:52 2000 UTC (23 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.85: +7 -1 lines
Diff to previous 1.85 (colored)

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) - annotate - [select for diffs], Tue Aug 22 17:28:28 2000 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.84: +6 -2 lines
Diff to previous 1.84 (colored)

Define the MI parts of the "big kernel lock" perimeter.  From
Bill Sommerfeld.

Revision 1.84 / (download) - annotate - [select for diffs], Sat Aug 12 22:41:55 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored)

Don't bother with a trampoline to start the pagedaemon and
reaper threads.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Aug 12 22:26:01 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored)

In reaper(), use ltsleep() instead of simple_unlock()/tsleep().

Revision 1.82 / (download) - annotate - [select for diffs], Tue Aug 1 04:57:30 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.81: +7 -18 lines
Diff to previous 1.81 (colored)

ANSI'ify.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jun 27 17:41:18 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.80: +1 -3 lines
Diff to previous 1.80 (colored)

remove include of <vm/vm.h>

Revision 1.80 / (download) - annotate - [select for diffs], Mon Jun 26 14:21:14 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.79: +1 -2 lines
Diff to previous 1.79 (colored)

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) - annotate - [select for diffs], Sat May 27 00:11:12 2000 UTC (23 years, 10 months ago) by sommerfeld
Branch: 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
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

Remove a gratuitous use of curproc

Revision 1.78 / (download) - annotate - [select for diffs], Mon May 8 19:58:17 2000 UTC (23 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored)

__predict_false() the test for init exiting.

Revision 1.77 / (download) - annotate - [select for diffs], Mon May 8 19:06:36 2000 UTC (23 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

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) - annotate - [select for diffs], Thu Mar 30 09:27:11 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.75: +11 -11 lines
Diff to previous 1.75 (colored)

Get rid of register declarations.

Revision 1.75 / (download) - annotate - [select for diffs], Thu Mar 23 06:30:11 2000 UTC (24 years ago) by thorpej
Branch: MAIN
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

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) - annotate - [select for diffs], Tue Sep 28 14:47:03 1999 UTC (24 years, 6 months ago) by bouyer
Branch: 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
Changes since 1.73: +2 -3 lines
Diff to previous 1.73 (colored)

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) - annotate - [select for diffs], Mon Aug 2 22:19:12 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.65.4.1: +54 -23 lines
Diff to previous 1.65.4.1 (colored) to branchpoint 1.65 (colored) next main 1.66 (colored)

Update from trunk.

Revision 1.73 / (download) - annotate - [select for diffs], Thu Jul 22 21:08:31 1999 UTC (24 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.72: +8 -2 lines
Diff to previous 1.72 (colored)

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) - annotate - [select for diffs], Thu Jul 22 18:13:37 1999 UTC (24 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.71: +31 -12 lines
Diff to previous 1.71 (colored)

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) - annotate - [select for diffs], Tue Jul 20 21:54:05 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.70: +9 -7 lines
Diff to previous 1.70 (colored)

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) - annotate - [select for diffs], Thu Jul 15 23:18:43 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.69: +9 -5 lines
Diff to previous 1.69 (colored)

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) - annotate - [select for diffs], Mon Jun 21 01:24:01 1999 UTC (24 years, 9 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.65: +22 -7 lines
Diff to previous 1.65 (colored)

Sync w/ -current.

Revision 1.69 / (download) - annotate - [select for diffs], Thu May 13 17:28:30 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

Fix a (currently) harmless brian-o in last.

Revision 1.68 / (download) - annotate - [select for diffs], Thu May 13 00:59:04 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.67: +16 -7 lines
Diff to previous 1.67 (colored)

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) - annotate - [select for diffs], Fri Apr 30 21:23:49 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.66: +6 -1 lines
Diff to previous 1.66 (colored)

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) - annotate - [select for diffs], Fri Apr 30 20:54:04 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.65: +2 -1 lines
Diff to previous 1.65 (colored)

Oops, forgot to commit this one.  Free the cwdinfo on exit.

Revision 1.65 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:22 1999 UTC (25 years ago) by mrg
Branch: 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
Changes since 1.64: +1 -14 lines
Diff to previous 1.64 (colored)

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) - annotate - [select for diffs], Tue Feb 23 02:57:18 1999 UTC (25 years, 1 month ago) by ross
Branch: MAIN
Changes since 1.63: +3 -6 lines
Diff to previous 1.63 (colored)

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) - annotate - [select for diffs], Thu Feb 4 06:23:08 1999 UTC (25 years, 2 months ago) by cgd
Branch: netbsd-1-3
Changes since 1.45: +6 -1 lines
Diff to previous 1.45 (colored) next main 1.46 (colored)

pull up revs 1.62-1.63 from trunk (bad)

Revision 1.63 / (download) - annotate - [select for diffs], Sat Jan 23 22:23:19 1999 UTC (25 years, 2 months ago) by sommerfe
Branch: MAIN
Changes since 1.62: +6 -7 lines
Diff to previous 1.62 (colored)

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) - annotate - [select for diffs], Sat Jan 23 08:25:36 1999 UTC (25 years, 2 months ago) by ross
Branch: MAIN
Changes since 1.61: +7 -1 lines
Diff to previous 1.61 (colored)

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) - annotate - [select for diffs], Wed Nov 11 22:37:13 1998 UTC (25 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.60: +1 -7 lines
Diff to previous 1.60 (colored)

Remove some code accidentally readded when Christos implement P_NOCLDWAIT.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Oct 19 22:19:26 1998 UTC (25 years, 6 months ago) by tron
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.59: +2 -1 lines
Diff to previous 1.59 (colored)

Defopt SYSVMSG, SYSVSEM and SYSVSHM.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Sep 18 18:48:22 1998 UTC (25 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.58: +24 -1 lines
Diff to previous 1.58 (colored)

Add NOCLDWAIT (from FreeBSD)

Revision 1.58 / (download) - annotate - [select for diffs], Sat Sep 12 17:20:02 1998 UTC (25 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.57: +7 -7 lines
Diff to previous 1.57 (colored)

Make copyrights consistent; fix weird/trailing spaces add missing (c) etc.

Revision 1.57 / (download) - annotate - [select for diffs], Fri Sep 11 12:50:10 1998 UTC (25 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.56: +4 -3 lines
Diff to previous 1.56 (colored)

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) - annotate - [select for diffs], Tue Sep 8 23:57:58 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.55: +108 -17 lines
Diff to previous 1.55 (colored)

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) - annotate - [select for diffs], Tue Sep 1 01:02:33 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.54: +3 -4 lines
Diff to previous 1.54 (colored)

Use the pool allocator and the "nointr" pool page allocator for rusage
structures.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Aug 31 23:20:16 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

Use the pool allocator and "nointr" pool page allocator for pcred and
plimit structures.

Revision 1.51.2.1 / (download) - annotate - [select for diffs], Sat Aug 8 03:06:54 1998 UTC (25 years, 8 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored) next main 1.52 (colored)

Revert cdevsw mmap routines to return int.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Aug 2 04:41:32 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.52: +3 -2 lines
Diff to previous 1.52 (colored)

Use a pool for proc structures.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Jul 31 22:50:49 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

fix sizeofs so they comply with the KNF style guide. yes, it is pedantic.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Jun 25 21:17:16 1998 UTC (25 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.50: +2 -1 lines
Diff to previous 1.50 (colored)

defopt KTRACE

Revision 1.50 / (download) - annotate - [select for diffs], Sat May 2 18:33:20 1998 UTC (25 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.49: +3 -4 lines
Diff to previous 1.49 (colored)

New fktrace syscall from Darren Reed [with fixes from me]

Revision 1.49 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:28 1998 UTC (26 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

Merge with Lite2 + local changes

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:12:56 1998 UTC (26 years, 1 month ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +17 -56 lines
Diff to previous 1.1.1.2 (colored)

Import 4.4BSD-Lite2

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:09:39 1998 UTC (26 years, 1 month ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1.1.1: +492 -1 lines
Diff to previous 1.1.1.1 (colored)

Import 4.4BSD-Lite for reference

Revision 1.48 / (download) - annotate - [select for diffs], Tue Feb 10 14:09:28 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.47: +3 -1 lines
Diff to previous 1.47 (colored)

- add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Feb 5 07:59:49 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.46: +11 -1 lines
Diff to previous 1.46 (colored)

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) - annotate - [select for diffs], Sat Jan 3 02:48:43 1998 UTC (26 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

Don't call shmexit() if the vmspace ref count is not 1.  Update for new
argument to shmexit().

Revision 1.45.6.1 / (download) - annotate - [select for diffs], Mon Sep 8 23:10:33 1997 UTC (26 years, 7 months ago) by thorpej
Branch: thorpej-signal
Changes since 1.45: +9 -2 lines
Diff to previous 1.45 (colored) next main 1.46 (colored)

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) - annotate - [select for diffs], Mon Apr 28 13:17:05 1997 UTC (26 years, 11 months ago) by mycroft
Branch: 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
Changes since 1.44: +15 -9 lines
Diff to previous 1.44 (colored)

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) - annotate - [select for diffs], Mon Apr 28 04:49:27 1997 UTC (26 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.43: +3 -2 lines
Diff to previous 1.43 (colored)

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) - annotate - [select for diffs], Mon Apr 28 02:51:41 1997 UTC (26 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.42: +1 -6 lines
Diff to previous 1.42 (colored)

Remove remnants of P_FSTRACE, which is no longer used.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Apr 23 18:59:53 1997 UTC (26 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.41: +1 -5 lines
Diff to previous 1.41 (colored)

Nuke the old COMPAT_09 truncation of UIDs, GIDs, process and process group IDs.

Revision 1.41.4.2 / (download) - annotate - [select for diffs], Fri Feb 7 05:33:10 1997 UTC (27 years, 2 months ago) by mikel
Branch: is-newarp
Changes since 1.41.4.1: +419 -0 lines
Diff to previous 1.41.4.1 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

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 (27 years, 2 months ago) by mikel
Branch: is-newarp
Changes since 1.41: +0 -419 lines
FILE REMOVED

file kern_exit.c was added on branch is-newarp on 1997-02-07 05:33:10 +0000

Revision 1.41 / (download) - annotate - [select for diffs], Fri Feb 7 05:33:09 1997 UTC (27 years, 2 months ago) by mikel
Branch: MAIN
CVS Tags: mrg-vm-swap, is-newarp-before-merge, is-newarp-base
Branch point for: is-newarp
Changes since 1.40: +2 -3 lines
Diff to previous 1.40 (colored)

check options argument to wait{3,4,pid}(); from Klaus Klein in PR 3182.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Oct 17 16:31:54 1996 UTC (27 years, 6 months ago) by perry
Branch: MAIN
CVS Tags: thorpej-setroot
Changes since 1.39: +2 -5 lines
Diff to previous 1.39 (colored)

removed #ifdef tahoe

Revision 1.39 / (download) - annotate - [select for diffs], Mon Apr 22 01:38:25 1996 UTC (27 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Changes since 1.38: +1 -2 lines
Diff to previous 1.38 (colored)

remove include of <sys/cpu.h>

Revision 1.38 / (download) - annotate - [select for diffs], Fri Feb 9 18:59:29 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.37: +8 -3 lines
Diff to previous 1.37 (colored)

More proto fixes

Revision 1.37 / (download) - annotate - [select for diffs], Fri Feb 9 01:19:21 1996 UTC (28 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.36: +9 -5 lines
Diff to previous 1.36 (colored)

If parent is in ppwait, wake it up early to prevent deadlock.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Feb 4 02:15:25 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.35: +11 -8 lines
Diff to previous 1.35 (colored)

First pass at prototyping

Revision 1.35 / (download) - annotate - [select for diffs], Sun Dec 24 11:23:33 1995 UTC (28 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.34: +9 -9 lines
Diff to previous 1.34 (colored)

Remove the process from zombproc and its parent's child list before freeing
its resources.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Dec 9 04:09:32 1995 UTC (28 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.33: +2 -3 lines
Diff to previous 1.33 (colored)

Add a limfree(), and use it.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Oct 7 06:28:13 1995 UTC (28 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.32: +5 -5 lines
Diff to previous 1.32 (colored)

Prefix names of system call implementation functions with `sys_'.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Sep 27 20:26:51 1995 UTC (28 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

Fix typo in declaration of exit(), pointed out by Chris Demetriou.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Sep 19 21:44:59 1995 UTC (28 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +16 -13 lines
Diff to previous 1.30 (colored)

Make system calls conform to a standard prototype and bring those
prototypes into scope.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Jun 24 20:33:59 1995 UTC (28 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.29: +4 -76 lines
Diff to previous 1.29 (colored)

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) - annotate - [select for diffs], Sat Dec 24 15:07:26 1994 UTC (29 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.28: +4 -2 lines
Diff to previous 1.28 (colored)

various cleanups for -Wall.  some inspired by James Jegers.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Oct 30 21:47:39 1994 UTC (29 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

be more careful with types, also pull in headers where necessary.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Oct 20 22:54:35 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.26: +2 -4 lines
Diff to previous 1.26 (colored)

Minor change; use proc_reparent().

Revision 1.26 / (download) - annotate - [select for diffs], Thu Oct 20 04:22:45 1994 UTC (29 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.25: +64 -50 lines
Diff to previous 1.25 (colored)

update for new syscall args description mechanism

Revision 1.25 / (download) - annotate - [select for diffs], Tue Aug 30 03:05:33 1994 UTC (29 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.24: +15 -54 lines
Diff to previous 1.24 (colored)

Convert process, file, and namei lists and hash tables to use queue.h.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jun 29 06:32:26 1994 UTC (29 years, 9 months ago) by cgd
Branch: 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
Changes since 1.23: +507 -1 lines
Diff to previous 1.23 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.23 / (download) - annotate - [select for diffs], Thu May 19 05:57:44 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.22: +1 -1 lines
Diff to previous 1.22 (colored)

update to lite

Revision 1.22 / (download) - annotate - [select for diffs], Tue May 17 08:03:05 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.21: +1 -1 lines
Diff to previous 1.21 (colored)

forgot a cast, and killed phil!

Revision 1.21 / (download) - annotate - [select for diffs], Fri May 13 09:29:06 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.20: +1 -1 lines
Diff to previous 1.20 (colored)

SHUT UP!

Revision 1.20 / (download) - annotate - [select for diffs], Thu May 5 22:28:44 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.19: +1 -1 lines
Diff to previous 1.19 (colored)

a conditional p_regs!

Revision 1.19 / (download) - annotate - [select for diffs], Thu May 5 08:46:53 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.18: +1 -1 lines
Diff to previous 1.18 (colored)

Remove now-bogus cast.

Revision 1.18 / (download) - annotate - [select for diffs], Thu May 5 05:38:07 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.17: +1 -1 lines
Diff to previous 1.17 (colored)

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) - annotate - [select for diffs], Wed May 4 03:41:52 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.16: +1 -1 lines
Diff to previous 1.16 (colored)

Rename a lot of process flags.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Apr 29 04:41:30 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.15: +1 -1 lines
Diff to previous 1.15 (colored)

kill syscall name aliases. no user-visible changes

Revision 1.15 / (download) - annotate - [select for diffs], Fri Feb 11 03:09:17 1994 UTC (30 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.14: +1 -1 lines
Diff to previous 1.14 (colored)

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) - annotate - [select for diffs], Thu Jan 20 21:22:47 1994 UTC (30 years, 2 months ago) by ws
Branch: MAIN
Changes since 1.13: +1 -1 lines
Diff to previous 1.13 (colored)

Make procfs really work for debugging.
Implement not & notepg files in procfs.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jan 4 11:30:26 1994 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.12: +1 -1 lines
Diff to previous 1.12 (colored)

field name change

Revision 1.12 / (download) - annotate - [select for diffs], Wed Dec 22 13:42:27 1993 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.11: +1 -1 lines
Diff to previous 1.11 (colored)

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) - annotate - [select for diffs], Sat Dec 18 04:20:31 1993 UTC (30 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.10: +1 -1 lines
Diff to previous 1.10 (colored)

Canonicalize all #includes.

Revision 1.7.4.6 / (download) - annotate - [select for diffs], Sun Nov 14 20:31:44 1993 UTC (30 years, 5 months ago) by mycroft
Branch: magnum
Changes since 1.7.4.5: +1 -1 lines
Diff to previous 1.7.4.5 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

Canonicalize all #includes.

Revision 1.7.4.5 / (download) - annotate - [select for diffs], Sun Nov 14 14:47:05 1993 UTC (30 years, 5 months ago) by cgd
Branch: magnum
Changes since 1.7.4.4: +1 -1 lines
Diff to previous 1.7.4.4 (colored) to branchpoint 1.7 (colored)

Update from trunk:
Add the System V message queue and semaphore facilities.  Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>

Revision 1.10 / (download) - annotate - [select for diffs], Sun Nov 14 13:22:55 1993 UTC (30 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.9: +1 -1 lines
Diff to previous 1.9 (colored)

Add the System V message queue and semaphore facilities.  Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>

Revision 1.7.4.4 / (download) - annotate - [select for diffs], Tue Oct 26 13:02:55 1993 UTC (30 years, 5 months ago) by mycroft
Branch: magnum
Changes since 1.7.4.3: +1 -1 lines
Diff to previous 1.7.4.3 (colored) to branchpoint 1.7 (colored)

Merge changes from trunk.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Oct 20 23:04:33 1993 UTC (30 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (colored)

ACCOUNTING define doesn't exist any more...

Revision 1.7.4.3 / (download) - annotate - [select for diffs], Thu Sep 30 17:03:59 1993 UTC (30 years, 6 months ago) by deraadt
Branch: magnum
Changes since 1.7.4.2: +1 -1 lines
Diff to previous 1.7.4.2 (colored) to branchpoint 1.7 (colored)

calcru() calculates times from ticks.

Revision 1.7.4.2 / (download) - annotate - [select for diffs], Fri Sep 24 08:51:00 1993 UTC (30 years, 6 months ago) by mycroft
Branch: magnum
Changes since 1.7.4.1: +1 -1 lines
Diff to previous 1.7.4.1 (colored) to branchpoint 1.7 (colored)

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) - annotate - [select for diffs], Tue Sep 14 18:24:13 1993 UTC (30 years, 7 months ago) by mycroft
Branch: magnum
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

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) - annotate - [select for diffs], Thu Sep 9 22:03:59 1993 UTC (30 years, 7 months ago) by phil
Branch: MAIN
CVS Tags: magnum-base
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

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) - annotate - [select for diffs], Tue Jul 13 22:13:20 1993 UTC (30 years, 9 months ago) by cgd
Branch: 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
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)

break args structs out, into syscallname_args structs, so gcc2 doesn't
whine so much.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jul 4 23:30:35 1993 UTC (30 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

change exit() to kexit(), so prototypes are "safe" with stdio.h, etc.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jun 27 06:01:34 1993 UTC (30 years, 9 months ago) by andrew
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)

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) - annotate - [select for diffs], Sat May 22 11:41:36 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

add include of select.h if necessary for protos, or delete if extraneous

Revision 1.3 / (download) - annotate - [select for diffs], Tue May 18 18:19:15 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

make kernel select interface be one-stop shopping & clean it all up.

Revision 1.2 / (download) - annotate - [select for diffs], Sun May 2 09:23:15 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

add barebones accounting, enabled w/"options ACCOUNTING", via /dev/acct

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8, WFJ-386bsd-01
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month ago) by cgd
Branch: MAIN

Initial revision

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




CVSweb <webmaster@jp.NetBSD.org>