The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.366 / (download) - annotate - [select for diffs], Wed Nov 22 13:18:48 2023 UTC (3 months ago) by riastradh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.365: +4 -3 lines
Diff to previous 1.365 (colored)

kpause(9): KASSERT -> KASSERTMSG

PR kern/57718 (might help to diagnose manifestations of the problem)

Revision 1.365 / (download) - annotate - [select for diffs], Sun Oct 15 10:29:10 2023 UTC (4 months, 1 week ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.364: +14 -13 lines
Diff to previous 1.364 (colored)

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

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

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

Remove it in ddb/db_syncobj.h too.

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

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

Revision 1.363 / (download) - annotate - [select for diffs], Thu Oct 5 19:28:30 2023 UTC (4 months, 3 weeks ago) by ad
Branch: MAIN
Changes since 1.362: +3 -4 lines
Diff to previous 1.362 (colored)

Resolve !MULTIPROCESSOR build problem with the nasty kernel lock macros.

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

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

Revision 1.361 / (download) - annotate - [select for diffs], Wed Oct 4 20:28:06 2023 UTC (4 months, 3 weeks ago) by ad
Branch: MAIN
Changes since 1.360: +5 -4 lines
Diff to previous 1.360 (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.360 / (download) - annotate - [select for diffs], Sat Sep 23 20:23:07 2023 UTC (5 months ago) by ad
Branch: MAIN
Changes since 1.359: +3 -2 lines
Diff to previous 1.359 (colored)

Sigh..  Adjust previous to work as intended.  The boosted LWP priority
didn't persist as far as the run queue because l_syncobj gets reset
earlier than I recalled.

Revision 1.359 / (download) - annotate - [select for diffs], Sat Sep 23 18:48:04 2023 UTC (5 months ago) by ad
Branch: MAIN
Changes since 1.358: +6 -14 lines
Diff to previous 1.358 (colored)

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

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

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

Revision 1.358 / (download) - annotate - [select for diffs], Mon Jul 17 12:54:29 2023 UTC (7 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.357: +5 -2 lines
Diff to previous 1.357 (colored)

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

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

Revision 1.357 / (download) - annotate - [select for diffs], Thu Jul 13 13:33:55 2023 UTC (7 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.356: +56 -7 lines
Diff to previous 1.356 (colored)

kern: Print more detailed monotonic-clock-went-backwards messages.

Let's try harder to track this down.

XXX Should add dtrace probes.

Revision 1.356 / (download) - annotate - [select for diffs], Fri Jun 23 22:49:38 2023 UTC (8 months ago) by riastradh
Branch: MAIN
Changes since 1.355: +3 -3 lines
Diff to previous 1.355 (colored)

tsleep: Comment out kernel lock assertion for now.

Breaks tpm(4) which breaks boot on a lot of systems.  tpm(4)
shouldn't be using tsleep; it doesn't appear to even have an
interrupt handler for wakeups, so it could get by with kpause.  If it
ever did sprout an interrupt handler it should use condvar(9) anyway.
But for now I don't have time to fix it tonight.

Revision 1.355 / (download) - annotate - [select for diffs], Fri Jun 23 21:19:03 2023 UTC (8 months ago) by riastradh
Branch: MAIN
Changes since 1.354: +3 -2 lines
Diff to previous 1.354 (colored)

tsleep(9): Assert kernel lock held.

This is never safe to use without the kernel lock.  It should only
appear in legacy subsystems that still run with the kernel lock.

Revision 1.354 / (download) - annotate - [select for diffs], Sun Apr 9 12:16:42 2023 UTC (10 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.353: +3 -3 lines
Diff to previous 1.353 (colored)

kpause(9): Simplify assertion.  No functional change intended.

Revision 1.353 / (download) - annotate - [select for diffs], Mon Dec 5 15:47:14 2022 UTC (14 months, 3 weeks ago) by martin
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.352: +4 -3 lines
Diff to previous 1.352 (colored)

If no more softints are pending on this cpu, clear ci_want_resched
(instead of just assingning ci_data.cpu_softints to it - the bitsets
are not the same).
Discussed on tech-kern "ci_want_resched bits vs. MD ci_data.cpu_softints bits".

Revision 1.352 / (download) - annotate - [select for diffs], Wed Oct 26 23:23:28 2022 UTC (16 months ago) by riastradh
Branch: MAIN
Changes since 1.351: +3 -3 lines
Diff to previous 1.351 (colored)

kern/kern_synch.c: Get averunnable from sys/resource.h.

Revision 1.351 / (download) - annotate - [select for diffs], Wed Jun 29 22:27:01 2022 UTC (19 months, 4 weeks ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.350: +5 -5 lines
Diff to previous 1.350 (colored)

sleepq(9): Pass syncobj through to sleepq_block.

Previously the usage pattern was:

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

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

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

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

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

Revision 1.350 / (download) - annotate - [select for diffs], Thu Mar 10 12:21:25 2022 UTC (23 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.349: +10 -5 lines
Diff to previous 1.349 (colored)

kern: Fix synchronization of clearing LP_RUNNING and lwp_free.

1. membar_sync is not necessary here -- only a store-release is
   required.

2. membar_consumer _before_ loading l->l_pflag is not enough; a
   load-acquire is required.

Actually it's not really clear to me why any barriers are needed, since
the store-release and load-acquire should be implied by releasing and
acquiring the lwp lock (and maybe we could spin with the lock instead
of reading l->l_pflag unlocked).  But maybe there's something subtle
about access to l->l_mutex that's not obvious here.

Revision 1.349 / (download) - annotate - [select for diffs], Sat May 23 23:42:43 2020 UTC (3 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.348: +6 -6 lines
Diff to previous 1.348 (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.348 / (download) - annotate - [select for diffs], Wed May 20 20:59:31 2020 UTC (3 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.347: +3 -3 lines
Diff to previous 1.347 (colored)

future-proof-ness

Revision 1.315.2.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:42 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.315.2.3: +9 -5 lines
Diff to previous 1.315.2.3 (colored) to branchpoint 1.315 (colored) next main 1.316 (colored)

Sync with HEAD

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

Sync with HEAD

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

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

Revision 1.315.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:04 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.315.2.2: +1 -0 lines
Diff to previous 1.315.2.2 (colored) to branchpoint 1.315 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.315.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:51 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.315.2.1: +240 -257 lines
Diff to previous 1.315.2.1 (colored) to branchpoint 1.315 (colored)

Merge changes from current as of 20200406

Revision 1.346 / (download) - annotate - [select for diffs], Sat Apr 4 20:21:53 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.345: +14 -25 lines
Diff to previous 1.345 (colored)

preempt_needed(), preempt_point(): simplify the definition of these and
key on ci_want_resched in the interests of interactive response.

Revision 1.345 / (download) - annotate - [select for diffs], Thu Mar 26 19:42:39 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.344: +6 -12 lines
Diff to previous 1.344 (colored)

Leave the idle LWPs in state LSIDL even when running, so they don't mess up
output from ps/top/etc.  Correctness isn't at stake, LWPs in other states
are temporarily on the CPU at times too (e.g.  LSZOMB, LSSLEEP).

Revision 1.344 / (download) - annotate - [select for diffs], Sat Mar 14 20:23:51 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.343: +2 -42 lines
Diff to previous 1.343 (colored)

Make page waits (WANTED vs BUSY) interlocked by pg->interlock.  Gets RW
locks out of the equation for sleep/wakeup, and allows observing+waiting
for busy pages when holding only a read lock.  Proposed on tech-kern.

Revision 1.343 / (download) - annotate - [select for diffs], Sat Mar 14 18:08:39 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.342: +54 -7 lines
Diff to previous 1.342 (colored)

- Hide the details of SPCF_SHOULDYIELD and related behind a couple of small
  functions: preempt_point() and preempt_needed().

- preempt(): if the LWP has exceeded its timeslice in kernel, strip it of
  any priority boost gained earlier from blocking.

Revision 1.334.2.6 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:03 2020 UTC (3 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.334.2.5: +88 -24 lines
Diff to previous 1.334.2.5 (colored) to branchpoint 1.334 (colored) next main 1.335 (colored)

Sync with head.

Revision 1.342 / (download) - annotate - [select for diffs], Sun Feb 23 16:27:09 2020 UTC (4 years ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.341: +13 -7 lines
Diff to previous 1.341 (colored)

kpause(): is only awoken via timeout or signal, so use SOBJ_SLEEPQ_NULL like
_lwp_park() does, and dispense with the hashed sleepq & lock.

Revision 1.341 / (download) - annotate - [select for diffs], Sun Feb 23 15:46:41 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.340: +43 -2 lines
Diff to previous 1.340 (colored)

UVM locking changes, proposed on tech-kern:

- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.

Revision 1.340 / (download) - annotate - [select for diffs], Sun Feb 16 21:31:19 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.339: +19 -9 lines
Diff to previous 1.339 (colored)

nextlwp(): fix a couple of locking bugs including one I introduced yesterday,
and add comments around same.

Revision 1.339 / (download) - annotate - [select for diffs], Sat Feb 15 18:12:15 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.338: +23 -16 lines
Diff to previous 1.338 (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.334.2.5 / (download) - annotate - [select for diffs], Sat Jan 25 22:38:51 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.334.2.4: +3 -2 lines
Diff to previous 1.334.2.4 (colored) to branchpoint 1.334 (colored)

Sync with head.

Revision 1.334.2.4 / (download) - annotate - [select for diffs], Sat Jan 25 21:45:00 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.334.2.3: +2 -3 lines
Diff to previous 1.334.2.3 (colored) to branchpoint 1.334 (colored)

Remove unintentional differences to base.

Revision 1.338 / (download) - annotate - [select for diffs], Fri Jan 24 20:05:15 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2
Changes since 1.337: +4 -3 lines
Diff to previous 1.337 (colored)

Carefully put kernel_lock back the way it was, and add a comment hinting
that changing it is not a good idea, and hopefully nobody will ever try to
change it ever again.

Revision 1.334.2.3 / (download) - annotate - [select for diffs], Thu Jan 23 12:17:08 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.334.2.2: +2 -5 lines
Diff to previous 1.334.2.2 (colored) to branchpoint 1.334 (colored)

Back out previous.

Revision 1.337 / (download) - annotate - [select for diffs], Wed Jan 22 13:19:33 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.336: +4 -4 lines
Diff to previous 1.336 (colored)

- DIAGNOSTIC: check for leaked kernel_lock in mi_switch().

- Now that ci_biglock_wanted is set later, explicitly disable preemption
  while acquiring kernel_lock.  It was blocked in a roundabout way
  previously.

Reported-by: syzbot+43111d810160fb4b978b@syzkaller.appspotmail.com
Reported-by: syzbot+f5b871bd00089bf97286@syzkaller.appspotmail.com
Reported-by: syzbot+cd1f15eee5b1b6d20078@syzkaller.appspotmail.com
Reported-by: syzbot+fb945a331dabd0b6ba9e@syzkaller.appspotmail.com
Reported-by: syzbot+53a0c2342b361db25240@syzkaller.appspotmail.com
Reported-by: syzbot+552222a952814dede7d1@syzkaller.appspotmail.com
Reported-by: syzbot+c7104a72172b0f9093a4@syzkaller.appspotmail.com
Reported-by: syzbot+efbd30c6ca0f7d8440e8@syzkaller.appspotmail.com
Reported-by: syzbot+330a421bd46794d8b750@syzkaller.appspotmail.com

Revision 1.334.2.2 / (download) - annotate - [select for diffs], Sun Jan 19 21:08:29 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.334.2.1: +6 -2 lines
Diff to previous 1.334.2.1 (colored) to branchpoint 1.334 (colored)

Adaptive rwlocks proposed on tech-kern and working well on this branch
with vnode locks.

Revision 1.334.2.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:35 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.334: +54 -153 lines
Diff to previous 1.334 (colored)

Sync with head.

Revision 1.336 / (download) - annotate - [select for diffs], Thu Jan 9 16:35:03 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base1
Changes since 1.335: +4 -2 lines
Diff to previous 1.335 (colored)

- Many small tweaks to the SMT awareness in the scheduler.  It does a much
  better job now at keeping all physical CPUs busy, while using the extra
  threads to help out.  In particular, during preempt() if we're using SMT,
  try to find a better CPU to run on and teleport curlwp there.

- Change the CPU topology stuff so it can work on asymmetric systems.  This
  mainly entails rearranging one of the CPU lists so it makes sense in all
  configurations.

- Add a parameter to cpu_topology_set() to note that a CPU is "slow", for
  where there are fast CPUs and slow CPUs, like with the Rockwell RK3399.
  Extend the SMT awareness to try and handle that situation too (keep fast
  CPUs busy, use slow CPUs as helpers).

Revision 1.335 / (download) - annotate - [select for diffs], Wed Jan 8 17:38:42 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.334: +52 -153 lines
Diff to previous 1.334 (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.334 / (download) - annotate - [select for diffs], Sat Dec 21 11:54:04 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.333: +5 -3 lines
Diff to previous 1.333 (colored)

schedstate_percpu: add new flag SPCF_IDLE as a cheap and easy way to
determine that a CPU is currently idle.

Revision 1.333 / (download) - annotate - [select for diffs], Fri Dec 20 21:52:51 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.332: +4 -4 lines
Diff to previous 1.332 (colored)

Use CPU_COUNT() to update nswtch.  No functional change.

Revision 1.332 / (download) - annotate - [select for diffs], Mon Dec 16 20:59:39 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.331: +4 -3 lines
Diff to previous 1.331 (colored)

kpreempt_disabled(): softint LWPs aren't preemptable.

Revision 1.331 / (download) - annotate - [select for diffs], Sat Dec 7 21:14:36 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.330: +3 -4 lines
Diff to previous 1.330 (colored)

mi_switch: move an over eager KASSERT defeated by kernel preemption.
Discovered during automated test.

Revision 1.330 / (download) - annotate - [select for diffs], Sat Dec 7 17:36:33 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.329: +7 -3 lines
Diff to previous 1.329 (colored)

mi_switch: move LOCKDEBUG_BARRIER later to accomodate holding two locks
on entry.

Revision 1.329 / (download) - annotate - [select for diffs], Fri Dec 6 21:36:10 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.328: +39 -37 lines
Diff to previous 1.328 (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.328 / (download) - annotate - [select for diffs], Tue Dec 3 05:07:48 2019 UTC (4 years, 2 months ago) by riastradh
Branch: MAIN
Changes since 1.327: +2 -6 lines
Diff to previous 1.327 (colored)

Rip out pserialize(9) logic now that the RCU patent has expired.

pserialize_perform() is now basically just xc_barrier(XC_HIGHPRI).
No more tentacles throughout the scheduler.  Simplify the psz read
count for diagnostic assertions by putting it unconditionally into
cpu_info.

From rmind@, tidied up by me.

Revision 1.327 / (download) - annotate - [select for diffs], Sun Dec 1 15:34:46 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.326: +6 -6 lines
Diff to previous 1.326 (colored)

Fix false sharing problems with cpu_info.  Identified with tprof(8).
This was a very nice win in my tests on a 48 CPU box.

- Reorganise cpu_data slightly according to usage.
- Put cpu_onproc into struct cpu_info alongside ci_curlwp (now is ci_onproc).
- On x86, put some items in their own cache lines according to usage, like
  the IPI bitmask and ci_want_resched.

Revision 1.326 / (download) - annotate - [select for diffs], Sat Nov 23 19:42:52 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.325: +66 -43 lines
Diff to previous 1.325 (colored)

Minor scheduler cleanup:

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

Revision 1.325 / (download) - annotate - [select for diffs], Thu Nov 21 20:51:05 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.324: +19 -19 lines
Diff to previous 1.324 (colored)

- Don't give up kpriority boost in preempt().  That's unfair and bad for
  interactive response.  It should only be dropped on final return to user.
- Clear l_dopreempt with atomics and add some comments around concurrency.
- Hold proc_lock over the lightning bolt and loadavg calc, no reason not to.
- cpu_did_preempt() is useless - don't call it.  Will remove soon.

Revision 1.323.4.1 / (download) - annotate - [select for diffs], Tue Oct 15 19:01:06 2019 UTC (4 years, 4 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.323: +3 -2 lines
Diff to previous 1.323 (colored) next main 1.324 (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.324 / (download) - annotate - [select for diffs], Thu Oct 3 22:48:44 2019 UTC (4 years, 4 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.323: +3 -2 lines
Diff to previous 1.323 (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.315.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:03 2019 UTC (4 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.315: +14 -25 lines
Diff to previous 1.315 (colored)

Sync with HEAD

Revision 1.323 / (download) - annotate - [select for diffs], Sun Feb 3 03:19:28 2019 UTC (5 years ago) by mrg
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.322: +3 -2 lines
Diff to previous 1.322 (colored)

- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
  this case, and thus can't be marked __dead easily

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

Sync with HEAD, resolve a few conflicts

Revision 1.322 / (download) - annotate - [select for diffs], Fri Nov 30 15:05:35 2018 UTC (5 years, 2 months ago) by mlelstv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.321: +2 -6 lines
Diff to previous 1.321 (colored)

The SHOULDYIELD flag doesn't indicate that other LWPs could run but only
that the current LWP was seen on two consecutive scheduler intervals.

There are currently at least 3 cases for calling preempt().
- always call preempt()
- check the SHOULDYIELD flag
- check the real ci_want_resched

So the forced check for SHOULDYIELD changed the scheduler timing. Revert
it for now.

Revision 1.321 / (download) - annotate - [select for diffs], Wed Nov 28 19:46:22 2018 UTC (5 years, 3 months ago) by mlelstv
Branch: MAIN
Changes since 1.320: +11 -3 lines
Diff to previous 1.320 (colored)

Move counting involuntary switches into mi_switch. preempt() passes that
information by setting a new LWP flag.

While here, don't even try to switch when the scheduler has no other LWP
to run. This check is currently spread over all callers of preempt()
and will be removed there.

ok mrg@.

Revision 1.320 / (download) - annotate - [select for diffs], Wed Nov 28 19:36:43 2018 UTC (5 years, 3 months ago) by mlelstv
Branch: MAIN
Changes since 1.319: +1 -6 lines
Diff to previous 1.319 (colored)

Revert previous for a better fix.

Revision 1.319 / (download) - annotate - [select for diffs], Wed Nov 28 09:44:49 2018 UTC (5 years, 3 months ago) by mlelstv
Branch: MAIN
Changes since 1.318: +8 -3 lines
Diff to previous 1.318 (colored)

Fix statistics in case mi_switch didn't actually switch LWPs.

Revision 1.311.10.2 / (download) - annotate - [select for diffs], Sun Sep 23 17:46:16 2018 UTC (5 years, 5 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.311.10.1: +3 -2 lines
Diff to previous 1.311.10.1 (colored) to branchpoint 1.311 (colored) next main 1.312 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1031):

	sys/kern/kern_synch.c: revision 1.317

In mi_switch(), also call pserialize_switchpoint() if we're not switching
to another lwp, as proposed on
http://mail-index.netbsd.org/tech-kern/2018/07/20/msg023709.html

Without it, on a SMP machine with few processes running (e.g while
running sysinst), pserialize could hang for a long time until all
CPUs got a LWP to run (or, eventually, forever).

Tested on Xen domUs with 4 CPUs, and on a 64-threads AMD machine.

Revision 1.314.2.3 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:42 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.314.2.2: +7 -2 lines
Diff to previous 1.314.2.2 (colored) to branchpoint 1.314 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.318 / (download) - annotate - [select for diffs], Tue Aug 14 01:06:01 2018 UTC (5 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.317: +7 -2 lines
Diff to previous 1.317 (colored)

Change the place to check if a context switch doesn't happen within a pserialize read section

The previous place (pserialize_switchpoint) was not a good place because at that
point a suspect thread is already switched so that a backtrace gotten on
a KASSERT failure doesn't point out where a context switch happens.

Revision 1.314.2.2 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:08 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.314.2.1: +3 -24 lines
Diff to previous 1.314.2.1 (colored) to branchpoint 1.314 (colored)

Sync with HEAD

Revision 1.317 / (download) - annotate - [select for diffs], Tue Jul 24 15:09:37 2018 UTC (5 years, 7 months ago) by bouyer
Branch: MAIN
CVS Tags: pgoyette-compat-0728
Changes since 1.316: +3 -2 lines
Diff to previous 1.316 (colored)

In mi_switch(), also call pserialize_switchpoint() if we're not switching
to another lwp, as proposed on
http://mail-index.netbsd.org/tech-kern/2018/07/20/msg023709.html

Without it, on a SMP machine with few processes running (e.g while
running sysinst), pserialize could hang for a long time until all
CPUs got a LWP to run (or, eventually, forever).
Tested on Xen domUs with 4 CPUs, and on a 64-threads AMD machine.

Revision 1.316 / (download) - annotate - [select for diffs], Thu Jul 12 10:46:48 2018 UTC (5 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.315: +2 -24 lines
Diff to previous 1.315 (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.314.2.1 / (download) - annotate - [select for diffs], Mon May 21 04:36:15 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.314: +2 -3 lines
Diff to previous 1.314 (colored)

Sync with HEAD

Revision 1.315 / (download) - annotate - [select for diffs], Sat May 19 11:39:37 2018 UTC (5 years, 9 months ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625, pgoyette-compat-0521
Branch point for: phil-wifi
Changes since 1.314: +2 -3 lines
Diff to previous 1.314 (colored)

Remove emap support. Unfortunately it never got to state where it would be
used and usable, due to reliability and limited & complicated MD support.

Going forward, we need to concentrate on interface which do not map anything
into kernel in first place (such as direct map or KVA-less I/O), rather
than making those mappings cheaper to do.

Revision 1.311.10.1 / (download) - annotate - [select for diffs], Mon Feb 26 00:43:23 2018 UTC (6 years ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.311: +4 -3 lines
Diff to previous 1.311 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #573):
	sys/kern/kern_synch.c: 1.314
Avoid a race condition between an LWP migration and curlwp_bind
curlwp_bind sets the LP_BOUND flag to l_pflags of the current LWP, which
prevents it from migrating to another CPU until curlwp_bindx is called.
Meanwhile, there are several ways that an LWP is migrated to another CPU and in
any cases the scheduler postpones a migration if a target LWP is running.  One
example of LWP migrations is a load balancing; the scheduler periodically
explores CPU-hogging LWPs and schedule them to migrate (see sched_lwp_stats).
At that point the scheduler checks the LP_BOUND flag and if it's set to a LWP,
the scheduler doesn't schedule the LWP.  A scheduled LWP is tried to be migrated
when it is leaving a running CPU, i.e., mi_switch.  And mi_switch does NOT check
the LP_BOUND flag.  So if an LWP is scheduled first and then it sets the
LP_BOUND flag, the LWP can be migrated regardless of the flag.  To avoid this
race condition, we need to check the flag in mi_switch too.
For more details see
https://mail-index.netbsd.org/tech-kern/2018/02/13/msg023079.html

Revision 1.314 / (download) - annotate - [select for diffs], Fri Feb 16 07:04:51 2018 UTC (6 years ago) by ozaki-r
Branch: MAIN
CVS Tags: 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.313: +4 -3 lines
Diff to previous 1.313 (colored)

Avoid a race condition between an LWP migration and curlwp_bind

curlwp_bind sets the LP_BOUND flag to l_pflags of the current LWP, which
prevents it from migrating to another CPU until curlwp_bindx is called.
Meanwhile, there are several ways that an LWP is migrated to another CPU and in
any cases the scheduler postpones a migration if a target LWP is running.  One
example of LWP migrations is a load balancing; the scheduler periodically
explores CPU-hogging LWPs and schedule them to migrate (see sched_lwp_stats).
At that point the scheduler checks the LP_BOUND flag and if it's set to a LWP,
the scheduler doesn't schedule the LWP.  A scheduled LWP is tried to be migrated
when it is leaving a running CPU, i.e., mi_switch.  And mi_switch does NOT check
the LP_BOUND flag.  So if an LWP is scheduled first and then it sets the
LP_BOUND flag, the LWP can be migrated regardless of the flag.  To avoid this
race condition, we need to check the flag in mi_switch too.

For more details see https://mail-index.netbsd.org/tech-kern/2018/02/13/msg023079.html

Revision 1.313 / (download) - annotate - [select for diffs], Tue Jan 30 07:52:22 2018 UTC (6 years ago) by ozaki-r
Branch: MAIN
Changes since 1.312: +12 -12 lines
Diff to previous 1.312 (colored)

Apply C99-style struct initialization to syncobj_t

Revision 1.305.2.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:44 2017 UTC (6 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.305.2.1: +14 -6 lines
Diff to previous 1.305.2.1 (colored) to branchpoint 1.305 (colored) next main 1.306 (colored)

update from HEAD

Revision 1.308.6.4 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:07 2017 UTC (6 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.308.6.3: +6 -6 lines
Diff to previous 1.308.6.3 (colored) to branchpoint 1.308 (colored) next main 1.309 (colored)

Sync with HEAD

Revision 1.312 / (download) - annotate - [select for diffs], Sun Aug 6 09:14:14 2017 UTC (6 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, nick-nhusb-base-20170825
Changes since 1.311: +6 -6 lines
Diff to previous 1.311 (colored)

use the same string for the log and uprintf.

Revision 1.308.6.3 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:20 2016 UTC (7 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.308.6.2: +4 -2 lines
Diff to previous 1.308.6.2 (colored) to branchpoint 1.308 (colored)

Sync with HEAD

Revision 1.311 / (download) - annotate - [select for diffs], Sun Jul 3 14:24:58 2016 UTC (7 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.310: +4 -2 lines
Diff to previous 1.310 (colored)

GSoC 2016 Charles Cui: Implement thread priority protection based on work
by Andy Doran. Also document the get/set pshared thread calls as not
implemented, and add a skeleton implementation that is disabled.
XXX: document _sched_protect(2).

Revision 1.308.6.2 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:16 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.308.6.1: +3 -3 lines
Diff to previous 1.308.6.1 (colored) to branchpoint 1.308 (colored)

Sync with HEAD

Revision 1.310 / (download) - annotate - [select for diffs], Mon Apr 4 20:47:57 2016 UTC (7 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422
Changes since 1.309: +3 -3 lines
Diff to previous 1.309 (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.308.6.1 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:05 2015 UTC (8 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.308: +9 -3 lines
Diff to previous 1.308 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.297.2.1.6.1 / (download) - annotate - [select for diffs], Sun Nov 15 20:38:18 2015 UTC (8 years, 3 months ago) by bouyer
Branch: netbsd-6-1
Changes since 1.297.2.1: +9 -3 lines
Diff to previous 1.297.2.1 (colored) next main 1.297.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.297.2.1.4.1 / (download) - annotate - [select for diffs], Sun Nov 15 20:38:01 2015 UTC (8 years, 3 months ago) by bouyer
Branch: netbsd-6-0
Changes since 1.297.2.1: +9 -3 lines
Diff to previous 1.297.2.1 (colored) next main 1.297.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.297.2.2 / (download) - annotate - [select for diffs], Sun Nov 15 20:37:04 2015 UTC (8 years, 3 months ago) by bouyer
Branch: netbsd-6
Changes since 1.297.2.1: +9 -3 lines
Diff to previous 1.297.2.1 (colored) to branchpoint 1.297 (colored) next main 1.298 (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.254.2.7 / (download) - annotate - [select for diffs], Sat Nov 7 20:43:23 2015 UTC (8 years, 3 months ago) by snj
Branch: netbsd-5
Changes since 1.254.2.6: +9 -3 lines
Diff to previous 1.254.2.6 (colored) to branchpoint 1.254 (colored) next main 1.255 (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.254.2.6.6.1 / (download) - annotate - [select for diffs], Sat Nov 7 20:42:59 2015 UTC (8 years, 3 months ago) by snj
Branch: netbsd-5-1
Changes since 1.254.2.6: +9 -3 lines
Diff to previous 1.254.2.6 (colored) next main 1.254.2.7 (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.254.2.6.10.1 / (download) - annotate - [select for diffs], Sat Nov 7 20:42:25 2015 UTC (8 years, 3 months ago) by snj
Branch: netbsd-5-2
Changes since 1.254.2.6: +9 -3 lines
Diff to previous 1.254.2.6 (colored) next main 1.254.2.7 (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.308.8.1 / (download) - annotate - [select for diffs], Thu Nov 5 09:05:18 2015 UTC (8 years, 3 months ago) by snj
Branch: netbsd-7-0
CVS Tags: netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Changes since 1.308: +9 -3 lines
Diff to previous 1.308 (colored) next main 1.309 (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.308.4.1 / (download) - annotate - [select for diffs], Thu Nov 5 09:04:55 2015 UTC (8 years, 3 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.308: +9 -3 lines
Diff to previous 1.308 (colored) next main 1.309 (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.309 / (download) - annotate - [select for diffs], Tue Oct 13 00:25:51 2015 UTC (8 years, 4 months ago) by pgoyette
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.308: +9 -3 lines
Diff to previous 1.308 (colored)

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

Revision 1.305.2.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.305: +2 -3 lines
Diff to previous 1.305 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.295.2.5 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.295.2.4: +2 -3 lines
Diff to previous 1.295.2.4 (colored) to branchpoint 1.295 (colored) next main 1.296 (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.305.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:07 2014 UTC (9 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.305: +2 -3 lines
Diff to previous 1.305 (colored) next main 1.306 (colored)

sync with head

Revision 1.308 / (download) - annotate - [select for diffs], Fri Feb 28 10:16:51 2014 UTC (10 years ago) by skrll
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, 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.307: +2 -3 lines
Diff to previous 1.307 (colored)

G/C sys/simplelock.h includes

Revision 1.307 / (download) - annotate - [select for diffs], Sun Sep 15 13:03:59 2013 UTC (10 years, 5 months ago) by martin
Branch: MAIN
Changes since 1.306: +2 -4 lines
Diff to previous 1.306 (colored)

Remove __CT_LOCAL_.. hack

Revision 1.306 / (download) - annotate - [select for diffs], Sat Sep 14 20:49:31 2013 UTC (10 years, 5 months ago) by martin
Branch: MAIN
Changes since 1.305: +4 -2 lines
Diff to previous 1.305 (colored)

Guard a function local CTASSERT with prologue/epilogue

Revision 1.295.2.4 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:31 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.295.2.3: +23 -23 lines
Diff to previous 1.295.2.3 (colored) to branchpoint 1.295 (colored)

sync with head

Revision 1.305 / (download) - annotate - [select for diffs], Sun Sep 2 16:00:00 2012 UTC (11 years, 5 months ago) by mlelstv
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet
Changes since 1.304: +6 -2 lines
Diff to previous 1.304 (colored)

The field ci_curlwp is only defined for MULTIPROCESSOR kernels.

Revision 1.304 / (download) - annotate - [select for diffs], Thu Aug 30 02:26:38 2012 UTC (11 years, 6 months ago) by matt
Branch: MAIN
Changes since 1.303: +8 -2 lines
Diff to previous 1.303 (colored)

Add a new more KASSERT/KASSERTMSG

Revision 1.297.2.1 / (download) - annotate - [select for diffs], Sun Aug 19 17:36:41 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-RC2, netbsd-6-0-RC1, 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, matt-nb6-plus
Branch point for: netbsd-6-1, netbsd-6-0
Changes since 1.297: +13 -9 lines
Diff to previous 1.297 (colored)

Pull up following revision(s) (requested by christos in ticket #513):
	sys/kern/kern_synch.c: revision 1.303
PR/46811: Tetsua Isaki: Don't handle cpu limits when runtime is negative.

Revision 1.303 / (download) - annotate - [select for diffs], Sat Aug 18 08:54:06 2012 UTC (11 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.302: +13 -9 lines
Diff to previous 1.302 (colored)

PR/46811: Tetsua Isaki: Don't handle cpu limits when runtime is negative.

Revision 1.302 / (download) - annotate - [select for diffs], Fri Jul 27 05:36:13 2012 UTC (11 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.301: +2 -16 lines
Diff to previous 1.301 (colored)

Remove safepri and use IPL_SAFEPRI instead.  This may be defined in a MD
header file (if not, a value of 0 is assmued).

Revision 1.295.2.3 / (download) - annotate - [select for diffs], Wed May 23 10:08:11 2012 UTC (11 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.295.2.2: +8 -3 lines
Diff to previous 1.295.2.2 (colored) to branchpoint 1.295 (colored)

sync with head.

Revision 1.296.4.6 / (download) - annotate - [select for diffs], Sun Apr 29 23:05:05 2012 UTC (11 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.296.4.5: +8 -3 lines
Diff to previous 1.296.4.5 (colored) to branchpoint 1.296 (colored) next main 1.297 (colored)

sync to latest -current.

Revision 1.301 / (download) - annotate - [select for diffs], Sat Apr 21 22:38:25 2012 UTC (11 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Changes since 1.300: +4 -3 lines
Diff to previous 1.300 (colored)

Improve the assert message.

Revision 1.300 / (download) - annotate - [select for diffs], Wed Apr 18 13:44:19 2012 UTC (11 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.299: +6 -2 lines
Diff to previous 1.299 (colored)

comment

Revision 1.295.2.2 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:26 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.295.2.1: +9 -74 lines
Diff to previous 1.295.2.1 (colored) to branchpoint 1.295 (colored)

sync with head

Revision 1.296.4.5 / (download) - annotate - [select for diffs], Tue Mar 6 18:26:48 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.296.4.4: +6 -2 lines
Diff to previous 1.296.4.4 (colored) to branchpoint 1.296 (colored)

sync to -current

Revision 1.296.4.4 / (download) - annotate - [select for diffs], Tue Mar 6 09:56:27 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.296.4.3: +2 -6 lines
Diff to previous 1.296.4.3 (colored) to branchpoint 1.296 (colored)

sync to -current

Revision 1.296.4.3 / (download) - annotate - [select for diffs], Sun Mar 4 00:46:31 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.296.4.2: +4 -0 lines
Diff to previous 1.296.4.2 (colored) to branchpoint 1.296 (colored)

sync to latest -current.

Revision 1.299 / (download) - annotate - [select for diffs], Sat Mar 3 00:22:24 2012 UTC (11 years, 11 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base4
Changes since 1.298: +6 -2 lines
Diff to previous 1.298 (colored)

If IPL_SAFEPRI is defined, use it to initialize safepri.

Revision 1.296.4.2 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:47 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.296.4.1: +2 -31 lines
Diff to previous 1.296.4.1 (colored) to branchpoint 1.296 (colored)

sync to -current.

Revision 1.298 / (download) - annotate - [select for diffs], Sun Feb 19 21:06:54 2012 UTC (12 years ago) by rmind
Branch: MAIN
CVS Tags: jmcneill-usbmp-base5, jmcneill-usbmp-base3
Changes since 1.297: +2 -31 lines
Diff to previous 1.297 (colored)

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

Revision 1.296.4.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:31 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.296: +5 -45 lines
Diff to previous 1.296 (colored)

merge to -current.

Revision 1.297 / (download) - annotate - [select for diffs], Sat Jan 28 12:22:33 2012 UTC (12 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.296: +5 -45 lines
Diff to previous 1.296 (colored)

Remove obsolete ltsleep(9) and wakeup_one(9).

Revision 1.295.2.1 / (download) - annotate - [select for diffs], Thu Nov 10 14:31:49 2011 UTC (12 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.295: +3 -3 lines
Diff to previous 1.295 (colored)

sync with head

Revision 1.296 / (download) - annotate - [select for diffs], Sun Nov 6 14:11:00 2011 UTC (12 years, 3 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: jmcneill-usbmp
Changes since 1.295: +3 -3 lines
Diff to previous 1.295 (colored)

time_t isn't necessarily "long". PR 45577 from taca@

Revision 1.295 / (download) - annotate - [select for diffs], Wed Oct 5 20:37:40 2011 UTC (12 years, 4 months ago) by njoly
Branch: MAIN
CVS Tags: yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.294: +3 -2 lines
Diff to previous 1.294 (colored)

Include sys/syslog.h for log(9).

Revision 1.294 / (download) - annotate - [select for diffs], Wed Oct 5 14:28:08 2011 UTC (12 years, 4 months ago) by apb
Branch: MAIN
Changes since 1.293: +3 -3 lines
Diff to previous 1.293 (colored)

revert revision 1.291.  log(LOG_WARNING) is not strictly more
noisy than printf().

Revision 1.293 / (download) - annotate - [select for diffs], Wed Oct 5 13:22:13 2011 UTC (12 years, 4 months ago) by apb
Branch: MAIN
Changes since 1.292: +12 -5 lines
Diff to previous 1.292 (colored)

When killing a process due to RLIMIT_CPU, also log a message
with LOG_NOTICE, and print a message to the user with uprintf.

From PR 45421 by Greg Woods, but I changed the log priority (the user
might think it's an error, but the kernel is just doing its job) and the
wording of the message, and I edited a nearby comment.

Revision 1.292 / (download) - annotate - [select for diffs], Wed Oct 5 13:05:49 2011 UTC (12 years, 4 months ago) by apb
Branch: MAIN
Changes since 1.291: +3 -3 lines
Diff to previous 1.291 (colored)

Print "WARNING: negative runtime; monotonic clock has gone backwards\n"
using log(LOG_WARNING, ...), not just printf(...).

From PR 45421 by Greg Woods.

Revision 1.291 / (download) - annotate - [select for diffs], Tue Sep 27 01:02:38 2011 UTC (12 years, 5 months ago) by jym
Branch: MAIN
Changes since 1.290: +4 -4 lines
Diff to previous 1.290 (colored)

Modify *ASSERTMSG() so they are now used as variadic macros. The main goal
is to provide routines that do as KASSERT(9) says: append a message
to the panic format string when the assertion triggers, with optional
arguments.

Fix call sites to reflect the new definition.

Discussed on tech-kern@. See
http://mail-index.netbsd.org/tech-kern/2011/09/07/msg011427.html

Revision 1.290 / (download) - annotate - [select for diffs], Sat Jul 30 17:01:04 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.289: +6 -2 lines
Diff to previous 1.289 (colored)

Add an implementation of passive serialization as described in expired
US patent 4809168. This is a reader / writer synchronization mechanism,
designed for lock-less read operations.

Revision 1.286.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:32 2011 UTC (12 years, 8 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.286: +14 -8 lines
Diff to previous 1.286 (colored) next main 1.287 (colored)

Sync with HEAD.

Revision 1.280.2.4 / (download) - annotate - [select for diffs], Tue May 31 03:05:02 2011 UTC (12 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.280.2.3: +9 -6 lines
Diff to previous 1.280.2.3 (colored) to branchpoint 1.280 (colored) next main 1.281 (colored)

sync with head

Revision 1.289 / (download) - annotate - [select for diffs], Fri May 13 22:16:43 2011 UTC (12 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.288: +10 -8 lines
Diff to previous 1.288 (colored)

Sprinkle __cacheline_aligned and __read_mostly.

Revision 1.288 / (download) - annotate - [select for diffs], Mon May 2 00:29:53 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.287: +3 -2 lines
Diff to previous 1.287 (colored)

Extend PCU:
- Add pcu_ops_t::pcu_state_release() operation for PCU_RELEASE case.
- Add pcu_switchpoint() to perform release operation on context switch.
- Sprinkle const, misc.  Also, sync MIPS with changes.

Per discussions with matt@.

Revision 1.280.2.3 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:08 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.280.2.2: +3 -0 lines
Diff to previous 1.280.2.2 (colored) to branchpoint 1.280 (colored)

sync with head

Revision 1.287 / (download) - annotate - [select for diffs], Thu Apr 14 05:33:20 2011 UTC (12 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.286: +5 -2 lines
Diff to previous 1.286 (colored)

Add an assert to make sure no unexpected spinlocks are held in mi_switch

Revision 1.280.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:16 2011 UTC (12 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.280.2.1: +12 -7 lines
Diff to previous 1.280.2.1 (colored) to branchpoint 1.280 (colored)

sync with head

Revision 1.286 / (download) - annotate - [select for diffs], Mon Jan 3 13:22:32 2011 UTC (13 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.285: +3 -4 lines
Diff to previous 1.285 (colored)

update comment

Revision 1.285 / (download) - annotate - [select for diffs], Sat Dec 18 01:13:36 2010 UTC (13 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.284: +9 -5 lines
Diff to previous 1.284 (colored)

mi_switch: remove invalid assert and add a note that preemption/interrupt
may happen while migrating LWP is set.

Reported by Manuel Bouyer.

Revision 1.274.2.3 / (download) - annotate - [select for diffs], Sat Nov 6 08:08:43 2010 UTC (13 years, 3 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.274.2.2: +4 -2 lines
Diff to previous 1.274.2.2 (colored) to branchpoint 1.274 (colored) next main 1.275 (colored)

Sync with HEAD.

Revision 1.284 / (download) - annotate - [select for diffs], Tue Nov 2 15:17:37 2010 UTC (13 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base4
Changes since 1.283: +4 -2 lines
Diff to previous 1.283 (colored)

KASSERT we don't kpause indefinitely without interruptability.

XXX: using timo == 0 to mean "sleep as long as you like, and forever
if you're really tired" is not the smartest interface considering
the the hz/n idiom used to specify timo.  This leads to unwanted
behaviour when hz gets below some impossible-to-know limit.  With
a usec2ticks() routine it at least be a little more tolerable.

Revision 1.274.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:47:29 2010 UTC (13 years, 6 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.274.2.1: +1 -0 lines
Diff to previous 1.274.2.1 (colored) to branchpoint 1.274 (colored)

Sync with HEAD.

Revision 1.230.2.6 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:41 2010 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.230.2.5: +61 -22 lines
Diff to previous 1.230.2.5 (colored) to branchpoint 1.230 (colored) next main 1.231 (colored)

sync with head.

Revision 1.280.2.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:57 2010 UTC (13 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.280: +61 -22 lines
Diff to previous 1.280 (colored)

sync with head

Revision 1.274.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:11 2010 UTC (13 years, 10 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.274: +84 -29 lines
Diff to previous 1.274 (colored)

Sync with HEAD.

Revision 1.283 / (download) - annotate - [select for diffs], Fri Apr 30 10:02:00 2010 UTC (13 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.282: +3 -2 lines
Diff to previous 1.282 (colored)

Add a CTASSERT to make sure the cexp and ldavg arrays are kept in sync

Revision 1.282 / (download) - annotate - [select for diffs], Tue Apr 20 16:49:48 2010 UTC (13 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.281: +15 -14 lines
Diff to previous 1.281 (colored)

sched_pstats: fix previous, exclude system/softintr threads from loadavg.

Revision 1.281 / (download) - annotate - [select for diffs], Fri Apr 16 03:21:49 2010 UTC (13 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.280: +59 -22 lines
Diff to previous 1.280 (colored)

- Merge sched_pstats() and uvm_meter()/uvm_loadav().  Avoids double loop
  through all LWPs and duplicate locking overhead.

- Move sched_pstats() from soft-interrupt context to process 0 main loop.
  Avoids blocking effect on real-time threads.  Mostly fixes PR/38792.

Note: it might be worth to move the loop above PRI_PGDAEMON.  Also,
sched_pstats() might be cleaned-up slightly.

Revision 1.230.2.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:17 2010 UTC (13 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.230.2.4: +42 -37 lines
Diff to previous 1.230.2.4 (colored) to branchpoint 1.230 (colored)

sync with head

Revision 1.280 / (download) - annotate - [select for diffs], Wed Mar 3 00:47:31 2010 UTC (13 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Changes since 1.279: +2 -8 lines
Diff to previous 1.279 (colored)

remove redundant checks of PK_MARKER.

Revision 1.279 / (download) - annotate - [select for diffs], Tue Feb 23 22:19:27 2010 UTC (14 years ago) by darran
Branch: MAIN
Changes since 1.278: +11 -17 lines
Diff to previous 1.278 (colored)

DTrace: Get rid of the KDTRACE_HOOKS ifdefs in the kernel.  Replace the
functions with inline function that are empty when KDTRACE_HOOKS is not
defined.

Revision 1.278 / (download) - annotate - [select for diffs], Sun Feb 21 07:39:18 2010 UTC (14 years ago) by darran
Branch: MAIN
Changes since 1.277: +4 -4 lines
Diff to previous 1.277 (colored)

DTrace: Add __predict_false() to the DTrace hooks per rmind's suggestion.

Revision 1.277 / (download) - annotate - [select for diffs], Sun Feb 21 07:01:57 2010 UTC (14 years ago) by darran
Branch: MAIN
Changes since 1.276: +3 -2 lines
Diff to previous 1.276 (colored)

Added a defflag option for KDTRACE_HOOKS and included opt_dtrace.h in the
relevant files. (Per Quentin Garnier - thanks!).

Revision 1.276 / (download) - annotate - [select for diffs], Sun Feb 21 02:11:40 2010 UTC (14 years ago) by darran
Branch: MAIN
Changes since 1.275: +30 -2 lines
Diff to previous 1.275 (colored)

Add the DTrace hooks to the kernel (KDTRACE_HOOKS config option).
DTrace adds a pointer to the lwp and proc structures which it uses to
manage its state.  These are opaque from the kernel perspective to keep
the kernel free of CDDL code. The state arenas are kmem_alloced and freed
as proccesses and threads are created and destoyed.

Also add a check for trap06 (privileged/illegal instruction) so that
DTrace can check for D scripts that may have triggered the trap so it
can clean up after them and resume normal operation.

Ok with core@.

Revision 1.275 / (download) - annotate - [select for diffs], Thu Feb 18 20:58:23 2010 UTC (14 years ago) by skrll
Branch: MAIN
Changes since 1.274: +4 -4 lines
Diff to previous 1.274 (colored)

Fix comment(s).

OK'ed by rmind

Revision 1.274 / (download) - annotate - [select for diffs], Wed Dec 30 23:54:30 2009 UTC (14 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.273: +4 -4 lines
Diff to previous 1.273 (colored)

- nextlwp: do not set l_cpu, it should be returned correct (add assert).
- resched_cpu: avoid double set of ci.

Revision 1.273 / (download) - annotate - [select for diffs], Sat Dec 5 22:38:19 2009 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.272: +3 -3 lines
Diff to previous 1.272 (colored)

tsleep() on lbolt is now illegal.  Convert cv_wakeup(&lbolt) to
cv_broadcast(&lbolt) and get rid of the prior.

Revision 1.272 / (download) - annotate - [select for diffs], Sat Dec 5 22:34:43 2009 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.271: +4 -2 lines
Diff to previous 1.271 (colored)

Convert tsleep(&lbolt) to kpause().  Make ltsleep/mtsleep on lbolt
illegal.  I examined all places where lbolt is referenced to make
sure there were pointer aliases of it passed to tsleep, but put a
KASSERT in m/ltsleep() just to be sure.

Revision 1.271 / (download) - annotate - [select for diffs], Wed Oct 21 21:12:06 2009 UTC (14 years, 4 months ago) by rmind
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.270: +11 -25 lines
Diff to previous 1.270 (colored)

Remove uarea swap-out functionality:

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

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

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

Revision 1.270 / (download) - annotate - [select for diffs], Sat Oct 3 22:32:56 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.269: +3 -58 lines
Diff to previous 1.269 (colored)

- Move sched_listener and co. from kern_synch.c to sys_sched.c, where it
  really belongs (suggested by rmind@),

- Rename sched_init() to synch_init(), and introduce a new sched_init()
  in sys_sched.c where we (a) initialize the sysctl node (no more
  link-set) and (b) listen on the process scope with sched_listener.

Reviewed by and okay rmind@.

Revision 1.269 / (download) - annotate - [select for diffs], Sat Oct 3 21:21:56 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.268: +3 -3 lines
Diff to previous 1.268 (colored)

Oops, forgot to make sched_listener static. Pointed out by rmind@, thansk!

Revision 1.268 / (download) - annotate - [select for diffs], Sat Oct 3 01:30:25 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.267: +57 -2 lines
Diff to previous 1.267 (colored)

Move sched policy back to the subsystem.

Revision 1.230.2.4 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:16 2009 UTC (14 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.230.2.3: +4 -2 lines
Diff to previous 1.230.2.3 (colored) to branchpoint 1.230 (colored)

sync with head.

Revision 1.260.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:35 2009 UTC (14 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.260.2.1: +7 -3 lines
Diff to previous 1.260.2.1 (colored) to branchpoint 1.260 (colored) next main 1.261 (colored)

Sync with HEAD.

Revision 1.267 / (download) - annotate - [select for diffs], Sun Jul 19 10:11:55 2009 UTC (14 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, jymxensuspend-base
Changes since 1.266: +4 -2 lines
Diff to previous 1.266 (colored)

set LP_RUNNING when starting lwp0 and idle lwps.
add assertions.

Revision 1.230.2.3 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:23 2009 UTC (14 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.230.2.2: +5 -3 lines
Diff to previous 1.230.2.2 (colored) to branchpoint 1.230 (colored)

sync with head.

Revision 1.266 / (download) - annotate - [select for diffs], Mon Jun 29 23:39:00 2009 UTC (14 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6
Changes since 1.265: +3 -3 lines
Diff to previous 1.265 (colored)

update a comment

Revision 1.265 / (download) - annotate - [select for diffs], Sun Jun 28 15:18:50 2009 UTC (14 years, 8 months ago) by rmind
Branch: MAIN
Changes since 1.264: +4 -2 lines
Diff to previous 1.264 (colored)

Ephemeral mapping (emap) implementation.  Concept is based on the idea that
activity of other threads will perform the TLB flush for the processes using
emap as a side effect.  To track that, global and per-CPU generation numbers
are used.  This idea was suggested by Andrew Doran; various improvements to
it by me.  Notes:

- For now, zero-copy on pipe is not yet enabled.
- TCP socket code would likely need more work.
- Additional UVM loaning improvements are needed.

Proposed on <tech-kern>, silence there.
Quickly reviewed by <ad>.

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

Sync with HEAD.

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

Revision 1.230.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:47 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.230.2.1: +281 -215 lines
Diff to previous 1.230.2.1 (colored) to branchpoint 1.230 (colored)

sync with head.

Revision 1.252.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:59 2009 UTC (14 years, 10 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.252.2.2: +36 -39 lines
Diff to previous 1.252.2.2 (colored) to branchpoint 1.252 (colored) next main 1.253 (colored)

Sync with HEAD.

Revision 1.254.2.6 / (download) - annotate - [select for diffs], Thu Apr 23 17:47:13 2009 UTC (14 years, 10 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, netbsd-5-0-RELEASE, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Branch point for: netbsd-5-2, netbsd-5-1
Changes since 1.254.2.5: +4 -2 lines
Diff to previous 1.254.2.5 (colored) to branchpoint 1.254 (colored)

Pull up following revision(s) (requested by yamt in ticket #720):
	sys/kern/kern_synch.c: revision 1.262
kpreempt: report a failure of cpu_kpreempt_enter.  otherwise x86 trap()
loops infinitely.  PR/41202.

Revision 1.264 / (download) - annotate - [select for diffs], Thu Apr 16 21:19:23 2009 UTC (14 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Changes since 1.263: +21 -20 lines
Diff to previous 1.263 (colored)

kpreempt: fix another bug, uintptr_t -> bool truncation.

Revision 1.263 / (download) - annotate - [select for diffs], Thu Apr 16 00:17:19 2009 UTC (14 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.262: +2 -6 lines
Diff to previous 1.262 (colored)

Avoid few #ifdef KSTACK_CHECK_MAGIC.

Revision 1.262 / (download) - annotate - [select for diffs], Wed Apr 15 11:44:20 2009 UTC (14 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.261: +4 -2 lines
Diff to previous 1.261 (colored)

kpreempt: report a failure of cpu_kpreempt_enter.  otherwise x86 trap()
loops infinitely.  PR/41202.

Revision 1.261 / (download) - annotate - [select for diffs], Sat Mar 28 21:43:16 2009 UTC (14 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.260: +15 -17 lines
Diff to previous 1.260 (colored)

- kpreempt_disabled: constify l.
- Few predictions.
- KNF.

Revision 1.252.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:32:56 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.252.2.1: +14 -4 lines
Diff to previous 1.252.2.1 (colored) to branchpoint 1.252 (colored)

Sync with HEAD.

Revision 1.254.2.5 / (download) - annotate - [select for diffs], Fri Feb 6 01:56:19 2009 UTC (15 years ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2
Changes since 1.254.2.4: +10 -5 lines
Diff to previous 1.254.2.4 (colored) to branchpoint 1.254 (colored)

Pull up following revision(s) (requested by ad in ticket #415):
	sys/kern/kern_synch.c: revision 1.260
Warn once and no more about backwards monotonic clock.

Revision 1.260 / (download) - annotate - [select for diffs], Wed Feb 4 21:29:54 2009 UTC (15 years ago) by ad
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.259: +10 -5 lines
Diff to previous 1.259 (colored)

Warn once and no more about backwards monotonic clock.

Revision 1.254.2.4 / (download) - annotate - [select for diffs], Mon Feb 2 20:12:11 2009 UTC (15 years ago) by snj
Branch: netbsd-5
Changes since 1.254.2.3: +8 -3 lines
Diff to previous 1.254.2.3 (colored) to branchpoint 1.254 (colored)

Pull up following revision(s) (requested by rmind in ticket #372):
	sys/kern/kern_synch.c: revision 1.259
sched_pstats: add few checks to catch the problem.  OK by <ad>.

Revision 1.254.2.3 / (download) - annotate - [select for diffs], Mon Feb 2 19:33:32 2009 UTC (15 years ago) by snj
Branch: netbsd-5
Changes since 1.254.2.2: +2 -19 lines
Diff to previous 1.254.2.2 (colored) to branchpoint 1.254 (colored)

Pull up following revision(s) (requested by ad in ticket #360):
	sys/kern/kern_synch.c: revision 1.258
Redo previous. Don't count deferrals due to raised IPL. It's not that
meaningful.

Revision 1.254.2.2 / (download) - annotate - [select for diffs], Mon Feb 2 19:32:39 2009 UTC (15 years ago) by snj
Branch: netbsd-5
Changes since 1.254.2.1: +11 -2 lines
Diff to previous 1.254.2.1 (colored) to branchpoint 1.254 (colored)

Pull up following revision(s) (requested by ad in ticket #360):
	sys/kern/kern_synch.c: revision 1.257
Don't increment the 'kpreempt defer: IPL' counter if a preemption is pending
and we try to process it from interrupt context. We can't process it, and
will be handled at EOI anyway. Can happen when kernel_lock is released.

Revision 1.254.2.1 / (download) - annotate - [select for diffs], Mon Feb 2 18:28:23 2009 UTC (15 years ago) by snj
Branch: netbsd-5
Changes since 1.254: +3 -10 lines
Diff to previous 1.254 (colored)

Pull up following revision(s) (requested by ad in ticket #353):
	sys/kern/kern_sig.c: revision 1.293
	sys/kern/kern_synch.c: revision 1.256
PR kern/36183 problem with ptrace and multithreaded processes
Fix the famous "gdb + threads = panic" problem.
Also, fix another revivesa merge botch.

Revision 1.259 / (download) - annotate - [select for diffs], Wed Jan 28 22:59:46 2009 UTC (15 years, 1 month ago) by rmind
Branch: MAIN
Changes since 1.258: +8 -3 lines
Diff to previous 1.258 (colored)

sched_pstats: add few checks to catch the problem.  OK by <ad>.

Revision 1.252.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:38 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.252: +12 -27 lines
Diff to previous 1.252 (colored)

Sync with HEAD.

Revision 1.217.6.4 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:19 2009 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.217.6.3: +39 -25 lines
Diff to previous 1.217.6.3 (colored) to branchpoint 1.217 (colored) next main 1.218 (colored)

Sync with HEAD.

Revision 1.258 / (download) - annotate - [select for diffs], Sun Dec 21 13:26:58 2008 UTC (15 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.257: +2 -19 lines
Diff to previous 1.257 (colored)

Redo previous. Don't count deferrals due to raised IPL. It's not that
meaningful.

Revision 1.257 / (download) - annotate - [select for diffs], Sat Dec 20 23:06:14 2008 UTC (15 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.256: +11 -2 lines
Diff to previous 1.256 (colored)

Don't increment the 'kpreempt defer: IPL' counter if a preemption is pending
and we try to process it from interrupt context. We can't process it, and
will be handled at EOI anyway. Can happen when kernel_lock is released.

Revision 1.256 / (download) - annotate - [select for diffs], Sat Dec 13 20:43:38 2008 UTC (15 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.255: +3 -10 lines
Diff to previous 1.255 (colored)

PR kern/36183 problem with ptrace and multithreaded processes

Fix the famous "gdb + threads = panic" problem.
Also, fix another revivesa merge botch.

Revision 1.250.2.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:08 2008 UTC (15 years, 2 months ago) by haad
Branch: haad-dm
Changes since 1.250.2.1: +11 -11 lines
Diff to previous 1.250.2.1 (colored) next main 1.251 (colored)

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

Revision 1.255 / (download) - annotate - [select for diffs], Sat Nov 15 10:54:32 2008 UTC (15 years, 3 months ago) by skrll
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.254: +10 -10 lines
Diff to previous 1.254 (colored)

s/process/LWP/ in comments where appropriate.

Revision 1.254 / (download) - annotate - [select for diffs], Wed Oct 29 21:35:27 2008 UTC (15 years, 4 months ago) by smb
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RC1
Branch point for: netbsd-5
Changes since 1.253: +2 -2 lines
Diff to previous 1.253 (colored)

Fix a type -- a comment started with /m instead of /* ....

Revision 1.253 / (download) - annotate - [select for diffs], Wed Oct 29 20:18:20 2008 UTC (15 years, 4 months ago) by skrll
Branch: MAIN
Changes since 1.252: +3 -3 lines
Diff to previous 1.252 (colored)

Typo in comment.

Revision 1.250.2.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:28 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.250: +32 -2 lines
Diff to previous 1.250 (colored)

Sync with HEAD.

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

Merge wrstuden-revivesa into HEAD.

Revision 1.217.6.3 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:52 2008 UTC (15 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.217.6.2: +26 -64 lines
Diff to previous 1.217.6.2 (colored) to branchpoint 1.217 (colored)

Sync with HEAD.

Revision 1.241.2.6 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:42 2008 UTC (15 years, 5 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.241.2.5: +28 -66 lines
Diff to previous 1.241.2.5 (colored) to branchpoint 1.241 (colored) next main 1.242 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.173.2.1 / (download) - annotate - [select for diffs], Tue Sep 16 18:49:34 2008 UTC (15 years, 5 months ago) by bouyer
Branch: netbsd-4
Changes since 1.173: +6 -19 lines
Diff to previous 1.173 (colored) next main 1.174 (colored)

Sync with the following revisions (requested by skrll in ticket #1196):
	gnu/dist/gdb						removed
	gnu/usr.bin/gdb53					removed
	distrib/cats/instkernel/Makefile			1.14.6.1
	gnu/dist/gdb6/bfd/config.bfd				1.3.6.1
	gnu/dist/gdb6/bfd/elfxx-sparc.c				1.1.1.2.6.1
	gnu/dist/gdb6/bfd/elfxx-sparc.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/Makefile.in				1.2.2.1.2.2
	gnu/dist/gdb6/gdb/alpha-tdep.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/alpha-tdep.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/alphabsd-nat.c			1.1.1.2.6.2
	gnu/dist/gdb6/gdb/alphabsd-nat.h			1.1.2.1
	gnu/dist/gdb6/gdb/alphabsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/alphabsd-tdep.h			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/alphanbsd-nat.c			1.1.2.1
	gnu/dist/gdb6/gdb/alphanbsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/amd64-nat.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/amd64bsd-nat.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/amd64nbsd-nat.c			1.1.1.2.6.3
	gnu/dist/gdb6/gdb/amd64nbsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/arm-tdep.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/armbsd-tdep.c				1.1.2.1
	gnu/dist/gdb6/gdb/armnbsd-nat.c				1.1.1.2.6.2
	gnu/dist/gdb6/gdb/armnbsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/configure				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/configure.ac				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/i386bsd-nat.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/i386nbsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/m68kbsd-nat.c				1.1.1.2.6.2
	gnu/dist/gdb6/gdb/mipsnbsd-nat.c			1.1.1.2.6.2
	gnu/dist/gdb6/gdb/nbsd-thread.c				1.1.2.3
	gnu/dist/gdb6/gdb/ppcnbsd-nat.c				1.1.1.2.6.2
	gnu/dist/gdb6/gdb/ppcnbsd-tdep.c			1.3.6.1
	gnu/dist/gdb6/gdb/sh-tdep.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/shnbsd-nat.c				1.1.1.2.6.3
	gnu/dist/gdb6/gdb/shnbsd-tdep.c				1.1.1.2.6.4
	gnu/dist/gdb6/gdb/shnbsd-tdep.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/sparc-nat.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/sparc64nbsd-nat.c			1.1.1.2.6.2
	gnu/dist/gdb6/gdb/sparcnbsd-nat.c			1.1.1.2.6.2
	gnu/dist/gdb6/gdb/tramp-frame.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/vaxbsd-nat.c				1.1.1.2.6.2
	gnu/dist/gdb6/gdb/config/alpha/nbsd.mh			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/config/arm/nbsd.mt			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/arm/nbsdelf.mh			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/i386/nbsd64.mh			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/m68k/nbsdelf.mh		1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/mips/nbsd.mh			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/powerpc/nbsd.mh		1.1.1.2.6.1
	gnu/dist/gdb6/gdb/config/sh/nbsd.mh			1.1.1.1.6.2
	gnu/dist/gdb6/gdb/config/sh/tm-nbsd.h			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/sparc/nbsd64.mh		1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/sparc/nbsdelf.mh		1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/vax/nbsdelf.mh			1.1.1.1.6.1
	gnu/dist/gdb6/opcodes/configure				1.1.1.2.6.1
	gnu/dist/gdb6/opcodes/configure.in			1.1.1.2.6.1
	gnu/usr.bin/Makefile					1.126.4.1
	gnu/usr.bin/gdb6/arch/alpha/config.h			1.3.4.1
	gnu/usr.bin/gdb6/arch/alpha/defs.mk			1.2.6.1
	gnu/usr.bin/gdb6/arch/alpha/init.c			1.2.6.1
	gnu/usr.bin/gdb6/arch/alpha/nm.h			1.2.6.1
	gnu/usr.bin/gdb6/arch/arm/defs.mk			1.2.6.2
	gnu/usr.bin/gdb6/arch/arm/init.c			1.1.6.1
	gnu/usr.bin/gdb6/arch/armeb/config.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/armeb/defs.mk			1.1.6.3
	gnu/usr.bin/gdb6/arch/armeb/init.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/armeb/tm.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/armeb/version.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/i386/defs.mk			1.4.4.1
	gnu/usr.bin/gdb6/arch/i386/init.c			1.3.6.1
	gnu/usr.bin/gdb6/arch/m68000/config.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68000/defs.mk			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68000/init.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68000/tm.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68000/version.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68k/defs.mk			1.1.4.1
	gnu/usr.bin/gdb6/arch/m68k/init.c			1.1.4.1
	gnu/usr.bin/gdb6/arch/mipseb/config.h			1.3.4.1
	gnu/usr.bin/gdb6/arch/mipseb/defs.mk			1.2.6.2
	gnu/usr.bin/gdb6/arch/mipseb/init.c			1.2.6.2
	gnu/usr.bin/gdb6/arch/mipsel/config.h			1.2.6.3
	gnu/usr.bin/gdb6/arch/mipsel/defs.mk			1.2.6.3
	gnu/usr.bin/gdb6/arch/mipsel/init.c			1.2.6.3
	gnu/usr.bin/gdb6/arch/mipsel/tm.h			1.2.6.2
	gnu/usr.bin/gdb6/arch/mipsel/version.c			1.2.6.2
	gnu/usr.bin/gdb6/arch/powerpc/defs.mk			1.3.6.1
	gnu/usr.bin/gdb6/arch/powerpc/init.c			1.3.6.1
	gnu/usr.bin/gdb6/arch/sh3eb/config.h			1.2.2.2
	gnu/usr.bin/gdb6/arch/sh3eb/defs.mk			1.2.8.3
	gnu/usr.bin/gdb6/arch/sh3eb/init.c			1.1.8.3
	gnu/usr.bin/gdb6/arch/sh3eb/nm.h			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3eb/tm.h			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3eb/version.c			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3el/config.h			1.2.2.2
	gnu/usr.bin/gdb6/arch/sh3el/defs.mk			1.2.8.3
	gnu/usr.bin/gdb6/arch/sh3el/init.c			1.1.8.3
	gnu/usr.bin/gdb6/arch/sh3el/nm.h			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3el/tm.h			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3el/version.c			1.1.8.2
	gnu/usr.bin/gdb6/arch/sparc/defs.mk			1.2.6.1
	gnu/usr.bin/gdb6/arch/sparc/init.c			1.1.6.1
	gnu/usr.bin/gdb6/arch/sparc64/defs.mk			1.2.6.1
	gnu/usr.bin/gdb6/arch/sparc64/init.c			1.1.6.1
	gnu/usr.bin/gdb6/arch/vax/config.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/vax/defs.mk			1.1.6.2
	gnu/usr.bin/gdb6/arch/vax/init.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/vax/tm.h				1.1.6.2
	gnu/usr.bin/gdb6/arch/vax/version.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/x86_64/defs.mk			1.2.6.1
	gnu/usr.bin/gdb6/arch/x86_64/init.c			1.1.6.1
	gnu/usr.bin/gdb6/bfd/arch/armeb/bfd.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/armeb/bfdver.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/armeb/config.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/armeb/defs.mk			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/m68000/bfd.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/m68000/bfdver.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/m68000/config.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/m68000/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/mipsel/bfd.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/mipsel/bfdver.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/mipsel/config.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/mipsel/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/sh3eb/bfd.h			1.1.8.3
	gnu/usr.bin/gdb6/bfd/arch/sh3eb/bfdver.h		1.1.8.2
	gnu/usr.bin/gdb6/bfd/arch/sh3eb/config.h		1.1.8.2
	gnu/usr.bin/gdb6/bfd/arch/sh3eb/defs.mk			1.1.8.3
	gnu/usr.bin/gdb6/bfd/arch/sh3el/bfd.h			1.1.8.3
	gnu/usr.bin/gdb6/bfd/arch/sh3el/bfdver.h		1.1.8.2
	gnu/usr.bin/gdb6/bfd/arch/sh3el/config.h		1.1.8.2
	gnu/usr.bin/gdb6/bfd/arch/sh3el/defs.mk			1.1.8.3
	gnu/usr.bin/gdb6/bfd/arch/vax/bfd.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/vax/bfdver.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/vax/config.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/vax/defs.mk			1.1.6.2
	gnu/usr.bin/gdb6/gdb/Makefile				1.5.2.1.2.2
	gnu/usr.bin/gdb6/gdbtui/Makefile			1.2.6.1
	gnu/usr.bin/gdb6/libiberty/arch/armeb/config.h		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/armeb/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/m68000/config.h		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/m68000/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/mipsel/config.h		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/mipsel/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/sh3eb/config.h		1.1.8.2
	gnu/usr.bin/gdb6/libiberty/arch/sh3eb/defs.mk		1.1.8.2
	gnu/usr.bin/gdb6/libiberty/arch/sh3el/config.h		1.1.8.2
	gnu/usr.bin/gdb6/libiberty/arch/sh3el/defs.mk		1.1.8.2
	gnu/usr.bin/gdb6/libiberty/arch/vax/config.h		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/vax/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/armeb/config.h		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/armeb/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/m68000/config.h		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/m68000/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/mipsel/config.h		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/mipsel/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/sh3eb/config.h		1.1.8.2
	gnu/usr.bin/gdb6/opcodes/arch/sh3eb/defs.mk		1.1.8.3
	gnu/usr.bin/gdb6/opcodes/arch/sh3el/config.h		1.1.8.2
	gnu/usr.bin/gdb6/opcodes/arch/sh3el/defs.mk		1.1.8.3
	gnu/usr.bin/gdb6/opcodes/arch/vax/config.h		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/vax/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/armeb/config.h		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/armeb/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/m68000/config.h		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/m68000/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/mipsel/config.h		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/mipsel/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/sh3eb/config.h		1.1.8.2
	gnu/usr.bin/gdb6/readline/arch/sh3eb/defs.mk		1.1.8.2
	gnu/usr.bin/gdb6/readline/arch/sh3el/config.h		1.1.8.2
	gnu/usr.bin/gdb6/readline/arch/sh3el/defs.mk		1.1.8.2
	gnu/usr.bin/gdb6/readline/arch/vax/config.h		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/vax/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/sim/arch/mipseb/cconfig.h		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipseb/config.h		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipseb/defs.mk		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipsel/cconfig.h		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipsel/config.h		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipsel/defs.mk		1.1.2.1
	lib/libkvm/kvm_sparc64.c				1.10.18.2
	lib/libpthread/pthread.c				1.48.6.4
	lib/libpthread/pthread_barrier.c			1.6.18.1
	lib/libpthread/pthread_cond.c				1.18.12.2
	lib/libpthread/pthread_debug.h				1.8.18.1
	lib/libpthread/pthread_int.h				1.34.4.5
	lib/libpthread/pthread_lock.c				1.14.6.1
	lib/libpthread/pthread_mutex.c				1.22.4.2
	lib/libpthread/pthread_run.c				1.18.12.4
	lib/libpthread/pthread_rwlock.c				1.13.6.2
	lib/libpthread/pthread_sa.c				1.37.6.5
	lib/libpthread/pthread_sig.c				1.47.4.8
	lib/libpthread/pthread_sleep.c				1.7.6.2
	lib/libpthread/sem.c					1.9.6.2
	lib/libpthread/arch/sh3/pthread_md.h			1.3.6.1
	regress/lib/libpthread/resolv/Makefile			1.1.12.1
	regress/lib/libpthread/sigrunning/Makefile		1.1.2.1
	regress/lib/libpthread/sigrunning/sigrunning.c		1.1.2.1
	share/mk/bsd.own.mk					1.489.4.3
	sys/arch/amd64/amd64/locore.S				1.18.14.1
	sys/arch/amd64/amd64/machdep.c				1.44.2.3.2.1
	sys/arch/amd64/conf/kern.ldscript			1.1.70.1
	sys/arch/cats/conf/Makefile.cats.inc			1.17.30.1
	sys/arch/shark/conf/Makefile.shark.inc			1.6.30.1
	sys/arch/sparc64/conf/kern.ldscript			1.7.26.2
	sys/arch/sparc64/conf/kern32.ldscript			1.6.26.2
	sys/arch/sparc64/include/kcore.h			1.4.92.2
	sys/arch/sparc64/sparc64/locore.s			1.232.4.4
	sys/arch/sparc64/sparc64/machdep.c			1.193.4.3
	sys/arch/sparc64/sparc64/pmap.c				1.184.2.1.2.4
	sys/conf/newvers.sh					1.42.26.2
	sys/kern/kern_sa.c					1.87.4.11
	sys/kern/kern_synch.c					1.173.4.2
	sys/sys/savar.h						1.20.10.2
	tools/gdb/Makefile					1.9.4.1
	tools/gdb/mknative-gdb					1.1.6.1

pullup the wrstuden-fixsa CVS branch to netbsd-4:
toolchain/35540 - GDB 6 support for pthreads.
port-sparc64/37534 - ktrace firefox gives
    kernel trap 30: data access expection
GDB changes:
- delete gdb53
- enable gdb6 on all architectures
- add support for amd64 crash dumps
- add support for sparc64 crash dumps
- add support for /proc pid to executable filename for all archs
- enable thread support for all architectures
- add a note section to kernels to all platforms
- support detection/unwinding of signals for most architectures.
- Fix PTHREAD_UCONTEXT_TO_REG / PTHREAD_REG_TO_UCONTEXT on sh3.
- Apply fix from binutils-current so that sparc gdb can be cross built
  on a 64bit host.
SA/pthread changes:
Pre-allocate memory needed for event delivery. Eliminates dropped
interrupts under load.
Deliver intra-process signals to running threads
Eliminate some deadlock scenarios
Fix intra-process signal delivery when delivering to a thread waiting
for signals. Makes afs work again!

Revision 1.248.2.2 / (download) - annotate - [select for diffs], Mon Jul 28 14:37:36 2008 UTC (15 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.248.2.1: +3 -2 lines
Diff to previous 1.248.2.1 (colored) to branchpoint 1.248 (colored) next main 1.249 (colored)

Sync with head.

Revision 1.251 / (download) - annotate - [select for diffs], Fri Jul 25 00:48:59 2008 UTC (15 years, 7 months ago) by uwe
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base
Changes since 1.250: +3 -2 lines
Diff to previous 1.250 (colored)

Declare lwp_exit_switchaway() __dead.  Add infinite loop at the end of
lwp_exit_switchaway() to convince gcc that cpu_switchto(NULL, ...) is
really not going to return in that case.  Exposed by gcc4.3.

Reported on tech-kern by Alexander Shishkin.

Revision 1.241.2.5 / (download) - annotate - [select for diffs], Mon Jul 21 19:13:45 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.241.2.4: +7 -2 lines
Diff to previous 1.241.2.4 (colored) to branchpoint 1.241 (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.248.2.1 / (download) - annotate - [select for diffs], Thu Jul 3 18:38:11 2008 UTC (15 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.248: +27 -66 lines
Diff to previous 1.248 (colored)

Sync with head.

Revision 1.250 / (download) - annotate - [select for diffs], Wed Jul 2 19:44:10 2008 UTC (15 years, 7 months ago) by rmind
Branch: MAIN
Branch point for: haad-dm
Changes since 1.249: +10 -50 lines
Diff to previous 1.249 (colored)

Remove outdated comments, and historical CCPU_SHIFT.  Make resched_cpu static,
const-ify ccpu.  Note: resched_cpu is not correct, should be revisited.

OK by <ad>.

Revision 1.249 / (download) - annotate - [select for diffs], Wed Jul 2 19:38:37 2008 UTC (15 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.248: +24 -23 lines
Diff to previous 1.248 (colored)

Remove locking of p_stmutex from sched_pstats(), protect l_pctcpu with p_lock,
and make l_cpticks lock-less.  Should fix PR/38296.

Reviewed (slightly different version) by <ad>.

Revision 1.241.2.4 / (download) - annotate - [select for diffs], Sun Jun 29 03:30:17 2008 UTC (15 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.241.2.3: +5 -5 lines
Diff to previous 1.241.2.3 (colored) to branchpoint 1.241 (colored)

Move the call to sa_awaken() up some so we always call it. sa_yield
threads now are on a condvar, and otherwise won't get this routine. Since
this routine is specifically to kick sa_yield threads back to life, don't
do that.

Revision 1.241.2.3 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:51 2008 UTC (15 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.241.2.2: +175 -92 lines
Diff to previous 1.241.2.2 (colored) to branchpoint 1.241 (colored)

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

Revision 1.227.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:39 2008 UTC (15 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.227.2.1: +175 -92 lines
Diff to previous 1.227.2.1 (colored) to branchpoint 1.227 (colored) next main 1.228 (colored)

sync with head

Revision 1.217.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:09 2008 UTC (15 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.217.6.1: +389 -134 lines
Diff to previous 1.217.6.1 (colored) to branchpoint 1.217 (colored)

Sync with HEAD.

Revision 1.248 / (download) - annotate - [select for diffs], Sat May 31 21:26:01 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl
Changes since 1.247: +10 -10 lines
Diff to previous 1.247 (colored)

PR kern/38812 race between lwp_exit_switchaway and exit1/coredump

Move the LWP RUNNING and TIMEINTR flags into the thread-private flag word.

Revision 1.247 / (download) - annotate - [select for diffs], Thu May 29 23:29:59 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.246: +3 -3 lines
Diff to previous 1.246 (colored)

lwp_exit_switchaway: set l_lwpctl->lc_curcpu = EXITED, not NONE.

Revision 1.246 / (download) - annotate - [select for diffs], Thu May 29 22:33:27 2008 UTC (15 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.245: +17 -48 lines
Diff to previous 1.245 (colored)

Simplifcation for running LWP migration.  Removes double-locking in
mi_switch(), migration for LSONPROC is now performed via idle loop.
Handles/fixes on-CPU case in lwp_migrate(), misc.

Closes PR/38169, idea of migration via idle loop by Andrew Doran.

Revision 1.245 / (download) - annotate - [select for diffs], Tue May 27 17:51:17 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.244: +140 -29 lines
Diff to previous 1.244 (colored)

Move lwp_exit_switchaway() into kern_synch.c. Instead of always switching
to the idle loop, pick a new LWP from the run queue.

Revision 1.244 / (download) - annotate - [select for diffs], Mon May 26 12:08:38 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.243: +17 -12 lines
Diff to previous 1.243 (colored)

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

Revision 1.241.2.2 / (download) - annotate - [select for diffs], Fri May 23 05:24:16 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.241.2.1: +24 -2 lines
Diff to previous 1.241.2.1 (colored) to branchpoint 1.241 (colored)

Re-add calls to sa_awaken() and sa_switch(). Also add
back sa_awaken() itself. While here, remove the "type"
arguement to sa_switch() - it is all about generating
blocked upcalls.

Revision 1.243 / (download) - annotate - [select for diffs], Mon May 19 17:06:02 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: hpcarm-cleanup-nbase
Changes since 1.242: +2 -4 lines
Diff to previous 1.242 (colored)

Reduce ifdefs due to MULTIPROCESSOR slightly.

Revision 1.242 / (download) - annotate - [select for diffs], Mon May 19 12:48:54 2008 UTC (15 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.241: +3 -3 lines
Diff to previous 1.241 (colored)

- Make periodical balancing mandatory.
- Fix priority raising in M2 (broken after making runqueues mandatory).

Revision 1.227.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:09 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.227: +213 -690 lines
Diff to previous 1.227 (colored)

sync with head.

Revision 1.230.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:26 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.230: +184 -689 lines
Diff to previous 1.230 (colored)

sync with head.

Revision 1.241.2.1 / (download) - annotate - [select for diffs], Sat May 10 23:49:04 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.241: +4 -2 lines
Diff to previous 1.241 (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.241 / (download) - annotate - [select for diffs], Wed Apr 30 12:44:27 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Changes since 1.240: +7 -3 lines
Diff to previous 1.240 (colored)

Avoid unneeded AST faults.

Revision 1.240 / (download) - annotate - [select for diffs], Wed Apr 30 00:52:22 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.239: +3 -3 lines
Diff to previous 1.239 (colored)

kpreempt: fix a block that should only have compiled as C++... I gues
there is a parsing bug in gcc that let it through.

Revision 1.239 / (download) - annotate - [select for diffs], Wed Apr 30 00:30:56 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.238: +6 -6 lines
Diff to previous 1.238 (colored)

Reapply 1.235 which was lost with a subsequent merge.

Revision 1.238 / (download) - annotate - [select for diffs], Tue Apr 29 15:51:23 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.237: +8 -3 lines
Diff to previous 1.237 (colored)

Ignore processes with PK_MARKER set.

Revision 1.237 / (download) - annotate - [select for diffs], Tue Apr 29 14:35:20 2008 UTC (15 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.236: +23 -712 lines
Diff to previous 1.236 (colored)

Split the runqueue management code into the separate file.
OK by <ad>.

Revision 1.236 / (download) - annotate - [select for diffs], Tue Apr 29 13:56:14 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.235: +4 -6 lines
Diff to previous 1.235 (colored)

Suspended LWPs are no longer created with l_mutex == spc_mutex. Remove
workaround in setrunnable. Fixes PR kern/38222.

Revision 1.235 / (download) - annotate - [select for diffs], Mon Apr 28 22:15:47 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.234: +6 -6 lines
Diff to previous 1.234 (colored)

EVCNT_TYPE_INTR -> EVCNT_TYPE_MISC

Revision 1.234 / (download) - annotate - [select for diffs], Mon Apr 28 21:17:16 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.233: +14 -41 lines
Diff to previous 1.233 (colored)

Make the preemption switch a __HAVE instead of an option.

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

Remove clause 3 and 4 from TNF licenses

Revision 1.232 / (download) - annotate - [select for diffs], Mon Apr 28 15:38:03 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.231: +7 -2 lines
Diff to previous 1.231 (colored)

Even if PREEMPTION is defined, disable it by default until any preemption
safety issues have been ironed out. Can be enabled at runtime with sysctl.

Revision 1.231 / (download) - annotate - [select for diffs], Mon Apr 28 15:36:01 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.230: +231 -25 lines
Diff to previous 1.230 (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.230 / (download) - annotate - [select for diffs], Sun Apr 27 11:37:48 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.229: +33 -2 lines
Diff to previous 1.229 (colored)

- Rename crit_enter/crit_exit to kpreempt_disable/kpreempt_enable.
  DragonflyBSD uses the crit names for something quite different.
- Add a kpreempt_disabled function for diagnostic assertions.
- Add inline versions of kpreempt_enable/kpreempt_disable for primitives.
- Make some more changes for preemption safety to the x86 pmap.

Revision 1.229 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:24 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.228: +8 -8 lines
Diff to previous 1.228 (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.228 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:29 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.227: +7 -10 lines
Diff to previous 1.227 (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.227 / (download) - annotate - [select for diffs], Sun Apr 13 22:54:19 2008 UTC (15 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.226: +4 -3 lines
Diff to previous 1.226 (colored)

sched_print_runqueue: add __printf__ attribute to the 'pr' argument.

Revision 1.226 / (download) - annotate - [select for diffs], Sun Apr 13 22:53:31 2008 UTC (15 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.225: +4 -5 lines
Diff to previous 1.225 (colored)

sched_print_runqueue: fix printf formats.

Revision 1.225 / (download) - annotate - [select for diffs], Sun Apr 13 16:22:14 2008 UTC (15 years, 10 months ago) by dogcow
Branch: MAIN
Changes since 1.224: +6 -2 lines
Diff to previous 1.224 (colored)

Since nobody else has fixed it yet: fix case of GDB && !MULTIPROCESSOR.

Revision 1.224 / (download) - annotate - [select for diffs], Sat Apr 12 17:16:09 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.223: +6 -6 lines
Diff to previous 1.223 (colored)

Move the LW_BOUND flag into the thread-private flag word. It can be tested
by other threads/CPUs but that is only done when the LWP is known to be in a
quiescent state (for example, on a run queue).

Revision 1.223 / (download) - annotate - [select for diffs], Sat Apr 12 17:02:08 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.222: +652 -7 lines
Diff to previous 1.222 (colored)

Take the run queue management code from the M2 scheduler, and make it
mandatory. Remove the 4BSD run queue code. Effects:

- Pluggable scheduler is only responsible for co-ordinating timeshared jobs.
- All systems run with per-CPU run queues.
- 4BSD scheduler gets processor sets / affinity.
- 4BSD scheduler gets a significant peformance boost on some workloads.

Discussed on tech-kern@.

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

Sync with HEAD.

Revision 1.222 / (download) - annotate - [select for diffs], Wed Apr 2 17:38:16 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.221: +2 -9 lines
Diff to previous 1.221 (colored)

yield: don't drop priority to zero. libpthread doesn't make much use of
this any more but applications do and it now pessimizes benchmarks.

Revision 1.149.2.11 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:02 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.149.2.10: +6 -6 lines
Diff to previous 1.149.2.10 (colored) next main 1.150 (colored)

sync with head.

Revision 1.217.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:14 2008 UTC (15 years, 11 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.217: +18 -11 lines
Diff to previous 1.217 (colored) next main 1.218 (colored)

sync with head.

Revision 1.194.2.5 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:59 2008 UTC (15 years, 11 months ago) by matt
Branch: matt-armv6
Changes since 1.194.2.4: +62 -22 lines
Diff to previous 1.194.2.4 (colored) to branchpoint 1.194 (colored) next main 1.195 (colored)

sync with HEAD

Revision 1.221 / (download) - annotate - [select for diffs], Mon Mar 17 16:54:51 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.220: +6 -6 lines
Diff to previous 1.220 (colored)

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

Revision 1.149.2.10 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:33 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.149.2.9: +14 -7 lines
Diff to previous 1.149.2.9 (colored)

sync with head.

Revision 1.220 / (download) - annotate - [select for diffs], Sun Mar 16 23:11:30 2008 UTC (15 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.219: +8 -3 lines
Diff to previous 1.219 (colored)

Workaround the case, when l_cpu changes to l_target_cpu, and causes
the locking against oneself. Will be revisited. OK by <ad>.

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

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

Revision 1.218 / (download) - annotate - [select for diffs], Tue Mar 11 02:24:43 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.217: +5 -5 lines
Diff to previous 1.217 (colored)

Make context switch + syscall counters optionally per-CPU and accumulate
in schedclock() at "about 16 hz".

Revision 1.149.2.9 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:55 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.149.2.8: +7 -7 lines
Diff to previous 1.149.2.8 (colored)

sync with head.

Revision 1.203.2.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:46 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs
Changes since 1.203.2.3: +51 -15 lines
Diff to previous 1.203.2.3 (colored) next main 1.204 (colored)

Sync with HEAD.

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

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

Revision 1.149.2.8 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:13 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.149.2.7: +57 -30 lines
Diff to previous 1.149.2.7 (colored)

sync with head

Revision 1.211.6.3 / (download) - annotate - [select for diffs], Sat Jan 19 12:15:22 2008 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.211.6.2: +40 -7 lines
Diff to previous 1.211.6.2 (colored) to branchpoint 1.211 (colored) next main 1.212 (colored)

Sync with HEAD

Revision 1.216 / (download) - annotate - [select for diffs], Tue Jan 15 03:37:11 2008 UTC (16 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.215: +42 -9 lines
Diff to previous 1.215 (colored)

Implementation of processor-sets, affinity and POSIX real-time extensions.
Add schedctl(8) - a program to control scheduling of processes and threads.

Notes:
- This is supported only by SCHED_M2;
- Migration of LWP mechanism will be revisited;

Proposed on: <tech-kern>. Reviewed by: <ad>.

Revision 1.194.2.4 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:10 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.194.2.3: +91 -102 lines
Diff to previous 1.194.2.3 (colored) to branchpoint 1.194 (colored)

sync with HEAD

Revision 1.211.6.2 / (download) - annotate - [select for diffs], Tue Jan 8 22:11:36 2008 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.211.6.1: +1 -0 lines
Diff to previous 1.211.6.1 (colored) to branchpoint 1.211 (colored)

Sync with HEAD

Revision 1.215 / (download) - annotate - [select for diffs], Fri Jan 4 21:18:10 2008 UTC (16 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.214: +3 -2 lines
Diff to previous 1.214 (colored)

Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.

Revision 1.173.4.2 / (download) - annotate - [select for diffs], Fri Jan 4 20:17:03 2008 UTC (16 years, 1 month ago) by skrll
Branch: wrstuden-fixsa
Changes since 1.173.4.1: +5 -5 lines
Diff to previous 1.173.4.1 (colored) to branchpoint 1.173 (colored) next main 1.174 (colored)

s/proc/LWP/ in a couple of comments

Revision 1.211.6.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:56:01 2008 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.211: +16 -23 lines
Diff to previous 1.211 (colored)

Sync with HEAD

Revision 1.214 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:51 2008 UTC (16 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.213: +3 -3 lines
Diff to previous 1.213 (colored)

Merge vmlocking2 to head.

Revision 1.211.2.4 / (download) - annotate - [select for diffs], Fri Dec 28 21:40:48 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.211.2.3: +4 -2 lines
Diff to previous 1.211.2.3 (colored) to branchpoint 1.211 (colored) next main 1.212 (colored)

Sync with head.

Revision 1.213 / (download) - annotate - [select for diffs], Thu Dec 27 22:13:19 2007 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.212: +4 -2 lines
Diff to previous 1.212 (colored)

sched_pstats: need proclist_mutex to send signals.

Revision 1.203.2.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:02 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.203.2.2: +13 -22 lines
Diff to previous 1.203.2.2 (colored)

Sync with HEAD.

Revision 1.211.2.3 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:41 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.211.2.2: +13 -22 lines
Diff to previous 1.211.2.2 (colored) to branchpoint 1.211 (colored)

Sync with head.

Revision 1.212 / (download) - annotate - [select for diffs], Sat Dec 22 01:14:54 2007 UTC (16 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.211: +13 -22 lines
Diff to previous 1.211 (colored)

use binuptime for l_stime/l_rtime.

Revision 1.192.2.13 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:20 2007 UTC (16 years, 2 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.192.2.12: +4 -35 lines
Diff to previous 1.192.2.12 (colored) next main 1.193 (colored)

Sync with HEAD.

Revision 1.203.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:32 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.203.2.1: +66 -82 lines
Diff to previous 1.203.2.1 (colored)

Sync with HEAD.

Revision 1.211.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 14:51:15 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.211.2.1: +3 -2 lines
Diff to previous 1.211.2.1 (colored) to branchpoint 1.211 (colored)

Fix merge error.

Revision 1.149.2.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:51 2007 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.149.2.6: +66 -82 lines
Diff to previous 1.149.2.6 (colored)

sync with head

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

Pull the vmlocking changes into a new branch.

Revision 1.211 / (download) - annotate - [select for diffs], Mon Dec 3 20:26:26 2007 UTC (16 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.210: +4 -4 lines
Diff to previous 1.210 (colored)

Soft interrupts can now take proclist_lock, so there is no need to
double-lock alllwp or allproc.

Revision 1.210 / (download) - annotate - [select for diffs], Mon Dec 3 17:15:00 2007 UTC (16 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking-nbase
Changes since 1.209: +2 -33 lines
Diff to previous 1.209 (colored)

For the slow path soft interrupts, arrange to have the priority of a
borrowed user LWP raised into the 'kernel RT' range if the LWP sleeps
(which is unlikely).

Revision 1.192.2.12 / (download) - annotate - [select for diffs], Mon Dec 3 16:14:54 2007 UTC (16 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.192.2.11: +64 -49 lines
Diff to previous 1.192.2.11 (colored)

Sync with HEAD.

Revision 1.209 / (download) - annotate - [select for diffs], Sun Dec 2 14:55:32 2007 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.208: +63 -49 lines
Diff to previous 1.208 (colored)

- mi_switch: adjust so that we don't have to hold the old LWP locked across
  context switch, since cpu_switchto() can be slow under certain conditions.
  From rmind@ with adjustments by me.
- lwpctl: allow LWPs to reregister instead of returning EINVAL. Just return
  their existing lwpctl user address.

Revision 1.208 / (download) - annotate - [select for diffs], Thu Nov 29 15:41:07 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.207: +3 -2 lines
Diff to previous 1.207 (colored)

cv_init(&lbolt, "lbolt");

Revision 1.203.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:43 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.203: +106 -102 lines
Diff to previous 1.203 (colored)

Sync with HEAD.

Revision 1.149.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:45 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.149.2.5: +114 -102 lines
Diff to previous 1.149.2.5 (colored)

sync with head.

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

Sync with HEAD.

Revision 1.201.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:12 2007 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.201: +114 -102 lines
Diff to previous 1.201 (colored) next main 1.202 (colored)

Sync with HEAD

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

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

Revision 1.192.2.10 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:04 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.192.2.9: +6 -6 lines
Diff to previous 1.192.2.9 (colored)

Sync with HEAD.

Revision 1.206 / (download) - annotate - [select for diffs], Sat Nov 10 17:45:10 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.205: +6 -6 lines
Diff to previous 1.205 (colored)

Put back equivalent change to rev 1.189 which was lost:

setrunnable: adjust to slightly different locking strategy post
yamt-idlewlp. Should fix kern/36398. Untested due to connectivity issues.

Revision 1.194.2.3 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:03 2007 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.194.2.2: +15 -8 lines
Diff to previous 1.194.2.2 (colored) to branchpoint 1.194 (colored)

sync with -HEAD

Revision 1.194.2.2 / (download) - annotate - [select for diffs], Tue Nov 6 23:31:59 2007 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.194.2.1: +150 -112 lines
Diff to previous 1.194.2.1 (colored) to branchpoint 1.194 (colored)

sync with HEAD

Revision 1.192.2.9 / (download) - annotate - [select for diffs], Tue Nov 6 21:16:25 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.192.2.8: +15 -8 lines
Diff to previous 1.192.2.8 (colored)

Sync with HEAD.

Revision 1.192.2.8 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:31 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.192.2.7: +95 -109 lines
Diff to previous 1.192.2.7 (colored)

Sync with HEAD.

Revision 1.205 / (download) - annotate - [select for diffs], Tue Nov 6 17:57:46 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.204: +15 -8 lines
Diff to previous 1.204 (colored)

Fix merge error. Spotted by rmind@.

Revision 1.204 / (download) - annotate - [select for diffs], Tue Nov 6 00:42:43 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Changes since 1.203: +95 -109 lines
Diff to previous 1.203 (colored)

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

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

Revision 1.192.2.7 / (download) - annotate - [select for diffs], Sun Nov 4 21:03:32 2007 UTC (16 years, 3 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.192.2.6: +15 -8 lines
Diff to previous 1.192.2.6 (colored)

Sync with HEAD.

Revision 1.203 / (download) - annotate - [select for diffs], Sun Nov 4 11:43:07 2007 UTC (16 years, 3 months ago) by rmind
Branch: MAIN
Branch point for: mjf-devfs
Changes since 1.202: +15 -8 lines
Diff to previous 1.202 (colored)

- Migrate all threads when the state of CPU is changed to offline;
- Fix inverted logic with r_mcount in M2;
- setrunnable: perform sched_takecpu() when making the LWP runnable;
- setrunnable: l_mutex cannot be spc_mutex here;

This makes cpuctl(8) work with SCHED_M2.

OK by <ad>.

Revision 1.186.2.21 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:20 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.20: +43 -62 lines
Diff to previous 1.186.2.20 (colored) next main 1.187 (colored)

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

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

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

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

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

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

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

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

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

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

- newlwp -> lwp_create

Revision 1.192.2.6 / (download) - annotate - [select for diffs], Wed Oct 31 23:14:10 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.192.2.5: +3 -2 lines
Diff to previous 1.192.2.5 (colored)

Sync with HEAD.

Revision 1.202 / (download) - annotate - [select for diffs], Mon Oct 29 12:16:54 2007 UTC (16 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.201: +3 -2 lines
Diff to previous 1.201 (colored)

reduce dependencies on opt_sched.h.

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

sync with head.

Revision 1.192.2.5 / (download) - annotate - [select for diffs], Fri Oct 26 15:48:36 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.192.2.4: +73 -34 lines
Diff to previous 1.192.2.4 (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.186.2.20 / (download) - annotate - [select for diffs], Tue Oct 23 20:17:12 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.19: +4 -3 lines
Diff to previous 1.186.2.19 (colored)

Sync with head.

Revision 1.186.2.19 / (download) - annotate - [select for diffs], Thu Oct 18 15:47:33 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.18: +30 -5 lines
Diff to previous 1.186.2.18 (colored)

Update for soft interrupt changes. See kern_softint.c 1.1.2.17 for details.

Revision 1.194.4.2 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:43 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.194.4.1: +73 -34 lines
Diff to previous 1.194.4.1 (colored) to branchpoint 1.194 (colored) next main 1.195 (colored)

sync with head.

Revision 1.201 / (download) - annotate - [select for diffs], Sat Oct 13 00:30:26 2007 UTC (16 years, 4 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3
Branch point for: bouyer-xenamd64
Changes since 1.200: +4 -3 lines
Diff to previous 1.200 (colored)

- Fix a comment: LSIDL is covered by spc_mutex, not spc_lwplock.
- mi_switch: Add a comment that spc_lwplock might not necessary be held.

Revision 1.186.2.18 / (download) - annotate - [select for diffs], Wed Oct 10 23:03:24 2007 UTC (16 years, 4 months ago) by rmind
Branch: vmlocking
Changes since 1.186.2.17: +17 -6 lines
Diff to previous 1.186.2.17 (colored)

Sync with HEAD.

Revision 1.200 / (download) - annotate - [select for diffs], Tue Oct 9 19:00:14 2007 UTC (16 years, 4 months ago) by rmind
Branch: MAIN
CVS Tags: vmlocking-base
Changes since 1.199: +17 -6 lines
Diff to previous 1.199 (colored)

Import of SCHED_M2 - the implementation of new scheduler, which is based
on the original approach of SVR4 with some inspirations about balancing
and migration from Solaris.  It implements per-CPU runqueues, provides a
real-time (RT) and time-sharing (TS) queues, ready to support a POSIX
real-time extensions, and also prepared for the support of CPU affinity.

The following lines in the kernel config enables the SCHED_M2:

no options SCHED_4BSD
options SCHED_M2

The scheduler seems to be stable.  Further work will come soon.

http://mail-index.netbsd.org/tech-kern/2007/10/04/0001.html
http://www.netbsd.org/~rmind/m2/mysql_bench_ro_4x_local.png
Thanks <ad> for the benchmarks!

Revision 1.186.2.17 / (download) - annotate - [select for diffs], Tue Oct 9 15:22:21 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.16: +33 -15 lines
Diff to previous 1.186.2.16 (colored)

Sync with head.

Revision 1.199 / (download) - annotate - [select for diffs], Mon Oct 8 20:06:19 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.198: +56 -29 lines
Diff to previous 1.198 (colored)

Merge run time accounting changes from the vmlocking branch. These make
the LWP "start time" per-thread instead of per-CPU.

Revision 1.194.4.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:28:44 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.194: +18 -13 lines
Diff to previous 1.194 (colored)

sync with head.

Revision 1.192.2.4 / (download) - annotate - [select for diffs], Thu Oct 4 15:44:52 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.192.2.3: +9 -6 lines
Diff to previous 1.192.2.3 (colored)

Sync with HEAD.

Revision 1.198 / (download) - annotate - [select for diffs], Wed Oct 3 11:20:09 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2
Changes since 1.197: +9 -6 lines
Diff to previous 1.197 (colored)

- sched_yield: When yielding, drop the priority to MAXPRI ensuring that the
  calling thread really does yield. The scheduler will adjust it back to a
  reasonable level within 1 second. This contradicts POSIX, which specifies
  that sched_yield() put the thread onto the back of its current runqueue.
  However, POSIX doesn't really have any business specifying what should
  happen for SCHED_OTHER (i.e.  a timesharing scheduler like ours), and
  Java, MySQL and libpthread rely on sched_yield() doing something useful.

- mi_switch: adjust spc_curpriority and newl->l_priority if we avoided
  the runqueues and are doing a direct switch. Since nothing currently
  does that, there should be no functional change.

Revision 1.192.2.3 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:02 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.192.2.2: +11 -9 lines
Diff to previous 1.192.2.2 (colored)

Sync with HEAD.

Revision 1.197 / (download) - annotate - [select for diffs], Tue Oct 2 13:17:16 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.196: +3 -3 lines
Diff to previous 1.196 (colored)

Fix assertion that broke debug kernels.

Revision 1.196 / (download) - annotate - [select for diffs], Mon Oct 1 22:14:23 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.195: +11 -9 lines
Diff to previous 1.195 (colored)

Enter mi_switch() from the idle loop if ci_want_resched is set. If there
are no jobs to run it will clear it while under lock. Should fix idle.

Revision 1.195 / (download) - annotate - [select for diffs], Tue Sep 25 21:38:57 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.194: +3 -3 lines
Diff to previous 1.194 (colored)

curlwp appears to be set by all active copies of cpu_switchto - remove
the MI assignments and assert that it's set in mi_switch().

Revision 1.149.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:40:56 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.149.2.3: +372 -728 lines
Diff to previous 1.149.2.3 (colored)

sync with head.

Revision 1.186.2.16 / (download) - annotate - [select for diffs], Sat Sep 1 15:23:58 2007 UTC (16 years, 6 months ago) by yamt
Branch: vmlocking
Changes since 1.186.2.15: +3 -3 lines
Diff to previous 1.186.2.15 (colored)

make "softint block" evcnt per softint_t.  ok'ed by Andrew Doran.

Revision 1.186.2.15 / (download) - annotate - [select for diffs], Fri Aug 31 15:18:12 2007 UTC (16 years, 6 months ago) by yamt
Branch: vmlocking
Changes since 1.186.2.14: +2 -3 lines
Diff to previous 1.186.2.14 (colored)

remove a stale comment.

Revision 1.186.2.14 / (download) - annotate - [select for diffs], Fri Aug 31 15:15:16 2007 UTC (16 years, 6 months ago) by yamt
Branch: vmlocking
Changes since 1.186.2.13: +3 -3 lines
Diff to previous 1.186.2.13 (colored)

updatertime: constify.

Revision 1.194.2.1 / (download) - annotate - [select for diffs], Tue Aug 28 18:43:44 2007 UTC (16 years, 6 months ago) by matt
Branch: matt-armv6
Changes since 1.194: +3 -3 lines
Diff to previous 1.194 (colored)

Pre-init the static structures (lwp0,proc0,session0,etc.) whenever possible.
Use curlwp_set()

Revision 1.186.2.13 / (download) - annotate - [select for diffs], Tue Aug 21 13:59:43 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.12: +9 -6 lines
Diff to previous 1.186.2.12 (colored)

A few minor corrections around calls to cpu_need_resched().

Revision 1.186.2.12 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:34 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.11: +5 -10 lines
Diff to previous 1.186.2.11 (colored)

Sync with HEAD.

Revision 1.190.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:10 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.190: +5 -10 lines
Diff to previous 1.190 (colored) next main 1.191 (colored)

Sync with HEAD.

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

Sync with HEAD.

Revision 1.194.6.2 / (download) - annotate - [select for diffs], Mon Aug 6 11:48:24 2007 UTC (16 years, 6 months ago) by yamt
Branch: matt-mips64
Changes since 1.194.6.1: +919 -0 lines
Diff to previous 1.194.6.1 (colored) to branchpoint 1.194 (colored) next main 1.195 (colored)

suspendsched: reduce #ifdef.

Revision 1.194.6.1, Mon Aug 6 11:48:23 2007 UTC (16 years, 6 months ago) by yamt
Branch: matt-mips64
Changes since 1.194: +0 -919 lines
FILE REMOVED

file kern_synch.c was added on branch matt-mips64 on 2007-08-06 11:48:24 +0000

Revision 1.194 / (download) - annotate - [select for diffs], Mon Aug 6 11:48:23 2007 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-x86pmap-base, nick-csl-alignment-base5, matt-mips64-base
Branch point for: yamt-x86pmap, matt-mips64, matt-armv6
Changes since 1.193: +2 -8 lines
Diff to previous 1.193 (colored)

suspendsched: reduce #ifdef.

Revision 1.192.2.1 / (download) - annotate - [select for diffs], Sat Aug 4 12:33:14 2007 UTC (16 years, 6 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored)

Sync with HEAD.

Revision 1.193 / (download) - annotate - [select for diffs], Sat Aug 4 11:03:01 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored)

Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.

Revision 1.192 / (download) - annotate - [select for diffs], Thu Aug 2 01:48:44 2007 UTC (16 years, 7 months ago) by rmind
Branch: MAIN
Branch point for: jmcneill-pm
Changes since 1.191: +3 -2 lines
Diff to previous 1.191 (colored)

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

Reviewed by <ad> some time ago..

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

Ressurect cv_wakeup() and use it on lbolt. Should fix PR kern/36714.
(background/foreground signal lossage in -current with various programs).

Revision 1.186.2.11 / (download) - annotate - [select for diffs], Sat Jul 14 22:09:45 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.10: +27 -22 lines
Diff to previous 1.186.2.10 (colored)

Make it possible to track time spent by soft interrupts as is done for
normal LWPs, and provide a sysctl to switch it on/off. Not enabled by
default because microtime() is not free. XXX Not happy with this but
I want it get it out of my local tree for the time being.

Revision 1.187.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:09:56 2007 UTC (16 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.187: +321 -729 lines
Diff to previous 1.187 (colored) next main 1.188 (colored)

Sync with head.

Revision 1.190 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:54 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, hpcarm-cleanup
Branch point for: nick-csl-alignment
Changes since 1.189: +48 -29 lines
Diff to previous 1.189 (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.186.2.10 / (download) - annotate - [select for diffs], Sat Jul 7 11:56:11 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.9: +16 -13 lines
Diff to previous 1.186.2.9 (colored)

- Remove the interrupt priority range and use 'kernel RT' instead,
  since only soft interrupts are threaded.
- Rename l->l_pinned to l->l_switchto. It might be useful for (re-)
  implementing SA or doors.
- Simplify soft interrupt dispatch so MD code is doing as little as
  possible that is new.

Revision 1.186.2.9 / (download) - annotate - [select for diffs], Sun Jul 1 21:43:40 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.8: +17 -6 lines
Diff to previous 1.186.2.8 (colored)

- Adapt to callout API change.
- Add a counter to track how often soft interrupts sleep.

Revision 1.186.2.8 / (download) - annotate - [select for diffs], Sun Jun 17 21:31:28 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.7: +71 -64 lines
Diff to previous 1.186.2.7 (colored)

- Increase the number of thread priorities from 128 to 256. How the space
  is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
  is provided, with hooks for fast-path MD code that can run the interrupt
  threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
  locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.

Revision 1.186.2.7 / (download) - annotate - [select for diffs], Sat Jun 9 23:58:05 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.6: +7 -6 lines
Diff to previous 1.186.2.6 (colored)

Sync with head.

Revision 1.186.2.6 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:22 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.5: +295 -714 lines
Diff to previous 1.186.2.5 (colored)

Sync with head.

Revision 1.189 / (download) - annotate - [select for diffs], Thu May 31 22:06:09 2007 UTC (16 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.188: +7 -6 lines
Diff to previous 1.188 (colored)

setrunnable: adjust to slightly different locking strategy post yamt-idlewlp.
Should fix kern/36398. Untested due to connectivity issues.

Revision 1.173.4.1 / (download) - annotate - [select for diffs], Thu May 17 22:53:05 2007 UTC (16 years, 9 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.173: +3 -16 lines
Diff to previous 1.173 (colored)

Adjust how we handle allocating an SA Event structure used to inform
the application that we are blocking.

Since we only generate BLOCKED upcalls when the thread "on" the
vp blocks and further since the first thing we do after this is
run the upcall delivery code (we switch to the lwp lying around for
this very purpose), we will never generate more BLOCKED upcalls than
we have vps. We have an invariant, let's use it.

So we add a pointer to the vp structure, and store an upcall event
data structure in it. When we block in sa_switch(), we use that
structure. When we deliver an upcall into userland, if our vp is
lacking an upcall event structure, we don't free the upcall
event structure for the event we just delivered, we instead hang it
off of the vp.

We thus no longer need to allocate memory when blocking.

This version of the code contains a panic() in the case that we do
not have an upcall event structure available in sa_switch(). Keep this in
mind before putting this version into a production environment.

It has been suggested that it would be easier to embed an upcall event
structure in the virtual processor structure, given the invariant above.
The problem is that while we only can generate one BLOCKED per vp, we
do not necessarily deliver that upcall immediately to userland. If there
were pending upcalls, we deliver them first. As such, we can have code
running on the vp before the BLOCKED event is delivered. If _that_ code
blocks, we have no where to store that information. Thus we limit ourselves
to holding a pointer to separately-allocated memory.

Revision 1.188 / (download) - annotate - [select for diffs], Thu May 17 14:51:40 2007 UTC (16 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.187: +298 -726 lines
Diff to previous 1.187 (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.177.2.29 / (download) - annotate - [select for diffs], Sun May 13 17:02:58 2007 UTC (16 years, 9 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.177.2.28: +53 -42 lines
Diff to previous 1.177.2.28 (colored) next main 1.178 (colored)

Assign a per-CPU lock to LWPs as they transition into the ONPROC state.

http://mail-index.netbsd.org/tech-kern/2007/05/06/0003.html

Revision 1.177.2.28 / (download) - annotate - [select for diffs], Sat Apr 21 15:50:17 2007 UTC (16 years, 10 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.177.2.27: +29 -27 lines
Diff to previous 1.177.2.27 (colored)

Some changes mainly for top/ps:

- Add an optional name field to struct lwp.
- Count the total number of context switches + involuntary,
  not voluntary + involuntary.
- Mark the idle threads as LSIDL when not running, otherwise
  they show up funny in a top(1) that shows threads.
- Make pctcpu and cpticks per-LWP attributes.
- Add to kinfo_lwp: cpticks, pctcpu, pid, name.

Revision 1.177.2.27 / (download) - annotate - [select for diffs], Thu Apr 19 04:19:44 2007 UTC (16 years, 10 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.177.2.26: +10 -15 lines
Diff to previous 1.177.2.26 (colored)

Pull up a change from the vmlocking branch:

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

Revision 1.177.2.26 / (download) - annotate - [select for diffs], Wed Apr 18 12:36:03 2007 UTC (16 years, 10 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.177.2.25: +2 -2 lines
Diff to previous 1.177.2.25 (colored)

Add back missing RCS ID.

Revision 1.177.2.25 / (download) - annotate - [select for diffs], Wed Apr 18 10:14:55 2007 UTC (16 years, 10 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.24: +2 -2 lines
Diff to previous 1.177.2.24 (colored)

sched_pstats: fix p_pctcpu decay.

Revision 1.177.2.24 / (download) - annotate - [select for diffs], Mon Apr 16 23:31:20 2007 UTC (16 years, 10 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.177.2.23: +4 -8 lines
Diff to previous 1.177.2.23 (colored)

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

Revision 1.186.2.5 / (download) - annotate - [select for diffs], Tue Apr 10 18:34:05 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.4: +10 -17 lines
Diff to previous 1.186.2.4 (colored)

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

Revision 1.186.2.4 / (download) - annotate - [select for diffs], Thu Apr 5 21:38:37 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.3: +4 -3 lines
Diff to previous 1.186.2.3 (colored)

- Make context switch counters 64-bit, and count the total number of
  context switches + voluntary, instead of involuntary + voluntary.
- Add lwp::l_swaplock for uvm.
- PHOLD/PRELE are replaced.

Revision 1.177.2.23 / (download) - annotate - [select for diffs], Wed Apr 4 22:28:17 2007 UTC (16 years, 10 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.177.2.22: +6 -4 lines
Diff to previous 1.177.2.22 (colored)

Add cpu_did_resched() and call with the per-CPU scheduler lock held.
Needed to interlock with cpu_need_resched() on other CPUs, as there
is a short window where the flag could be clobbered while a higher
priority LWP is waiting to run.

Revision 1.177.2.22 / (download) - annotate - [select for diffs], Tue Apr 3 15:21:20 2007 UTC (16 years, 10 months ago) by matt
Branch: yamt-idlelwp
Changes since 1.177.2.21: +6 -3 lines
Diff to previous 1.177.2.21 (colored)

Nuke __HAVE_BIGENDIAN_BITOPS

Revision 1.177.2.21 / (download) - annotate - [select for diffs], Mon Apr 2 00:28:08 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.177.2.20: +118 -2 lines
Diff to previous 1.177.2.20 (colored)

- Move the ccpu sysctl back to the scheduler-independent part.
- Move the scheduler-independent parts of 4BSD's schedcpu() to
  kern_synch.c.
- Add scheduler-specific hook to satisfy individual scheduler's
  needs.
- Remove autonice, which is archaic and not useful.

Patch provided by Daniel Sieger.

Revision 1.177.2.20 / (download) - annotate - [select for diffs], Sat Mar 24 17:13:14 2007 UTC (16 years, 11 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.177.2.19: +22 -33 lines
Diff to previous 1.177.2.19 (colored)

- Ensure that context switch always happens at least at IPL_SCHED, even
  if no spin lock is held. Should fix the assertion failure seen on hppa.
- Reduce the amount of spl frobbing in mi_switch.
- Add some comments.

Reviewed by yamt@.

Revision 1.177.2.19 / (download) - annotate - [select for diffs], Sat Mar 24 16:50:26 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.177.2.18: +3 -3 lines
Diff to previous 1.177.2.18 (colored)

sched_nextlwp: Remove struct lwp * argument, it is no longer needed.
Note by yamt@

Revision 1.177.2.18 / (download) - annotate - [select for diffs], Sat Mar 24 00:43:08 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.177.2.17: +14 -21 lines
Diff to previous 1.177.2.17 (colored)

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

Revision 1.177.2.17 / (download) - annotate - [select for diffs], Wed Mar 21 22:04:18 2007 UTC (16 years, 11 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.177.2.16: +6 -17 lines
Diff to previous 1.177.2.16 (colored)

Previously cpu_info::ci_curlwp was protected by the sched_mutex and this is
used in a few places to synchronise. Now the state of LWPs is protected
during switch by their current lock (which might be e.g. a sleep queue
lock). So ci_curlwp is unlocked, which is necessary to be able to do
preemption and to run interrupts as LWPs cheaply.

Add a (locked) flag to the lwp (LW_RUNNING) that indicates if it is on CPU
somewhere. More exactly, it means that the LWP's state is tied to a CPU, and
that the LWP has not yet switched away even if (l->l_cpu->ci_curcpu != l) or
(l->l_stat != LSONPROC).

Revision 1.186.2.3 / (download) - annotate - [select for diffs], Wed Mar 21 20:16:32 2007 UTC (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.2: +15 -21 lines
Diff to previous 1.186.2.2 (colored)

- Put a lock around the proc's CWD info (work in progress).
- Replace some more simplelocks.
- Make lbolt a condvar.

Revision 1.177.2.16 / (download) - annotate - [select for diffs], Sat Mar 17 16:54:37 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.177.2.15: +22 -11 lines
Diff to previous 1.177.2.15 (colored)

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

Requested by yamt@

Revision 1.186.2.2 / (download) - annotate - [select for diffs], Tue Mar 13 17:50:57 2007 UTC (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.186.2.1: +2 -3 lines
Diff to previous 1.186.2.1 (colored)

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

Revision 1.186.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:51:55 2007 UTC (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.186: +30 -2 lines
Diff to previous 1.186 (colored)

Sync with head.

Revision 1.177.2.15 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:38 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.177.2.14: +30 -2 lines
Diff to previous 1.177.2.14 (colored)

Sync with HEAD.

Revision 1.187 / (download) - annotate - [select for diffs], Sun Mar 11 21:36:49 2007 UTC (16 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.186: +30 -2 lines
Diff to previous 1.186 (colored)

Put back mtsleep() temporarily. Converting everything over to condvars
at once will take too much time..

Revision 1.177.2.14 / (download) - annotate - [select for diffs], Fri Mar 9 17:15:58 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.177.2.13: +8 -6 lines
Diff to previous 1.177.2.13 (colored)

Minor update on mi_switch commentary. From Daniel Sieger.

Revision 1.177.2.13 / (download) - annotate - [select for diffs], Fri Mar 9 15:16:25 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.177.2.12: +10 -24 lines
Diff to previous 1.177.2.12 (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.186 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:06 2007 UTC (16 years, 11 months ago) by christos
Branch: MAIN
Branch point for: vmlocking
Changes since 1.185: +3 -3 lines
Diff to previous 1.185 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.177.2.12 / (download) - annotate - [select for diffs], Sat Mar 3 15:37:41 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.11: +1 -0 lines
Diff to previous 1.177.2.11 (colored)

sched_switch_unlock: add an assertion.

Revision 1.177.2.11 / (download) - annotate - [select for diffs], Tue Feb 27 17:23:24 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.10: +7 -7 lines
Diff to previous 1.177.2.10 (colored)

fix merge botches.

Revision 1.177.2.10 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:25 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.9: +81 -30 lines
Diff to previous 1.177.2.9 (colored)

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

Revision 1.185 / (download) - annotate - [select for diffs], Tue Feb 27 15:07:29 2007 UTC (17 years ago) by yamt
Branch: MAIN
Changes since 1.184: +9 -9 lines
Diff to previous 1.184 (colored)

typedef pri_t and use it instead of int and u_char.

Revision 1.184 / (download) - annotate - [select for diffs], Mon Feb 26 09:20:53 2007 UTC (17 years ago) by yamt
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.183: +41 -12 lines
Diff to previous 1.183 (colored)

implement priority inheritance.

Revision 1.177.2.9 / (download) - annotate - [select for diffs], Mon Feb 26 09:18:09 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.8: +3 -3 lines
Diff to previous 1.177.2.8 (colored)

add an "immediate" flag for cpu_need_resched().  suggested by Andrew Doran.

Revision 1.149.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:11 2007 UTC (17 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.149.2.2: +502 -662 lines
Diff to previous 1.149.2.2 (colored)

sync with head.

Revision 1.183 / (download) - annotate - [select for diffs], Fri Feb 23 16:51:47 2007 UTC (17 years ago) by ad
Branch: MAIN
Changes since 1.182: +6 -12 lines
Diff to previous 1.182 (colored)

setrunnable(): don't require that sleeps be interruptable. This breaks
smbfs. Fixes PR/35787.

Revision 1.177.2.8 / (download) - annotate - [select for diffs], Fri Feb 23 15:57:45 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.7: +1 -2 lines
Diff to previous 1.177.2.7 (colored)

- introduce sys/cpu.h which has cpu_idle and cpu_need_resched.
- use it where appropriate.
- while i'm here, remove several unnecessary #include.

Revision 1.177.2.7 / (download) - annotate - [select for diffs], Fri Feb 23 11:55:43 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.6: +3 -2 lines
Diff to previous 1.177.2.6 (colored)

mi_switch: update l_stat and l_cpu with sched_mutex held.

Revision 1.182 / (download) - annotate - [select for diffs], Wed Feb 21 23:48:15 2007 UTC (17 years ago) by thorpej
Branch: MAIN
Changes since 1.181: +3 -3 lines
Diff to previous 1.181 (colored)

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

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

Revision 1.177.2.6 / (download) - annotate - [select for diffs], Wed Feb 21 12:05:48 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.5: +2 -7 lines
Diff to previous 1.177.2.5 (colored)

remove some unnecessary #include.

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

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

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

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

Note: further work will go soon.

Revision 1.181 / (download) - annotate - [select for diffs], Mon Feb 19 22:14:15 2007 UTC (17 years ago) by dsl
Branch: MAIN
Changes since 1.180: +8 -10 lines
Diff to previous 1.180 (colored)

Revert 'optimisation' added in rev 1.179.
On i386 (at least) gcc manages two generate two forwards branches which are not
usually taken for the old code, and one forwards branch that is usually taken
for my 'improved version'.  Since (IIRC) both athlon and P4 will predict
forwards branches 'not taken' the old code is likely to be faster :-(
Faster variants exist, especially ones using the cmov instruction.

Revision 1.177.2.4 / (download) - annotate - [select for diffs], Sun Feb 18 22:27:59 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.3: +1 -1 lines
Diff to previous 1.177.2.3 (colored)

sched_switch_unlock: fix a typo which causes lockdebug panic.

Revision 1.180 / (download) - annotate - [select for diffs], Sun Feb 18 16:58:16 2007 UTC (17 years ago) by dsl
Branch: MAIN
Changes since 1.179: +6 -2 lines
Diff to previous 1.179 (colored)

Add code to support per-system call statistics:
option SYSCALL_STATS	counts the number of times each system call is made
option SYSCALL_TIMES	counts the amount of time spent in each system call
Currently the counting hooks have only been added to the i386 system call
handler, and the time spent in interrupts is not subtracted.
It ought also be possible to add the times to the processes profiling
counters in order to get a more accurate user/system/interrupt split.
The counts themselves are readable via the sysctl interface.

Revision 1.179 / (download) - annotate - [select for diffs], Sun Feb 18 16:03:06 2007 UTC (17 years ago) by dsl
Branch: MAIN
Changes since 1.178: +11 -8 lines
Diff to previous 1.178 (colored)

Optimise canonicalisation of l_rtime for the case when the start and stop
times are in the same second.

Revision 1.178 / (download) - annotate - [select for diffs], Sat Feb 17 22:31:43 2007 UTC (17 years ago) by pavel
Branch: MAIN
Changes since 1.177: +11 -11 lines
Diff to previous 1.177 (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.177.2.3 / (download) - annotate - [select for diffs], Sat Feb 17 11:13:51 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.2: +35 -25 lines
Diff to previous 1.177.2.2 (colored)

mi_switch: reduce the number of microtime calls.

Revision 1.177.2.2 / (download) - annotate - [select for diffs], Sat Feb 17 11:00:52 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.1: +19 -13 lines
Diff to previous 1.177.2.1 (colored)

while switching, hold "switched from" lwp's l_mutex rather than sched_mutex.

Revision 1.177.2.1 / (download) - annotate - [select for diffs], Sat Feb 17 10:30:58 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177: +152 -39 lines
Diff to previous 1.177 (colored)

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

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

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

Revision 1.176 / (download) - annotate - [select for diffs], Sat Feb 10 14:02:01 2007 UTC (17 years ago) by yamt
Branch: MAIN
Changes since 1.175: +2 -3 lines
Diff to previous 1.175 (colored)

remove function prototypes of sa_awaken.

Revision 1.175 / (download) - annotate - [select for diffs], Sat Feb 10 02:55:18 2007 UTC (17 years ago) by christos
Branch: MAIN
Changes since 1.174: +6 -9 lines
Diff to previous 1.174 (colored)

avoid using struct proc in the perfctrs case, where the variable might
not be used.

Revision 1.174 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:31 2007 UTC (17 years ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.173: +504 -659 lines
Diff to previous 1.173 (colored)

Merge newlock2 to head.

Revision 1.166.2.20 / (download) - annotate - [select for diffs], Fri Feb 9 19:58:10 2007 UTC (17 years ago) by ad
Branch: newlock2
Changes since 1.166.2.19: +22 -7 lines
Diff to previous 1.166.2.19 (colored) to branchpoint 1.166 (colored) next main 1.167 (colored)

- Change syncobj_t::sobj_changepri() to alter both the user priority and
  the effective priority of LWPs. How the effective priority is adjusted
  depends on the type of object.
- Add a couple of comments to sched_kpri() and remrunqueue().

Revision 1.166.2.19 / (download) - annotate - [select for diffs], Mon Feb 5 16:44:40 2007 UTC (17 years ago) by ad
Branch: newlock2
Changes since 1.166.2.18: +10 -10 lines
Diff to previous 1.166.2.18 (colored) to branchpoint 1.166 (colored)

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

Revision 1.166.2.18 / (download) - annotate - [select for diffs], Wed Jan 31 19:56:38 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.166.2.17: +12 -16 lines
Diff to previous 1.166.2.17 (colored) to branchpoint 1.166 (colored)

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

Revision 1.166.2.17 / (download) - annotate - [select for diffs], Tue Jan 30 13:51:41 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.166.2.16: +4 -27 lines
Diff to previous 1.166.2.16 (colored) to branchpoint 1.166 (colored)

Remove support for SA. Ok core@.

Revision 1.166.2.16 / (download) - annotate - [select for diffs], Sun Jan 28 07:20:39 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.166.2.15: +6 -4 lines
Diff to previous 1.166.2.15 (colored) to branchpoint 1.166 (colored)

- Fix sequence error between saving/raising the SPL.
- Changes for JavaStation.
- Fix bugs with mips & sparc support routines.

Revision 1.166.2.15 / (download) - annotate - [select for diffs], Sun Jan 28 01:34:18 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.166.2.14: +29 -53 lines
Diff to previous 1.166.2.14 (colored) to branchpoint 1.166 (colored)

- Remove the last use of mtsleep()
- sched_pause() -> kpause()

Revision 1.166.2.14 / (download) - annotate - [select for diffs], Sat Jan 27 14:00:02 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.166.2.13: +3 -3 lines
Diff to previous 1.166.2.13 (colored) to branchpoint 1.166 (colored)

Rename some functions to better describe what they do.

Revision 1.166.2.13 / (download) - annotate - [select for diffs], Sat Jan 27 01:14:54 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.166.2.12: +12 -9 lines
Diff to previous 1.166.2.12 (colored) to branchpoint 1.166 (colored)

Drop proclist_mutex and proc::p_smutex back to IPL_VM.

Revision 1.166.2.12 / (download) - annotate - [select for diffs], Sat Jan 27 00:26:44 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.166.2.11: +6 -5 lines
Diff to previous 1.166.2.11 (colored) to branchpoint 1.166 (colored)

Fix a bug in sched_changepri() that could result in:
  "panic: remrunqueue: bit X not set"

Revision 1.166.2.11 / (download) - annotate - [select for diffs], Thu Jan 25 20:09:36 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.166.2.10: +51 -51 lines
Diff to previous 1.166.2.10 (colored) to branchpoint 1.166 (colored)

- Don't adjust the priority of kernel threads.
- Change sched_kpri() to be more fair to user processes.
- KNF

Revision 1.166.2.10 / (download) - annotate - [select for diffs], Thu Jan 25 10:55:47 2007 UTC (17 years, 1 month ago) by yamt
Branch: newlock2
Changes since 1.166.2.9: +1 -1 lines
Diff to previous 1.166.2.9 (colored) to branchpoint 1.166 (colored)

schedcpu: don't forget to add p_rtime.

Revision 1.166.2.9 / (download) - annotate - [select for diffs], Thu Jan 25 10:38:06 2007 UTC (17 years, 1 month ago) by yamt
Branch: newlock2
Changes since 1.166.2.8: +10 -6 lines
Diff to previous 1.166.2.8 (colored) to branchpoint 1.166 (colored)

schedcpu: fix a deadlock.  (don't call psignal with p_smutex held.)

Revision 1.166.2.8 / (download) - annotate - [select for diffs], Thu Jan 11 22:23:00 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.166.2.7: +5 -3 lines
Diff to previous 1.166.2.7 (colored) to branchpoint 1.166 (colored)

Checkpoint work in progress.

Revision 1.149.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:06 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.149.2.1: +50 -32 lines
Diff to previous 1.149.2.1 (colored)

sync with head.

Revision 1.166.2.7 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:44 2006 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.166.2.6: +99 -93 lines
Diff to previous 1.166.2.6 (colored) to branchpoint 1.166 (colored)

Checkpoint work in progress.

Revision 1.167.2.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:45 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.167.2.1: +38 -29 lines
Diff to previous 1.167.2.1 (colored) to branchpoint 1.167 (colored) next main 1.168 (colored)

sync with head.

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

Sync with head.

Revision 1.166.2.5 / (download) - annotate - [select for diffs], Fri Nov 17 16:53:08 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.166.2.4: +4 -4 lines
Diff to previous 1.166.2.4 (colored) to branchpoint 1.166 (colored)

Fix an obvious sleep/wakeup bug introduced in previous.

Revision 1.166.2.4 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:36 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.166.2.3: +192 -97 lines
Diff to previous 1.166.2.3 (colored) to branchpoint 1.166 (colored)

Checkpoint work in progress.

Revision 1.173 / (download) - annotate - [select for diffs], Fri Nov 3 20:46:00 2006 UTC (17 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, newlock2-nbase, newlock2-base, netbsd-4-base, 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
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.172: +20 -12 lines
Diff to previous 1.172 (colored)

- ltsleep(): for now, stay at splsched() when releasing sched_lock, or we
  may allow wakeup() to occur before switching away.  PR/32962.
- mi_switch(): don't inspect p->p_cred or send signals without holding the
  kernel lock.

Revision 1.172 / (download) - annotate - [select for diffs], Thu Nov 2 16:26:25 2006 UTC (17 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.171: +2 -1 lines
Diff to previous 1.171 (colored)

ltsleep: fix a race with wakeup().

Revision 1.171 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.170: +1 -1 lines
Diff to previous 1.170 (colored)

remove some __unused from function parameters.

Revision 1.170 / (download) - annotate - [select for diffs], Wed Nov 1 09:46:14 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.169: +3 -1 lines
Diff to previous 1.169 (colored)

kill signal "dolock" hacks.

related to PR/32962 and PR/34895.  reviewed by matthew green.

Revision 1.169 / (download) - annotate - [select for diffs], Wed Nov 1 09:32:52 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.168: +25 -27 lines
Diff to previous 1.168 (colored)

mi_switch: move rlimit and autonice handling out of sched_lock in order to
simplify locking.
related to PR/32962 and PR/34895.  reviewed by matthew green.

Revision 1.166.2.3 / (download) - annotate - [select for diffs], Tue Oct 24 21:10:21 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.166.2.2: +54 -25 lines
Diff to previous 1.166.2.2 (colored) to branchpoint 1.166 (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.167.2.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:10 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.167: +3 -3 lines
Diff to previous 1.167 (colored)

sync with head

Revision 1.166.2.2 / (download) - annotate - [select for diffs], Sat Oct 21 15:20:47 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.166.2.1: +308 -786 lines
Diff to previous 1.166.2.1 (colored) to branchpoint 1.166 (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.168 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:17 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.167: +3 -3 lines
Diff to previous 1.167 (colored)

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

Revision 1.160.8.5 / (download) - annotate - [select for diffs], Thu Sep 14 12:31:48 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.160.8.4: +5 -4 lines
Diff to previous 1.160.8.4 (colored) to branchpoint 1.160 (colored) next main 1.161 (colored)

sync with head.

Revision 1.166.2.1 / (download) - annotate - [select for diffs], Mon Sep 11 18:45:24 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.166: +233 -6 lines
Diff to previous 1.166 (colored)

Add mtsleep(). Currently only useful if the wakeup comes from process
context. A fix for this is pending.

Revision 1.160.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:57:16 2006 UTC (17 years, 5 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.160: +18 -8 lines
Diff to previous 1.160 (colored) next main 1.161 (colored)

sync with head

Revision 1.167 / (download) - annotate - [select for diffs], Thu Sep 7 18:41:28 2006 UTC (17 years, 5 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl
Changes since 1.166: +5 -4 lines
Diff to previous 1.166 (colored)

make the bpendtsleep: label only active if KERN_SYNCH_BPENDTSLEEP_LABEL
is defined.  if this option is present in the Makefile CFLAGS and we are
using GCC4, build kern_synch.c with -fno-reorder-blocks, so that this
actually works.

XXX be nice if KERN_SYNCH_BPENDTSLEEP_LABEL was a normal 'defflag' option
XXX but for now take the easy way out and make it checkable in CFLAGS.

Revision 1.160.8.4 / (download) - annotate - [select for diffs], Sun Sep 3 15:25:22 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.160.8.3: +14 -6 lines
Diff to previous 1.160.8.3 (colored) to branchpoint 1.160 (colored)

sync with head.

Revision 1.166 / (download) - annotate - [select for diffs], Sat Sep 2 06:32:09 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8
Branch point for: newlock2
Changes since 1.165: +6 -4 lines
Diff to previous 1.165 (colored)

deal with empty if bodies

Revision 1.165 / (download) - annotate - [select for diffs], Wed Aug 30 17:28:32 2006 UTC (17 years, 6 months ago) by tsutsui
Branch: MAIN
Changes since 1.164: +9 -3 lines
Diff to previous 1.164 (colored)

Disable asm statement which defines bpendtsleep symbol as "handy breakpoint"
on all m68k ports since it may cause a multiple symble definition error
by code duplication of gcc4 optimizer. Also note about this in comment.

Revision 1.164 / (download) - annotate - [select for diffs], Thu Aug 17 17:11:28 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.163: +3 -3 lines
Diff to previous 1.163 (colored)

Fix all the -D*DEBUG* code that it was rotting away and did not even compile.
Mostly from Arnaud Lacombe, many thanks!

Revision 1.160.8.3 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:46 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.160.8.2: +3 -3 lines
Diff to previous 1.160.8.2 (colored) to branchpoint 1.160 (colored)

sync with head

Revision 1.161.4.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:49:50 2006 UTC (17 years, 7 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.161: +3 -3 lines
Diff to previous 1.161 (colored) next main 1.162 (colored)

Merge from HEAD.

Revision 1.163 / (download) - annotate - [select for diffs], Sat Jul 8 00:23:29 2006 UTC (17 years, 7 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored)

Don't define bpendtsleep on vax (gcc4 optimizer will duplicate the asm
that contains it result in a multiple symbol definition in gas).

Revision 1.160.8.2 / (download) - annotate - [select for diffs], Mon Jun 26 12:52:56 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.160.8.1: +3 -3 lines
Diff to previous 1.160.8.1 (colored) to branchpoint 1.160 (colored)

sync with head.

Revision 1.162 / (download) - annotate - [select for diffs], Sat Jun 24 05:23:06 2006 UTC (17 years, 8 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6
Changes since 1.161: +3 -3 lines
Diff to previous 1.161 (colored)

don't put the bpendtsleep handy breakpoint in sun2 kernels as the
output asm includes it twice causing multiply-defined symbols.

Revision 1.149.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:38 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.149: +147 -47 lines
Diff to previous 1.149 (colored)

sync with head.

Revision 1.160.6.1 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:08 2006 UTC (17 years, 9 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.160: +5 -4 lines
Diff to previous 1.160 (colored) next main 1.161 (colored)

Sync with head.

Revision 1.160.12.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:41 2006 UTC (17 years, 9 months ago) by tron
Branch: peter-altq
Changes since 1.160: +5 -4 lines
Diff to previous 1.160 (colored) next main 1.161 (colored)

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

Revision 1.160.8.1 / (download) - annotate - [select for diffs], Wed May 24 10:58:41 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.160: +5 -4 lines
Diff to previous 1.160 (colored)

sync with head.

Revision 1.161 / (download) - annotate - [select for diffs], Sun May 14 21:15:11 2006 UTC (17 years, 9 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base, chap-midi
Branch point for: gdamore-uart
Changes since 1.160: +5 -4 lines
Diff to previous 1.160 (colored)

integrate kauth.

Revision 1.160.10.2 / (download) - annotate - [select for diffs], Sat May 6 23:31:30 2006 UTC (17 years, 9 months ago) by christos
Branch: elad-kernelauth
Changes since 1.160.10.1: +3 -2 lines
Diff to previous 1.160.10.1 (colored) to branchpoint 1.160 (colored) next main 1.161 (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.160.10.1 / (download) - annotate - [select for diffs], Wed Mar 8 00:53:40 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.160: +4 -4 lines
Diff to previous 1.160 (colored)

Adapt to kernel authorization KPI.

Revision 1.160 / (download) - annotate - [select for diffs], Tue Dec 27 04:06:46 2005 UTC (18 years, 2 months ago) by chs
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.159: +3 -5 lines
Diff to previous 1.159 (colored)

changes for making DIAGNOSTIC not change the kernel ABI:
 - for structure fields that are conditionally present,
   make those fields always present.
 - for functions which are conditionally inline, make them never inline.
 - remove some other functions which are conditionally defined but
   don't actually do anything anymore.
 - make a lock-debugging function conditional on only LOCKDEBUG.

as discussed on tech-kern some time back.

Revision 1.159 / (download) - annotate - [select for diffs], Mon Dec 26 18:45:27 2005 UTC (18 years, 2 months ago) by perry
Branch: MAIN
Changes since 1.158: +3 -3 lines
Diff to previous 1.158 (colored)

u_intN_t -> uintN_t

Revision 1.158 / (download) - annotate - [select for diffs], Sat Dec 24 19:12:23 2005 UTC (18 years, 2 months ago) by perry
Branch: MAIN
Changes since 1.157: +13 -13 lines
Diff to previous 1.157 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.157 / (download) - annotate - [select for diffs], Sat Dec 24 12:57:14 2005 UTC (18 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.156: +43 -20 lines
Diff to previous 1.156 (colored)

fix a long-standing scheduler problem that p_estcpu is doubled
for each fork-wait cycles.

- updatepri: factor out the code to decay estcpu so that it can be used
  by scheduler_wait_hook.
- scheduler_fork_hook: record how much estcpu is inherited from
  the parent process.
- scheduler_wait_hook: don't add back inherited estcpu to the parent.

Revision 1.156 / (download) - annotate - [select for diffs], Tue Dec 20 19:26:15 2005 UTC (18 years, 2 months ago) by rpaulo
Branch: MAIN
Changes since 1.155: +7 -5 lines
Diff to previous 1.155 (colored)

Fix comments for preempt() using rev. 1.101.2.31 log of nathanw_sa by thorpej.

Revision 1.155 / (download) - annotate - [select for diffs], Thu Dec 15 13:43:49 2005 UTC (18 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.154: +8 -6 lines
Diff to previous 1.154 (colored)

updatepri:
- don't compare a scaled value with a unscaled value.
- actually, 7 times the loadfactor is necessary to decay p_estcpu enough,
  even before the recent p_estcpu changes.
  after the recent p_estcpu change, 8 times loadavg decay is needed.
- fix a comment to match with the recent reality.

Revision 1.154 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:29 2005 UTC (18 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.153: +6 -6 lines
Diff to previous 1.153 (colored)

merge ktrace-lwp.

Revision 1.132.2.8 / (download) - annotate - [select for diffs], Thu Nov 10 14:09:45 2005 UTC (18 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.132.2.7: +92 -18 lines
Diff to previous 1.132.2.7 (colored) next main 1.133 (colored)

Sync with HEAD. Here we go again...

Revision 1.151.2.1 / (download) - annotate - [select for diffs], Wed Nov 2 11:58:11 2005 UTC (18 years, 3 months ago) by yamt
Branch: yamt-vop
Changes since 1.151: +49 -13 lines
Diff to previous 1.151 (colored) next main 1.152 (colored)

sync with head.

Revision 1.153 / (download) - annotate - [select for diffs], Tue Nov 1 09:07:53 2005 UTC (18 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, ktrace-lwp-base
Changes since 1.152: +35 -15 lines
Diff to previous 1.152 (colored)

make scheduler work better when a system has many runnable processes
by making p_estcpu fixpt_t.  PR/31542.

1. schedcpu() decreases p_estcpu of all processes
   every seconds, by at least 1 regardless of load average.
2. schedclock() increases p_estcpu of curproc by 1,
   at about 16 hz.

in the consequence, if a system has >16 processes
with runnable lwps, their p_estcpu are not likely increased.

by making p_estcpu fixpt_t, we can decay it more slowly
when loadavg is high.  (ie. solve #1.)

i left kinfo_proc2::p_estcpu (ie. ps -O cpu) scaled because i have
no idea about its absolute value's usage other than debugging,
for which raw values are more valuable.

Revision 1.152 / (download) - annotate - [select for diffs], Sun Oct 30 20:28:56 2005 UTC (18 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.151: +20 -4 lines
Diff to previous 1.151 (colored)

- localize some definitions.
- use PPQ macro where appropriate.

Revision 1.148.2.1 / (download) - annotate - [select for diffs], Fri Oct 21 17:39:40 2005 UTC (18 years, 4 months ago) by riz
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.148: +16 -3 lines
Diff to previous 1.148 (colored) next main 1.149 (colored)

Pull up following revision(s) (requested by chs in ticket #901):
	sys/kern/kern_time.c: revision 1.94
	sys/sys/signalvar.h: revision 1.59
	sys/sys/savar.h: revision 1.16
	sys/kern/kern_sig.c: revision 1.209
	sys/kern/kern_sa.c: revision 1.66
	sys/kern/kern_synch.c: revision 1.150
avoid calling into the pool code while holding sched_lock
since both pool_get() and pool_put() can call wakeup().
instead, allocate the struct sadata_upcall before taking
sched_lock in mi_switch() and free it after releasing sched_lock.
clean up some modularity warts by adding a callback to
struct sadata_upcall for freeing sa_arg.

Revision 1.151 / (download) - annotate - [select for diffs], Thu Oct 6 07:02:14 2005 UTC (18 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base2, yamt-vop-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-vop
Changes since 1.150: +27 -2 lines
Diff to previous 1.150 (colored)

uninline scheduler hooks.

Revision 1.150 / (download) - annotate - [select for diffs], Sun Oct 2 17:51:27 2005 UTC (18 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.149: +16 -3 lines
Diff to previous 1.149 (colored)

avoid calling into the pool code while holding sched_lock
since both pool_get() and pool_put() can call wakeup().
instead, allocate the struct sadata_upcall before taking
sched_lock in mi_switch() and free it after releasing sched_lock.

clean up some modularity warts by adding a callback to
struct sadata_upcall for freeing sa_arg.

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

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

Revision 1.146.2.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:23 2005 UTC (18 years, 10 months ago) by kent
Branch: kent-audio2
Changes since 1.146: +6 -4 lines
Diff to previous 1.146 (colored) next main 1.147 (colored)

sync with -current

Revision 1.146.4.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:11 2005 UTC (18 years, 11 months ago) by yamt
Branch: yamt-km
Changes since 1.146: +6 -4 lines
Diff to previous 1.146 (colored) next main 1.147 (colored)

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

Revision 1.132.2.7 / (download) - annotate - [select for diffs], Fri Mar 4 16:51:59 2005 UTC (18 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.132.2.6: +6 -4 lines
Diff to previous 1.132.2.6 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.148 / (download) - annotate - [select for diffs], Wed Mar 2 11:05:34 2005 UTC (19 years ago) by mycroft
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, kent-audio2-base
Branch point for: netbsd-3
Changes since 1.147: +5 -3 lines
Diff to previous 1.147 (colored)

Copyright maintenance.

Revision 1.147 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:55 2005 UTC (19 years ago) by perry
Branch: MAIN
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored)

nuke trailing whitespace

Revision 1.132.2.6 / (download) - annotate - [select for diffs], Sat Dec 18 09:32:35 2004 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.132.2.5: +74 -3 lines
Diff to previous 1.132.2.5 (colored)

Sync with HEAD.

Revision 1.146 / (download) - annotate - [select for diffs], Thu Dec 9 21:52:24 2004 UTC (19 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge
Branch point for: yamt-km, kent-audio2
Changes since 1.145: +74 -3 lines
Diff to previous 1.145 (colored)

Add some debug code to validate the runqueues if RQDEBUG is defined.

Revision 1.132.2.5 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:04 2004 UTC (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.132.2.4: +3 -3 lines
Diff to previous 1.132.2.4 (colored)

Sync with HEAD

Revision 1.145 / (download) - annotate - [select for diffs], Fri Oct 1 16:30:55 2004 UTC (19 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.144: +3 -3 lines
Diff to previous 1.144 (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.132.2.4 / (download) - annotate - [select for diffs], Tue Sep 21 13:35:08 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.132.2.3: +6 -6 lines
Diff to previous 1.132.2.3 (colored)

Fix the sync with head I botched.

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

Sync with HEAD.

Revision 1.132.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:52:53 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.132.2.1: +68 -51 lines
Diff to previous 1.132.2.1 (colored)

Sync with HEAD

Revision 1.144 / (download) - annotate - [select for diffs], Tue May 18 11:59:11 2004 UTC (19 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.143: +5 -13 lines
Diff to previous 1.143 (colored)

use lockstatus() instead of L_BIGLOCK to check if we're holding a biglock.
fix PR/25595.

Revision 1.143 / (download) - annotate - [select for diffs], Wed May 12 20:13:58 2004 UTC (19 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.142: +4 -4 lines
Diff to previous 1.142 (colored)

use callout_schedule() for schedcpu().

Revision 1.142 / (download) - annotate - [select for diffs], Sun Mar 14 01:08:47 2004 UTC (19 years, 11 months ago) by cl
Branch: MAIN
CVS Tags: netbsd-2-base, 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, 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, netbsd-2
Changes since 1.141: +4 -5 lines
Diff to previous 1.141 (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.141 / (download) - annotate - [select for diffs], Fri Feb 13 11:36:23 2004 UTC (20 years ago) by wiz
Branch: MAIN
Changes since 1.140: +5 -5 lines
Diff to previous 1.140 (colored)

Uppercase CPU, plural is CPUs.

Revision 1.140 / (download) - annotate - [select for diffs], Sun Jan 4 13:27:53 2004 UTC (20 years, 1 month ago) by kleink
Branch: MAIN
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored)

; may be a comment character in assembly, use \n as a separator instead.

Revision 1.139 / (download) - annotate - [select for diffs], Sun Nov 2 16:26:10 2003 UTC (20 years, 4 months ago) by cl
Branch: MAIN
Changes since 1.138: +21 -12 lines
Diff to previous 1.138 (colored)

Cleanup signal delivery for SA processes:
General idea:  only consider the LWP on the VP for signal delivery, all
other LWPs are either asleep or running from waking up until repossessing
the VP.

- in kern_sig.c:kpsignal2: handle all states the LWP on the VP can be in
- in kern_sig.c:proc_stop: only try to stop the LWP on the VP.  All other
  LWPs will suspend in sa_vp_repossess() until the VP-LWP donates the VP.
  Restore original behaviour (before SA-specific hacks were added) for
  non-SA processes.
- in kern_sig.c:proc_unstop: only return the LWP on the VP
- handle sa_yield as case 0 in sa_switch instead of clearing L_SA, add an
  L_SA_YIELD flag
- replace sa_idle by L_SA_IDLE flag since it was either NULL or == sa_vp

Also don't output itimerfire overrun warning if the process is already
exiting.
Also g/c sa_woken because it's not used.
Also g/c some #if 0 code.

Revision 1.138 / (download) - annotate - [select for diffs], Sun Oct 26 20:55:57 2003 UTC (20 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.137: +3 -3 lines
Diff to previous 1.137 (colored)

Fix (bogus) unitialized variable warning.

Revision 1.137 / (download) - annotate - [select for diffs], Mon Sep 8 11:14:18 2003 UTC (20 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.136: +5 -4 lines
Diff to previous 1.136 (colored)

truncated output from pty problem.  fix by enami
http://mail-index.netbsd.org/tech-kern/2003/09/06/0002.html

Revision 1.136 / (download) - annotate - [select for diffs], Thu Aug 7 16:31:50 2003 UTC (20 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.135: +3 -7 lines
Diff to previous 1.135 (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.135 / (download) - annotate - [select for diffs], Mon Jul 28 23:35:20 2003 UTC (20 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.134: +21 -11 lines
Diff to previous 1.134 (colored)

Improve _lwp_wakeup so when it wakes a thread, the target thread thinks
ltsleep has been interrupted and thus the target will not think it was
a spurious wakeup.  (this makes syscalls cancellable for libpthread).

Revision 1.134 / (download) - annotate - [select for diffs], Fri Jul 18 01:02:31 2003 UTC (20 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.133: +19 -11 lines
Diff to previous 1.133 (colored)

Add support for storing the priority mask in sched_whichqs in MSB order
(enabled by defining __HAVE_BIGENDIAN_BITOPS in <machine/types.h>).  The
default is still LSB ordering.  This change will allow the powerpc MD
implementations of setrunqueue/remrunqueue to be nuked.

Revision 1.133 / (download) - annotate - [select for diffs], Thu Jul 17 18:16:59 2003 UTC (20 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.132: +6 -4 lines
Diff to previous 1.132 (colored)

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

Revision 1.132.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:26:39 2003 UTC (20 years, 8 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.132: +6 -6 lines
Diff to previous 1.132 (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.132 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:23 2003 UTC (20 years, 8 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.131: +4 -4 lines
Diff to previous 1.131 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.131 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:55 2003 UTC (20 years, 8 months ago) by darrenr
Branch: MAIN
Changes since 1.130: +6 -6 lines
Diff to previous 1.130 (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.130 / (download) - annotate - [select for diffs], Thu Jun 26 02:09:27 2003 UTC (20 years, 8 months ago) by nathanw
Branch: MAIN
Changes since 1.129: +18 -18 lines
Diff to previous 1.129 (colored)

Whitespace police.

Revision 1.129 / (download) - annotate - [select for diffs], Thu Jun 26 02:08:19 2003 UTC (20 years, 8 months ago) by nathanw
Branch: MAIN
Changes since 1.128: +8 -2 lines
Diff to previous 1.128 (colored)

For now, disable voluntary mid-operation preempt() for SA processes;
it doesn't interact well with SA's idea of what's running.

Revision 1.128 / (download) - annotate - [select for diffs], Tue May 20 13:48:08 2003 UTC (20 years, 9 months ago) by simonb
Branch: MAIN
Changes since 1.127: +5 -5 lines
Diff to previous 1.127 (colored)

Sprinkle a little white-space.

Revision 1.127 / (download) - annotate - [select for diffs], Thu May 8 02:04:11 2003 UTC (20 years, 9 months ago) by matt
Branch: MAIN
Changes since 1.126: +3 -3 lines
Diff to previous 1.126 (colored)

In setrunnable, give more infomrmation in the panic message so we can
figure out WTF went wrong.

Revision 1.126 / (download) - annotate - [select for diffs], Tue Feb 4 20:15:59 2003 UTC (21 years ago) by pk
Branch: MAIN
Changes since 1.125: +10 -8 lines
Diff to previous 1.125 (colored)

ltsleep(): deal with PNOEXITERR after re-taking the interlock (if necessary).

Revision 1.125 / (download) - annotate - [select for diffs], Tue Feb 4 13:41:50 2003 UTC (21 years ago) by yamt
Branch: MAIN
Changes since 1.124: +6 -6 lines
Diff to previous 1.124 (colored)

constify wait channels of ltsleep/wakeup.  they are never dereferenced.

Revision 1.124 / (download) - annotate - [select for diffs], Wed Jan 22 12:52:15 2003 UTC (21 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.123: +3 -3 lines
Diff to previous 1.123 (colored)

make KSTACK_CHECK_* compile after sa merge.

Revision 1.123 / (download) - annotate - [select for diffs], Tue Jan 21 00:02:07 2003 UTC (21 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.122: +3 -3 lines
Diff to previous 1.122 (colored)

step 4: don't de-reference l, if you are going to test if it is NULL a couple
of lines below.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:30 2003 UTC (21 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.121: +280 -204 lines
Diff to previous 1.121 (colored)

Merge the nathanw_sa branch.

Revision 1.101.2.32 / (download) - annotate - [select for diffs], Wed Jan 15 18:58:31 2003 UTC (21 years, 1 month ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.101.2.31: +10 -10 lines
Diff to previous 1.101.2.31 (colored) next main 1.102 (colored)

Sync with HEAD.

Revision 1.121 / (download) - annotate - [select for diffs], Wed Jan 15 07:12:20 2003 UTC (21 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base
Changes since 1.120: +6 -6 lines
Diff to previous 1.120 (colored)

Pass the process priority we want to compare to resched_proc().  Restores
resetpriority() behavior.  Thanks to Enami Tsugutomo for pointing out my
mistake.

Revision 1.120 / (download) - annotate - [select for diffs], Sun Jan 12 01:48:56 2003 UTC (21 years, 1 month ago) by pk
Branch: MAIN
Changes since 1.119: +6 -6 lines
Diff to previous 1.119 (colored)

schedcpu(): after updating the process CPU tick counters, we no longer need
to run at splstatclock(); continue at splsched().

Revision 1.101.2.31 / (download) - annotate - [select for diffs], Tue Jan 7 22:12:15 2003 UTC (21 years, 1 month ago) by thorpej
Branch: nathanw_sa
Changes since 1.101.2.30: +13 -25 lines
Diff to previous 1.101.2.30 (colored)

In the SA universe, the switch-to-this-LWP decision is made at a
different level than where preempt() calls are made, which renders
the "newlwp" argument useless.  Replace it with a "more work to do"
boolean argument.  Returning to userspace preempt() calls pass 0.
"Voluntary" preemptions in e.g. uiomove() pass 1.  This will be used
to indicate to the SA subsystem that the LWP is not yet finished in
the kernel.

Collapse the SA vs. non-SA cases of preempt() together, making the
conditional code block much smaller, and don't call sa_preempt() if
more work is to come.

NOTE: THIS IS NOT A COMPLETE FIX TO THE preempt()-in-uiomove() PROBLEM
THAT CURRENTLY EXISTS FOR SA PROCESSES.

Revision 1.101.2.30 / (download) - annotate - [select for diffs], Mon Jan 6 17:29:47 2003 UTC (21 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.29: +30 -21 lines
Diff to previous 1.101.2.29 (colored)

Adjust schedcpu() to make more sense in the face of multi-LWP
processes; iterate primarly over processes, calculate newcpu, and
then iterate over LWPs and calculate priorities. This avoids repeating
the newcpu calculation for each LWP in a process, which would tend to
underestimate the CPU consumed by a multi-LWP process.

Revision 1.101.2.29 / (download) - annotate - [select for diffs], Tue Dec 31 01:03:52 2002 UTC (21 years, 2 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.101.2.28: +4 -3 lines
Diff to previous 1.101.2.28 (colored)

Rename cpu_preempt() to cpu_switchto(), and make the caller remove the
new process from its run queue before calling cpu_switchto().

While here, make a few cpu_switch() and cpu_switchto() implementations
get the outgoing LWP from the args, rather than looking at the curlwp
variable.

Revision 1.101.2.28 / (download) - annotate - [select for diffs], Sun Dec 29 20:54:42 2002 UTC (21 years, 2 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.101.2.27: +43 -22 lines
Diff to previous 1.101.2.27 (colored)

Sync with HEAD.

Revision 1.119 / (download) - annotate - [select for diffs], Sun Dec 29 17:40:26 2002 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.118: +40 -22 lines
Diff to previous 1.118 (colored)

* Move the resched check from setrunnable() and resetpriority() to
  a new inline, resched_proc().
* When performing the resched check, check the priority against the
  current priority on the CPU the process last ran on, not always the
  current CPU.

Revision 1.118 / (download) - annotate - [select for diffs], Sun Dec 29 02:08:39 2002 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.117: +4 -2 lines
Diff to previous 1.117 (colored)

Add a comment about affinity to awaken().

Revision 1.117 / (download) - annotate - [select for diffs], Sat Dec 21 23:52:06 2002 UTC (21 years, 2 months ago) by gmcgarry
Branch: MAIN
Changes since 1.116: +23 -2 lines
Diff to previous 1.116 (colored)

Re-add yield().  Only used by compat code at the moment.

Revision 1.116 / (download) - annotate - [select for diffs], Fri Dec 20 05:43:09 2002 UTC (21 years, 2 months ago) by gmcgarry
Branch: MAIN
Changes since 1.115: +2 -22 lines
Diff to previous 1.115 (colored)

Remove yield() until the scheduler supports the sched_yield(2) system
call.

Revision 1.115.4.1 / (download) - annotate - [select for diffs], Wed Dec 18 05:01:02 2002 UTC (21 years, 2 months ago) by gmcgarry
Branch: gmcgarry_ctxsw
Changes since 1.115: +81 -18 lines
Diff to previous 1.115 (colored) next main 1.116 (colored)

Remove the scheduler semantics from machine-dependent context switch.

Revision 1.101.2.27 / (download) - annotate - [select for diffs], Wed Dec 4 22:40:41 2002 UTC (21 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.26: +3 -3 lines
Diff to previous 1.101.2.26 (colored)

In resetprocpriority(), iterate with l_sibling, not l_list, so as to
only iterate over the LWPs in a process, not every entry on the alllwp
list after this process(!).

Revision 1.101.2.26 / (download) - annotate - [select for diffs], Thu Nov 14 23:02:44 2002 UTC (21 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.25: +3 -3 lines
Diff to previous 1.101.2.25 (colored)

wakeup -> sched_wakeup (from trunk, long ago).

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

Catch up to -current

Revision 1.115 / (download) - annotate - [select for diffs], Sun Nov 3 13:59:12 2002 UTC (21 years, 3 months ago) by nisimura
Branch: MAIN
CVS Tags: gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base
Branch point for: gmcgarry_ctxsw
Changes since 1.114: +11 -2 lines
Diff to previous 1.114 (colored)

Add some informative comments about setrunqueue and remrunqueue.

Revision 1.101.2.24 / (download) - annotate - [select for diffs], Fri Oct 18 05:22:13 2002 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.23: +4 -4 lines
Diff to previous 1.101.2.23 (colored)

Check for L_BIGLOCK in l->l_flag, rather than P_BIGLOCK in p->p_flag.

Revision 1.101.2.23 / (download) - annotate - [select for diffs], Fri Oct 18 04:14:59 2002 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.22: +6 -6 lines
Diff to previous 1.101.2.22 (colored)

Finish LWPifying C versions of setrunqueue()/remrunqueue().

Revision 1.101.2.22 / (download) - annotate - [select for diffs], Fri Oct 18 02:44:53 2002 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.21: +57 -9 lines
Diff to previous 1.101.2.21 (colored)

Catch up to -current.

Revision 1.104.2.4 / (download) - annotate - [select for diffs], Thu Oct 10 18:43:11 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.104.2.3: +62 -17 lines
Diff to previous 1.104.2.3 (colored) to branchpoint 1.104 (colored) next main 1.105 (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.114 / (download) - annotate - [select for diffs], Sun Sep 29 21:11:36 2002 UTC (21 years, 5 months ago) by gmcgarry
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge
Changes since 1.113: +20 -134 lines
Diff to previous 1.113 (colored)

Back out __HAVE_CHOOSEPROC stuff.

Revision 1.113 / (download) - annotate - [select for diffs], Sun Sep 22 05:36:48 2002 UTC (21 years, 5 months ago) by gmcgarry
Branch: MAIN
Changes since 1.112: +189 -30 lines
Diff to previous 1.112 (colored)

Separate the scheduler from the context switching code.

This is done by adding an extra argument to mi_switch() and
cpu_switch() which specifies the new process.  If NULL is passed,
then the new function chooseproc() is invoked to wait for a new
process to appear on the run queue.

Also provides an opportunity for optimisations if "switching to self".

Also added are C versions of the setrunqueue() and remrunqueue()
low-level primitives if __HAVE_MD_RUNQUEUE is not defined by MD code.

All these changes are contingent upon the __HAVE_CHOOSEPROC flag being
defined by MD code to indicate that cpu_switch() supports the changes.

Revision 1.101.2.21 / (download) - annotate - [select for diffs], Tue Sep 17 22:13:27 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.20: +3 -3 lines
Diff to previous 1.101.2.20 (colored)

LWPify recent changes.

Revision 1.101.2.20 / (download) - annotate - [select for diffs], Tue Sep 17 21:22:12 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.19: +3 -3 lines
Diff to previous 1.101.2.19 (colored)

Catch up to -current.

Revision 1.104.2.3 / (download) - annotate - [select for diffs], Fri Sep 6 08:47:58 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: kqueue
Changes since 1.104.2.2: +27 -2 lines
Diff to previous 1.104.2.2 (colored) to branchpoint 1.104 (colored)

sync kqueue branch with HEAD

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

Use the queue macros from <sys/queue.h> instead of referring to the queue
members directly.  Use *_FOREACH whenever possible.

Revision 1.101.2.19 / (download) - annotate - [select for diffs], Fri Aug 30 23:58:51 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.18: +4 -2 lines
Diff to previous 1.101.2.18 (colored)

When a SA LWP is woken up, note its identity in the SA data structure.

Revision 1.107.8.3 / (download) - annotate - [select for diffs], Thu Aug 29 05:23:09 2002 UTC (21 years, 6 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.107.8.2: +22 -2 lines
Diff to previous 1.107.8.2 (colored) to branchpoint 1.107 (colored) next main 1.108 (colored)

catch up with -current.

Revision 1.101.2.18 / (download) - annotate - [select for diffs], Tue Aug 13 02:20:06 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.17: +20 -0 lines
Diff to previous 1.101.2.17 (colored)

Catch up to -current.

Revision 1.111 / (download) - annotate - [select for diffs], Wed Aug 7 11:13:40 2002 UTC (21 years, 6 months ago) by briggs
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.110: +4 -2 lines
Diff to previous 1.110 (colored)

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

Revision 1.110 / (download) - annotate - [select for diffs], Wed Aug 7 05:16:25 2002 UTC (21 years, 6 months ago) by briggs
Branch: MAIN
Changes since 1.109: +20 -2 lines
Diff to previous 1.109 (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.101.2.17 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:21 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.16: +7 -2 lines
Diff to previous 1.101.2.16 (colored)

Catch up to -current.

Revision 1.101.2.16 / (download) - annotate - [select for diffs], Wed Jul 17 19:55:41 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.15: +5 -4 lines
Diff to previous 1.101.2.15 (colored)

In preempt(), call sa_preempt() rather than making the upcall directly.

Revision 1.107.8.2 / (download) - annotate - [select for diffs], Mon Jul 15 10:36:35 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.107.8.1: +7 -2 lines
Diff to previous 1.107.8.1 (colored) to branchpoint 1.107 (colored)

catch up with -current.

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

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

Revision 1.109 / (download) - annotate - [select for diffs], Tue Jul 2 20:27:46 2002 UTC (21 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.108: +7 -2 lines
Diff to previous 1.108 (colored)

add KSTACK_CHECK_MAGIC. discussed on tech-kern.

Revision 1.101.2.14 / (download) - annotate - [select for diffs], Mon Jun 24 22:10:53 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.13: +7 -7 lines
Diff to previous 1.101.2.13 (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.104.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 17:49:31 2002 UTC (21 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.104.2.1: +2 -5 lines
Diff to previous 1.104.2.1 (colored) to branchpoint 1.104 (colored)

catch up with -current on kqueue branch

Revision 1.101.2.13 / (download) - annotate - [select for diffs], Thu Jun 20 03:47:16 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.12: +2 -5 lines
Diff to previous 1.101.2.12 (colored)

Catch up to -current.

Revision 1.107.8.1 / (download) - annotate - [select for diffs], Thu May 30 14:48:00 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.107: +2 -5 lines
Diff to previous 1.107 (colored)

Catch up with -current.

Revision 1.108 / (download) - annotate - [select for diffs], Tue May 21 01:38:27 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, 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, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.107: +2 -5 lines
Diff to previous 1.107 (colored)

Move kernel_lock manipulation info functions so that they will
show up in a profile.

Revision 1.101.2.12 / (download) - annotate - [select for diffs], Tue Apr 2 00:16:00 2002 UTC (21 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.11: +9 -12 lines
Diff to previous 1.101.2.11 (colored)

- Centralize p_nrlwps handling in those functions which actually
  set the LWP state to LSRUN. Simplifies matters considerably.

- Trying to keep track of the preempted LWP was a bad idea; go back
  to searching for now.

- Send a PREEMPTED upcall from proc_unstop(), so that stopped processes
  know that something happened, and so that all runnable LWPs of a unstopped
  process have an upcall to deliver (Ideally, the LWP that was runnable
  when the process was stopped should return first, and any LWPs that were
  woken up while the process was stopped would interrupt it, but that's
  difficult to arrange).

Revision 1.101.2.11 / (download) - annotate - [select for diffs], Fri Mar 22 23:25:47 2002 UTC (21 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.10: +3 -3 lines
Diff to previous 1.101.2.10 (colored)

Move the increment of p->p_nrlwps to before the resume: label, so that
it doesn't get spuriously incremented if the signal checking code
skips the sleep entirely.

Revision 1.107.4.1 / (download) - annotate - [select for diffs], Sun Mar 10 19:08:23 2002 UTC (21 years, 11 months ago) by thorpej
Branch: newlock
Changes since 1.107: +2 -4 lines
Diff to previous 1.107 (colored) next main 1.108 (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.104.2.1 / (download) - annotate - [select for diffs], Thu Jan 10 19:59:56 2002 UTC (22 years, 1 month ago) by thorpej
Branch: kqueue
Changes since 1.104: +6 -2 lines
Diff to previous 1.104 (colored)

Sync kqueue branch with -current.

Revision 1.101.2.10 / (download) - annotate - [select for diffs], Tue Jan 8 00:32:35 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.9: +3 -3 lines
Diff to previous 1.101.2.9 (colored)

Catch up to -current.

Revision 1.101.2.9 / (download) - annotate - [select for diffs], Mon Dec 17 20:41:49 2001 UTC (22 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.8: +32 -12 lines
Diff to previous 1.101.2.8 (colored)

Split the body of preempt() into SA and non-SA parts. In the SA part, stash
the fact that the current LWP was preempted, for later use by sa_switch().

Revision 1.107 / (download) - annotate - [select for diffs], Fri Nov 30 16:21:16 2001 UTC (22 years, 3 months ago) by kleink
Branch: MAIN
CVS Tags: newlock-base, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: newlock, gehenna-devsw
Changes since 1.106: +3 -3 lines
Diff to previous 1.106 (colored)

asm -> __asm.

Revision 1.101.2.8 / (download) - annotate - [select for diffs], Sat Nov 17 01:07:59 2001 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.7: +3 -3 lines
Diff to previous 1.101.2.7 (colored)

Adapt to new sa_upcall() signature.

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

Catch up to -current.

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

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

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

add RCSIDs

Revision 1.104.4.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:46:52 2001 UTC (22 years, 5 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.104: +2 -1 lines
Diff to previous 1.104 (colored) next main 1.105 (colored)

Catch up with -current.

Revision 1.101.2.6 / (download) - annotate - [select for diffs], Wed Sep 26 19:55:04 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.5: +2 -1 lines
Diff to previous 1.101.2.5 (colored)

Catch up to -current.
Again.

Revision 1.105 / (download) - annotate - [select for diffs], Tue Sep 25 01:38:38 2001 UTC (22 years, 5 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.104: +2 -1 lines
Diff to previous 1.104 (colored)

in ltsleep(), assert that the interlock is held (if one is given).

Revision 1.101.2.5 / (download) - annotate - [select for diffs], Thu Aug 30 23:25:46 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.4: +3 -3 lines
Diff to previous 1.101.2.4 (colored)

Change a few more p->p_cpu's into l->l_cpu.
Missed on i386 because they're inside a machdep macro that doesn't expand
the argyment on i386.

Revision 1.101.2.4 / (download) - annotate - [select for diffs], Fri Aug 24 04:20:08 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.3: +2 -2 lines
Diff to previous 1.101.2.3 (colored)

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

Revision 1.101.2.3 / (download) - annotate - [select for diffs], Thu Jun 21 20:06:55 2001 UTC (22 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.2: +4 -3 lines
Diff to previous 1.101.2.2 (colored)

Catch up to -current.

Revision 1.104 / (download) - annotate - [select for diffs], Mon May 28 22:20:03 2001 UTC (22 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp, kqueue
Changes since 1.103: +2 -2 lines
Diff to previous 1.103 (colored)

don't define bpendtsleep in profiling kernels since it confuses gprof.

Revision 1.103 / (download) - annotate - [select for diffs], Fri Apr 27 08:00:03 2001 UTC (22 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.102: +2 -2 lines
Diff to previous 1.102 (colored)

Slighly improve comment for ltsleep(), the previous formulation might
be understood incorrectly (at least, it confused me at first, before
I looked at the actual code).

Revision 1.66.2.5 / (download) - annotate - [select for diffs], Mon Apr 23 09:42:32 2001 UTC (22 years, 10 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.66.2.4: +2 -1 lines
Diff to previous 1.66.2.4 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored)

Sync with HEAD.

Revision 1.102 / (download) - annotate - [select for diffs], Fri Apr 20 17:58:49 2001 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.101: +2 -1 lines
Diff to previous 1.101 (colored)

Make sure there is there is a curproc in ltsleep().

Revision 1.101.2.2 / (download) - annotate - [select for diffs], Sun Apr 8 20:53:05 2001 UTC (22 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.1: +15 -8 lines
Diff to previous 1.101.2.1 (colored)

In mi_switch(), pass up the return value from cpu_switch().
In preempt(), make use of the return value of mi_switch() to determine
whether to send a PREEMPTED upcall.

Revision 1.101.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:49:42 2001 UTC (22 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101: +231 -182 lines
Diff to previous 1.101 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.66.2.4 / (download) - annotate - [select for diffs], Thu Jan 18 09:23:44 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.66.2.3: +1 -1 lines
Diff to previous 1.66.2.3 (colored) to branchpoint 1.66 (colored)

Sync with head (for UBC+NFS fixes, mostly).

Revision 1.101 / (download) - annotate - [select for diffs], Sun Jan 14 22:31:59 2001 UTC (23 years, 1 month ago) by thorpej
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.100: +2 -2 lines
Diff to previous 1.100 (colored)

Whenever ps_sigcheck is set to true, signotify() the process, and
wrap this all up in a CHECKSIGS() macro.  Also, in psignal1(),
signotify() SRUN and SIDL processes if __HAVE_AST_PERPROC is defined.

Per discussion w/ mycroft.

Revision 1.66.2.3 / (download) - annotate - [select for diffs], Fri Jan 5 17:36:39 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.66.2.2: +8 -4 lines
Diff to previous 1.66.2.2 (colored) to branchpoint 1.66 (colored)

Sync with HEAD

Revision 1.100 / (download) - annotate - [select for diffs], Mon Jan 1 16:02:51 2001 UTC (23 years, 2 months ago) by sommerfeld
Branch: MAIN
Changes since 1.99: +7 -3 lines
Diff to previous 1.99 (colored)

MULTIPROCESSOR: The two calls to psignal() inside mi_switch() are
inside the scheduler lock perimeter and should be sched_psignal() instead.

Revision 1.99 / (download) - annotate - [select for diffs], Fri Dec 22 22:59:00 2000 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.98: +3 -3 lines
Diff to previous 1.98 (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.66.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:05:22 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.66.2.1: +2 -2 lines
Diff to previous 1.66.2.1 (colored) to branchpoint 1.66 (colored)

Sync with HEAD.

Revision 1.66.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:09:04 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.66: +388 -204 lines
Diff to previous 1.66 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.98 / (download) - annotate - [select for diffs], Sun Nov 12 18:17:56 2000 UTC (23 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.97: +2 -2 lines
Diff to previous 1.97 (colored)

use SIGACTION() macro to get on appropriate sigaction
structure

Revision 1.78.2.5 / (download) - annotate - [select for diffs], Tue Sep 26 02:07:17 2000 UTC (23 years, 5 months ago) by enami
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA
Changes since 1.78.2.4: +24 -26 lines
Diff to previous 1.78.2.4 (colored) to branchpoint 1.78 (colored) next main 1.79 (colored)

Pullup rev. 1.97 via patch (approved by thorpej@netbsd.org):
Stop runnable but swapped out user processes also in suspendsched().

Revision 1.97 / (download) - annotate - [select for diffs], Sat Sep 23 01:00:35 2000 UTC (23 years, 5 months ago) by enami
Branch: MAIN
Changes since 1.96: +22 -23 lines
Diff to previous 1.96 (colored)

Stop runnable but swapped out user processes also in suspendsched().

Revision 1.78.2.4 / (download) - annotate - [select for diffs], Tue Sep 19 18:02:04 2000 UTC (23 years, 5 months ago) by thorpej
Branch: netbsd-1-5
Changes since 1.78.2.3: +8 -6 lines
Diff to previous 1.78.2.3 (colored) to branchpoint 1.78 (colored)

Pull up fixes to suspendsched():

revision 1.95
date: 2000/09/14 19:13:29;  author: thorpej;  state: Exp;  lines: +7 -5
Make sure to lock the proclist when we're traversing allproc.

revision 1.96
date: 2000/09/15 06:36:25;  author: enami;  state: Exp;  lines: +4 -4
The struct prochd isn't a proc.  Start scaning from prochd.ph_link instead
of &prochd.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Sep 15 06:36:25 2000 UTC (23 years, 5 months ago) by enami
Branch: MAIN
Changes since 1.95: +4 -4 lines
Diff to previous 1.95 (colored)

The struct prochd isn't a proc.  Start scaning from prochd.ph_link instead
of &prochd.

Revision 1.95 / (download) - annotate - [select for diffs], Thu Sep 14 19:13:29 2000 UTC (23 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.94: +7 -5 lines
Diff to previous 1.94 (colored)

Make sure to lock the proclist when we're traversing allproc.

Revision 1.78.2.3 / (download) - annotate - [select for diffs], Wed Sep 6 08:41:42 2000 UTC (23 years, 5 months ago) by bouyer
Branch: netbsd-1-5
Changes since 1.78.2.2: +37 -1 lines
Diff to previous 1.78.2.2 (colored) to branchpoint 1.78 (colored)

Pull up (approved by thorpej):
sys/proc.h 1.104 -> 1.105
sys/kern/kern_synch.c 1.93 -> 1.94 (via patch to remove SMPism)
sys/kern/vfs_subr.c 1.137 -> 1.138

Add a suspendsched() fuctions, which stops scheduling of users processes
(exept curproc) by putting all SRUN and SSLEEP non-P_SYSTEM processes
in SSTOP state.

In vfs_shutdown() use suspendsched() suspend scheduling, and use tsleep()
instead of DELAY to give kernel threads a chance to run (needed to flush
buffers to a RAID disk). Also, keep trying flushing buffers when the number of
dirty buffers decreases (20 rounds may not be enouth for a very large buffer
cache).

Revision 1.94 / (download) - annotate - [select for diffs], Tue Sep 5 16:27:52 2000 UTC (23 years, 5 months ago) by bouyer
Branch: MAIN
Changes since 1.93: +35 -0 lines
Diff to previous 1.93 (colored)

Implement suspendsched() by putting all sleeping and runnable processes
in SSTOP state, execpt P_SYSTEM and curproc processes. We have to way to
find the original state of the process so we can't restart scheduling,
so this can only be used at shutdown time.

XXX suspendsched() should also deal with processes running on other CPUs.
I don't know how to do that, and as long as we have a kernel big lock,
this shouldn't be a problem.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Sep 5 16:20:28 2000 UTC (23 years, 5 months ago) by bouyer
Branch: MAIN
Changes since 1.92: +21 -100 lines
Diff to previous 1.92 (colored)

Back out the suspendsched()/resumesched() thing, per request of Jason Thorpe &
Bill Sommerfeld. suspendsched() will be implemented in a different way.

Revision 1.92 / (download) - annotate - [select for diffs], Fri Sep 1 17:14:04 2000 UTC (23 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

wakeup()->sched_wakeup()

Revision 1.91 / (download) - annotate - [select for diffs], Thu Aug 31 14:36:21 2000 UTC (23 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.90: +100 -21 lines
Diff to previous 1.90 (colored)

Add the sched_suspend/sched_resume functions, as discussed on tech-kern,
with the following modifications to the initial patch:
- rename SHOLD and P_HOST to SSUSPEND and P_SUSPEND to avoid confusion with
  PHOLD()
- don't deal with SSUSPEND/P_SUSPEND in fork1(), if we come here while
  scheduler is suspended we're forking proc0, which can't have P_SUSPEND set.

sched_suspend() suspends the scheduling of users process, by removing all
processes from the run queues and changing their state from SRUN to
SSUSPEND. Also mark all user process but curproc P_SUSPEND.
When a process has to be put in SRUN and is marked P_SUSPEND, it's placed in
the SSUSPEND state instead.
sched_resume() places all SSUSPEND processes back in SRUN, clear the P_SUSPEND
flag.

Revision 1.90 / (download) - annotate - [select for diffs], Sat Aug 26 19:26:43 2000 UTC (23 years, 6 months ago) by sommerfeld
Branch: MAIN
Changes since 1.89: +15 -53 lines
Diff to previous 1.89 (colored)

Since the spinlock count is per-cpu, we don't need atomic operations
to update it, so don't bother with <machine/atomic.h>

Flush kernel_lock_release_all() and kernel_lock_acquire_count() (which
didn't do spinlock accounting correctly), and replace them with
spinlock_release_all() and spinlock_acquire_count().

Revision 1.89 / (download) - annotate - [select for diffs], Sat Aug 26 04:01:17 2000 UTC (23 years, 6 months ago) by sommerfeld
Branch: MAIN
Changes since 1.88: +3 -3 lines
Diff to previous 1.88 (colored)

On second thought.. pass cpu_info * to roundrobin() explicitly.

Revision 1.88 / (download) - annotate - [select for diffs], Sat Aug 26 03:34:37 2000 UTC (23 years, 6 months ago) by sommerfeld
Branch: MAIN
Changes since 1.87: +6 -9 lines
Diff to previous 1.87 (colored)

More MP clock/scheduler changes:
 - Periodically invoke roundrobin() from hardclock() on all cpu's rather
than from a timer callout; this allows time-slicing on non-primary cpu's.
 - Make pscnt per-cpu.
 - Notice psdiv changes on each cpu, and adjust pscnt at that point.
Also, invoke setstatclockrate() from the clock interrupt when each cpu
notices the divisor change, rather than when starting/stopping the
profiling clock.

Revision 1.87 / (download) - annotate - [select for diffs], Fri Aug 25 01:04:12 2000 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.86: +11 -19 lines
Diff to previous 1.86 (colored)

Make need_resched() take a "struct cpu_info *" argument.  This
causes gives a primitive form of processor affinity.  Its use in
roundrobin() still needs some work.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Aug 24 06:14:34 2000 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.85: +3 -2 lines
Diff to previous 1.85 (colored)

Correct a comment.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Aug 24 02:37:27 2000 UTC (23 years, 6 months ago) by sommerfeld
Branch: MAIN
Changes since 1.84: +28 -41 lines
Diff to previous 1.84 (colored)

Move kernel_lock release/switch/reacquire from ltsleep() to
mi_switch(), so we don't botch the locking around preempt() or
yield().

Revision 1.84 / (download) - annotate - [select for diffs], Tue Aug 22 17:28:29 2000 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.83: +51 -12 lines
Diff to previous 1.83 (colored)

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

Revision 1.83 / (download) - annotate - [select for diffs], Sun Aug 20 21:50:11 2000 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.82: +87 -25 lines
Diff to previous 1.82 (colored)

Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it).  Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.

Revision 1.78.2.2 / (download) - annotate - [select for diffs], Fri Aug 11 23:10:15 2000 UTC (23 years, 6 months ago) by thorpej
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-ALPHA2
Changes since 1.78.2.1: +5 -1 lines
Diff to previous 1.78.2.1 (colored) to branchpoint 1.78 (colored)

Pullup from trunk:
Add a DIAGNOSTIC or LOCKDEBUG check for held spin locks.

Revision 1.78.2.1 / (download) - annotate - [select for diffs], Fri Aug 11 23:07:39 2000 UTC (23 years, 6 months ago) by thorpej
Branch: netbsd-1-5
Changes since 1.78: +3 -8 lines
Diff to previous 1.78 (colored)

Pullup from trunk:
It doesn't make sense to charge simple locks to proc's, because
simple locks are held by CPUs.  Remove p_simple_locks (which was
unused anyway, really), and add a LOCKDEBUG check for held simple
locks in mi_switch().  Grow p_locks to an int to take up the space
previously used by p_simple_locks so that the proc structure doens't
change size.

Revision 1.82 / (download) - annotate - [select for diffs], Mon Aug 7 22:10:53 2000 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.81: +5 -1 lines
Diff to previous 1.81 (colored)

Add a DIAGNOSTIC or LOCKDEBUG check for held spin locks.

Revision 1.81 / (download) - annotate - [select for diffs], Mon Aug 7 21:55:23 2000 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.80: +3 -8 lines
Diff to previous 1.80 (colored)

It doesn't make sense to charge simple locks to proc's, because
simple locks are held by CPUs.  Remove p_simple_locks (which was
unused anyway, really), and add a LOCKDEBUG check for held simple
locks in mi_switch().  Grow p_locks to an int to take up the space
previously used by p_simple_locks so that the proc structure doens't
change size.

Revision 1.80 / (download) - annotate - [select for diffs], Wed Aug 2 20:21:36 2000 UTC (23 years, 7 months ago) by nathanw
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

principal -> principle (in a comment)

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

remove include of <vm/vm.h>

Revision 1.75.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:09:11 2000 UTC (23 years, 8 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.75: +174 -62 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.78 / (download) - annotate - [select for diffs], Sat Jun 10 18:44:44 2000 UTC (23 years, 8 months ago) by sommerfeld
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.77: +10 -3 lines
Diff to previous 1.77 (colored)

Fix assorted bugs around shutdown/reboot/panic time.
 - add a new global variable, doing_shutdown, which is nonzero if
vfs_shutdown() or panic() have been called.
- in panic, set RB_NOSYNC if doing_shutdown is already set on entry
so we don't reenter vfs_shutdown if we panic'ed there.
 - in vfs_shutdown, don't use proc0's process for sys_sync unless
curproc is NULL.
 - in lockmgr, attribute successful locks to proc0 if doing_shutdown
&& curproc==NULL, and  panic if we can't get the lock right away; avoids the
spurious lockmgr DIAGNOSTIC panic from the ddb reboot command.
 - in subr_pool, deal with curproc==NULL in the doing_shutdown case.
 - in mfs_strategy, bitbucket writes if doing_shutdown, so we don't
wedge waiting for the mfs process.
 - in ltsleep, treat ((curproc == NULL) && doing_shutdown) like the
panicstr case.

Appears to fix: kern/9239, kern/10187, kern/9367.
May also fix kern/10122.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Jun 8 05:50:37 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.76: +121 -55 lines
Diff to previous 1.76 (colored)

Change tsleep() to ltsleep(), which takes an interlock argument.  The
interlock is released once the scheduler is locked, so that a race
between a sleeper and an awakener is prevented in a multiprocessor
environment.  Provide a tsleep() macro that provides the old API.

Revision 1.76 / (download) - annotate - [select for diffs], Wed May 31 05:02:33 2000 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.75: +46 -7 lines
Diff to previous 1.75 (colored)

Track which process a CPU is running/has last run on by adding a
p_cpu member to struct proc.  Use this in certain places when
accessing scheduler state, etc.  For the single-processor case,
just initialize p_cpu in fork1() to avoid having to set it in the
low-level context switch code on platforms which will never have
multiprocessing.

While I'm here, comment a few places where there are known issues
for the SMP implementation.

Revision 1.75 / (download) - annotate - [select for diffs], Sat May 27 05:00:48 2000 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.74: +1 -65 lines
Diff to previous 1.74 (colored)

All users of the old sleep() are now gone; nuke it.

Revision 1.74 / (download) - annotate - [select for diffs], Sat May 27 00:40:46 2000 UTC (23 years, 9 months ago) by sommerfeld
Branch: MAIN
Changes since 1.73: +13 -13 lines
Diff to previous 1.73 (colored)

Reduce use of curproc in several places:

 - Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()

Revision 1.73 / (download) - annotate - [select for diffs], Fri May 26 21:20:31 2000 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.72: +29 -37 lines
Diff to previous 1.72 (colored)

First sweep at scheduler state cleanup.  Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.

Revision 1.72 / (download) - annotate - [select for diffs], Fri May 26 00:36:52 2000 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.71: +12 -10 lines
Diff to previous 1.71 (colored)

Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor.  Test against SONPROC as appropriate rather than
combinations of SRUN and curproc.  Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.

Revision 1.57.2.3 / (download) - annotate - [select for diffs], Sun Apr 30 20:13:11 2000 UTC (23 years, 10 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003
Changes since 1.57.2.2: +6 -5 lines
Diff to previous 1.57.2.2 (colored) to branchpoint 1.57 (colored) next main 1.58 (colored)

Modify/re-do last pullup (via patch, requested by sommerfeld):
  Fix two bugs:
   o A malicious or erroneous program can hog the CPU in uiomove()
   o A ktrace of such a program can hog large amounts of kernel memory
  This version of the fix does not increase the size of struct proc
  compared to 1.4.2.

Revision 1.57.2.2 / (download) - annotate - [select for diffs], Sun Apr 30 12:08:06 2000 UTC (23 years, 10 months ago) by he
Branch: netbsd-1-4
Changes since 1.57.2.1: +103 -1 lines
Diff to previous 1.57.2.1 (colored) to branchpoint 1.57 (colored)

Pull up revision 1.69 (via patch, requested by sommerfeld):
  Fix two bugs:
   o A malicious or erroneous program can hog the CPU in uiomove()
   o A ktrace of such a program can hog large amounts of kernel memory
  This increses the size of struct proc, so kernel-grovellers need
  rebuild after this.

Revision 1.71 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:12 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.70: +29 -29 lines
Diff to previous 1.70 (colored)

Get rid of register declarations.

Revision 1.70 / (download) - annotate - [select for diffs], Tue Mar 28 22:04:46 2000 UTC (23 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.69: +1 -2 lines
Diff to previous 1.69 (colored)

endtsleep() is prototyped at the top of the file, delete duplicate
declaration inside tsleep().

Revision 1.69 / (download) - annotate - [select for diffs], Thu Mar 23 20:37:59 2000 UTC (23 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.68: +67 -2 lines
Diff to previous 1.68 (colored)

Track if a process has been through a round-robin cycle without yielding
the CPU, and mark that it should yield if that happens.

Based on a discussion with Artur Grabowski.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Mar 23 06:30:12 2000 UTC (23 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.67: +9 -5 lines
Diff to previous 1.67 (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.65.2.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:35:51 1999 UTC (24 years, 2 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.65: +7 -6 lines
Diff to previous 1.65 (colored) next main 1.66 (colored)

Pull up to last week's -current.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Nov 15 18:49:09 1999 UTC (24 years, 3 months ago) by fvdl
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, chs-ubc2-newbase
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

Add Kirk McKusick's soft updates code to the trunk. Not enabled by
default, as the copyright on the main file (ffs_softdep.c) is such
that is has been put into gnusrc. options SOFTDEP will pull this
in. This code also contains the trickle syncer.

Bump version number to 1.4O

Revision 1.66.4.1 / (download) - annotate - [select for diffs], Tue Oct 19 12:50:03 1999 UTC (24 years, 4 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored) next main 1.67 (colored)

Bring in Kirk McKusick's FFS softdep code on a branch.

Revision 1.57.2.1 / (download) - annotate - [select for diffs], Sun Oct 17 22:29:40 1999 UTC (24 years, 4 months ago) by cgd
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH002
Changes since 1.57: +6 -5 lines
Diff to previous 1.57 (colored)

pull up rev 1.66 from trunk (requested by ross):
  Correct use of `wrong' clock for %cpu calculation.  (This is not
  a  functional change at present because all clock frequencies are
  the same.)

Revision 1.66 / (download) - annotate - [select for diffs], Thu Oct 14 05:59:57 1999 UTC (24 years, 4 months ago) by ross
Branch: MAIN
CVS Tags: fvdl-softdep-base, comdex-fall-1999-base, comdex-fall-1999
Branch point for: thorpej_scsipi, fvdl-softdep
Changes since 1.65: +6 -5 lines
Diff to previous 1.65 (colored)

Back out a small and unfinished piece of the old scheduler rototill.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Sep 17 20:09:05 1999 UTC (24 years, 5 months ago) by thorpej
Branch: MAIN
Branch point for: wrstuden-devbsize
Changes since 1.64: +1 -3 lines
Diff to previous 1.64 (colored)

Centralize the declaration and clearing of `cold'.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Sep 15 21:54:57 1999 UTC (24 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.63: +7 -3 lines
Diff to previous 1.63 (colored)

Be slightly more informative in the tsleep() diagnostics.

Revision 1.57.4.2 / (download) - annotate - [select for diffs], Mon Aug 2 22:19:13 1999 UTC (24 years, 7 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.57.4.1: +131 -18 lines
Diff to previous 1.57.4.1 (colored) to branchpoint 1.57 (colored) next main 1.58 (colored)

Update from trunk.

Revision 1.63 / (download) - annotate - [select for diffs], Mon Jul 26 23:00:59 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.62: +128 -18 lines
Diff to previous 1.62 (colored)

Implement wakeup_one(), which wakes up the highest priority process
first in line for the specified identifier.  For use in places where
you don't want a Thundering Herd.

While here, add an optimization to wakeup() suggested by Ross Harvey.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Jul 25 06:30:35 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

Turn the proclist lock into a read/write spinlock.  Update proclist locking
calls to reflect this.  Also, block statclock rather than softclock during
in the proclist locking functions, to address a problem reported on
current-users by Sean Doran.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jul 22 21:08:32 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.60: +3 -1 lines
Diff to previous 1.60 (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.60 / (download) - annotate - [select for diffs], Thu Jul 22 18:13:37 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.59: +2 -1 lines
Diff to previous 1.59 (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.57.4.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:24:02 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.57: +1 -1 lines
Diff to previous 1.57 (colored)

Sync w/ -current.

Revision 1.59 / (download) - annotate - [select for diffs], Wed Apr 21 02:37:07 1999 UTC (24 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.58: +0 -2 lines
Diff to previous 1.58 (colored)

revert previous.  oops.

Revision 1.58 / (download) - annotate - [select for diffs], Wed Apr 21 02:31:50 1999 UTC (24 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.57: +3 -1 lines
Diff to previous 1.57 (colored)

properly test the msgsz as "msgsz - len".  from PR#7386

Revision 1.57 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:25 1999 UTC (24 years, 11 months ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH001, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: netbsd-1-4, chs-ubc2
Changes since 1.56: +1 -12 lines
Diff to previous 1.56 (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.56 / (download) - annotate - [select for diffs], Sun Feb 28 18:14:57 1999 UTC (25 years ago) by ross
Branch: MAIN
Changes since 1.55: +14 -13 lines
Diff to previous 1.55 (colored)

schedclk() -> schedclock(), for consistency with hardclock(), statclock(), ...
update comments for recent scheduler mods

Revision 1.55 / (download) - annotate - [select for diffs], Tue Feb 23 02:56:03 1999 UTC (25 years ago) by ross
Branch: MAIN
Changes since 1.54: +39 -10 lines
Diff to previous 1.54 (colored)

Scheduler bug fixes and reorganization
* fix the ancient nice(1) bug, where nice +20 processes incorrectly
  steal 10 - 20% of the CPU, (or even more depending on load average)
* provide a new schedclk() mechanism at a new clock at schedhz, so high
  platform hz values don't cause nice +0 processes to look like they are
  niced
* change the algorithm slightly, and reorganize the code a lot
* fix percent-CPU calculation bugs, and eliminate some no-op code

=== nice bug === Correctly divide the scheduler queues between niced and
compute-bound processes. The current nice weight of two (sort of, see
`algorithm change' below) neatly divides the USRPRI queues in half; this
should have been used to clip p_estcpu, instead of UCHAR_MAX.  Besides
being the wrong amount, clipping an unsigned char to UCHAR_MAX is a no-op,
and it was done after decay_cpu() which can only _reduce_ the value.  It
has to be kept <= NICE_WEIGHT * PRIO_MAX - PPQ or processes can
scheduler-penalize themselves onto the same queue as nice +20 processes.
(Or even a higher one.)

=== New schedclk() mechansism === Some platforms should be cutting down
stathz before hitting the scheduler, since the scheduler algorithm only
works right in the vicinity of 64 Hz. Rather than prescale hz, then scale
back and forth by 4 every time p_estcpu is touched (each occurance an
abstraction violation), use p_estcpu without scaling and require schedhz
to be generated directly at the right frequency. Use a default stathz (well,
actually, profhz) / 4, so nothing changes unless a platform defines schedhz
and a new clock.  Define these for alpha, where hz==1024, and nice was
totally broke.

=== Algorithm change === The nice value used to be added to the
exponentially-decayed scheduler history value p_estcpu, in _addition_ to
be incorporated directly (with greater wieght) into the priority calculation.
At first glance, it appears to be a pointless increase of 1/8 the nice
effect (pri = p_estcpu/4 + nice*2), but it's actually at least 3x that
because it will ramp up linearly but be decayed only exponentially, thus
converging to an additional .75 nice for a loadaverage of one. I killed
this, it makes the behavior hard to control, almost impossible to analyze,
and the effect (~~nothing at for the first second, then somewhat increased
niceness after three seconds or more, depending on load average) pointless.

=== Other bugs === hz -> profhz in the p_pctcpu = f(p_cpticks) calcuation.
Collect scheduler functionality. Try to put each abstraction in just one
place.

Revision 1.54 / (download) - annotate - [select for diffs], Wed Nov 4 06:19:56 1998 UTC (25 years, 3 months ago) by chs
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Changes since 1.53: +7 -2 lines
Diff to previous 1.53 (colored)

LOCKDEBUG enhancements for non-MP:
keep a list of locked locks.
use this to print where the lock was locked
when we either go to sleep with a lock held
or try to free a locked lock.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Sep 11 12:50:11 1998 UTC (25 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.52: +6 -4 lines
Diff to previous 1.52 (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.52 / (download) - annotate - [select for diffs], Sat Jul 4 22:18:51 1998 UTC (25 years, 8 months ago) by jonathan
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.51: +2 -1 lines
Diff to previous 1.51 (colored)

defopt DDB.

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

defopt KTRACE

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

Merge with Lite2 + local changes

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:13:01 1998 UTC (26 years ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +8 -3 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:43 1998 UTC (26 years ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1.1.1: +666 -1 lines
Diff to previous 1.1.1.1 (colored)

Import 4.4BSD-Lite for reference

Revision 1.49 / (download) - annotate - [select for diffs], Thu Feb 12 20:39:41 1998 UTC (26 years ago) by kleink
Branch: MAIN
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

Fix variable declarations:  register -> register int.

Revision 1.48 / (download) - annotate - [select for diffs], Tue Feb 10 14:09:45 1998 UTC (26 years 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:55 1998 UTC (26 years ago) by mrg
Branch: MAIN
Changes since 1.46: +14 -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.44.4.1 / (download) - annotate - [select for diffs], Tue Oct 14 10:26:05 1997 UTC (26 years, 4 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.44: +2 -4 lines
Diff to previous 1.44 (colored) next main 1.45 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Oct 10 08:19:44 1997 UTC (26 years, 4 months ago) by mycroft
Branch: MAIN
CVS Tags: 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, netbsd-1-3, marc-pcmcia-base
Changes since 1.45: +1 -3 lines
Diff to previous 1.45 (colored)

GC pageproc and bclnlist.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Oct 9 12:49:48 1997 UTC (26 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Make wmesg arguments to various functions const.

Revision 1.44.6.1 / (download) - annotate - [select for diffs], Mon Sep 8 23:10:36 1997 UTC (26 years, 5 months ago) by thorpej
Branch: thorpej-signal
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored) next main 1.45 (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.44 / (download) - annotate - [select for diffs], Wed May 7 18:49:10 1997 UTC (26 years, 9 months ago) by gwr
Branch: MAIN
CVS Tags: thorpej-signal-base, marc-pcmcia-bp, bouyer-scsipi
Branch point for: thorpej-signal, marc-pcmcia
Changes since 1.43: +1 -50 lines
Diff to previous 1.43 (colored)

Moved db_show_all_procs() to kern_proc.c

Revision 1.37.4.1 / (download) - annotate - [select for diffs], Wed Dec 11 09:44:21 1996 UTC (27 years, 2 months ago) by mycroft
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.37: +9 -6 lines
Diff to previous 1.37 (colored) next main 1.38 (colored)

From trunk:
Rearrange tsleep() so that a panic while `curproc' is null can successfully
sync.

Revision 1.43 / (download) - annotate - [select for diffs], Wed Nov 6 20:20:00 1996 UTC (27 years, 3 months ago) by cgd
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Fix an inconsistency that came in with Lite: setrq() was renamed to
setrunqueue(), but remrq() was never renamed.  Rename remrq() to
remrunqueue().

Revision 1.42 / (download) - annotate - [select for diffs], Tue Oct 15 23:00:10 1996 UTC (27 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.41: +9 -6 lines
Diff to previous 1.41 (colored)

reorganize tsleep() so the (cold || panicstr) test is done before the
ktrace context switch checking.  If syncing disks while handling a panic
that occurred while 'curproc' was NULL, the old code would dereference
NULL and die.  The (slight) reorganization was done so that space (one extra
splhigh()), rather than time (one extra comparison), would be wasted.

Revision 1.41 / (download) - annotate - [select for diffs], Sun Oct 13 02:32:35 1996 UTC (27 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

backout previous kprintf change

Revision 1.40 / (download) - annotate - [select for diffs], Thu Oct 10 22:46:20 1996 UTC (27 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

printf -> kprintf, sprintf -> ksprintf

Revision 1.39 / (download) - annotate - [select for diffs], Wed Oct 2 18:05:05 1996 UTC (27 years, 5 months ago) by ws
Branch: MAIN
Changes since 1.38: +5 -4 lines
Diff to previous 1.38 (colored)

Fix p_nice vs. NZERO code.
Change NZERO to 20 to always make p_nice positive.
On Christos' suggestion make p_nice explicitly u_char.

Revision 1.38 / (download) - annotate - [select for diffs], Wed Jul 17 21:54:06 1996 UTC (27 years, 7 months ago) by explorer
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

Add compile-time and run-time control over automatic niceing

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

remove include of <sys/cpu.h>

Revision 1.36 / (download) - annotate - [select for diffs], Sat Mar 30 22:23:25 1996 UTC (27 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.35: +4 -4 lines
Diff to previous 1.35 (colored)

Fix db_printf formats.

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

More proto fixes

Revision 1.34 / (download) - annotate - [select for diffs], Sun Feb 4 02:16:17 1996 UTC (28 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.33: +20 -8 lines
Diff to previous 1.33 (colored)

First pass at prototyping

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jun 8 23:51:03 1995 UTC (28 years, 8 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: +7 -1 lines
Diff to previous 1.32 (colored)

Fix various signal handling bugs:
* If we got a stopping signal while already stopped with the same signal,
the second signal would sometimes (but not always) be ignored.
* Signals delivered by the debugger always pretended to be stopping
signals.
* PT_ATTACH still didn't quite work right.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Apr 22 19:42:58 1995 UTC (28 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

- new copyargs routine.
- use emul_xxx
- deprecate nsysent; use constant SYS_MAXSYSCALL instead.
- deprecate ep_setup
- call sendsig and setregs indirectly.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Mar 19 23:44:51 1995 UTC (28 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

Use %p.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Oct 30 21:47:43 1994 UTC (29 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

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

Revision 1.29 / (download) - annotate - [select for diffs], Tue Aug 30 06:22:10 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.28: +4 -4 lines
Diff to previous 1.28 (colored)

Display emulation type.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Aug 30 05:37:14 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.27: +40 -38 lines
Diff to previous 1.27 (colored)

Clean up some debugging code.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Aug 30 03:05:44 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.26: +5 -5 lines
Diff to previous 1.26 (colored)

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

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jun 29 06:32:45 1994 UTC (29 years, 8 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.25: +719 -1 lines
Diff to previous 1.25 (colored)

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

Revision 1.25 / (download) - annotate - [select for diffs], Wed May 18 05:12:42 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.24: +1 -1 lines
Diff to previous 1.24 (colored)

mostly-machine-indepedent switch, and changes to match.  also, hack init_main

Revision 1.24 / (download) - annotate - [select for diffs], Sat May 14 19:43:02 1994 UTC (29 years, 9 months ago) by glass
Branch: MAIN
Changes since 1.23: +1 -1 lines
Diff to previous 1.23 (colored)

missing rcsid

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

setrq -> setrunqueue, sched -> scheduler

Revision 1.22 / (download) - annotate - [select for diffs], Sat May 7 00:57:23 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.21: +1 -1 lines
Diff to previous 1.21 (colored)

function name changes

Revision 1.21 / (download) - annotate - [select for diffs], Fri May 6 22:02:25 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +1 -1 lines
Diff to previous 1.20 (colored)

Put some more code in splstatclock(), just to be safe.

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

Now setpri() is really toast.

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

setpri() is toast.

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

Remove now-bogus casts.

Revision 1.17 / (download) - annotate - [select for diffs], Thu May 5 05:38:18 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.16: +1 -1 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Wed May 4 03:42:00 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.15: +1 -1 lines
Diff to previous 1.15 (colored)

Rename a lot of process flags.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Apr 29 23:16:21 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.14: +1 -1 lines
Diff to previous 1.14 (colored)

change timeout/untimeout/wakeup/sleep/tsleep args to void *

Revision 1.14 / (download) - annotate - [select for diffs], Wed Dec 22 13:46:28 1993 UTC (30 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.13: +1 -1 lines
Diff to previous 1.13 (colored)

cast to match header (changed back...)

Revision 1.13 / (download) - annotate - [select for diffs], Mon Dec 20 12:42:34 1993 UTC (30 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.12: +1 -1 lines
Diff to previous 1.12 (colored)

load average changes from magnum

Revision 1.12 / (download) - annotate - [select for diffs], Sat Dec 18 04:21:14 1993 UTC (30 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +1 -1 lines
Diff to previous 1.11 (colored)

Canonicalize all #includes.

Revision 1.10.2.5 / (download) - annotate - [select for diffs], Sat Nov 27 19:52:53 1993 UTC (30 years, 3 months ago) by mycroft
Branch: magnum
Changes since 1.10.2.4: +1 -1 lines
Diff to previous 1.10.2.4 (colored) next main 1.11 (colored)

sleep() is now deprecated.

Revision 1.10.2.4 / (download) - annotate - [select for diffs], Sun Nov 14 20:32:12 1993 UTC (30 years, 3 months ago) by mycroft
Branch: magnum
Changes since 1.10.2.3: +1 -1 lines
Diff to previous 1.10.2.3 (colored)

Canonicalize all #includes.

Revision 1.10.2.3 / (download) - annotate - [select for diffs], Tue Sep 28 05:46:01 1993 UTC (30 years, 5 months ago) by deraadt
Branch: magnum
Changes since 1.10.2.2: +1 -1 lines
Diff to previous 1.10.2.2 (colored)

define some things from sys/kernel.h

Revision 1.10.2.2 / (download) - annotate - [select for diffs], Fri Sep 24 08:51:22 1993 UTC (30 years, 5 months ago) by mycroft
Branch: magnum
Changes since 1.10.2.1: +1 -1 lines
Diff to previous 1.10.2.1 (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.11 / (download) - annotate - [select for diffs], Wed Sep 15 22:30:40 1993 UTC (30 years, 5 months ago) by cgd
Branch: MAIN
CVS Tags: magnum-base
Changes since 1.10: +1 -1 lines
Diff to previous 1.10 (colored)

make allproc be volatile, and cast things accordingly.
suggested by torek, because CSRG had problems with reordering
of assignments to allproc leading to strange panics from kernels
compiled with gcc2...

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Tue Sep 14 18:24:19 1993 UTC (30 years, 5 months ago) by mycroft
Branch: magnum
Changes since 1.10: +1 -1 lines
Diff to previous 1.10 (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.10 / (download) - annotate - [select for diffs], Sun Aug 29 01:50:51 1993 UTC (30 years, 6 months ago) by cgd
Branch: MAIN
Branch point for: magnum
Changes since 1.9: +1 -1 lines
Diff to previous 1.9 (colored)

print more DIAGNOSITC info, and startrtclock early on the mac (like i386)

Revision 1.9 / (download) - annotate - [select for diffs], Thu Jul 15 18:36:32 1993 UTC (30 years, 7 months ago) by brezak
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
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (colored)

Add 'ps' command. Add -more- pager to output from Mach ddb.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jun 27 06:22:32 1993 UTC (30 years, 8 months ago) by andrew
Branch: MAIN
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

#endif was somehow missing from the end of a DDB conditional!

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jun 27 06:01:47 1993 UTC (30 years, 8 months ago) by andrew
Branch: MAIN
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (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.6 / (download) - annotate - [select for diffs], Sun Jun 27 01:05:56 1993 UTC (30 years, 8 months ago) by glass
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

another NDDB -> DDB change.  why did DDB invade kern/*?

Revision 1.5 / (download) - annotate - [select for diffs], Thu May 20 02:54:42 1993 UTC (30 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)

add $Id$ strings, and clean up file headers where necessary

Revision 1.4 / (download) - annotate - [select for diffs], Thu Apr 15 07:15:25 1993 UTC (30 years, 10 months ago) by glass
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

i hate NDDB......

Revision 1.3 / (download) - annotate - [select for diffs], Sat Apr 10 12:06:15 1993 UTC (30 years, 10 months ago) by glass
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-8
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

fixed to be compliant, subservient, and to take advantage of the newly
hacked config(8)

Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 21 18:04:42 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: patchkit-0-2-2
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

after 0.2.2 "stable" patches applied

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (30 years, 11 months ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: 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 (30 years, 11 months 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>