The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.55: download - view: text, markup, annotated - select for diffs
Sun Oct 15 10:30:20 2023 UTC (13 months, 3 weeks ago) by riastradh
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +4 -2 lines
kern_turnstile.c: Use <sys/lwp.h> explicitly for struct lwp members.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun Oct 15 10:27:11 2023 UTC (13 months, 3 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +3 -2 lines
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.53: download - view: text, markup, annotated - select for diffs
Sun Oct 8 13:23:05 2023 UTC (14 months ago) by ad
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +3 -3 lines
Ensure that an LWP that has taken a legitimate wakeup never produces an
error code from sleepq_block().  Then, it's possible to make cv_signal()
work as expected and only ever wake a singular LWP.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Wed Oct 4 20:39:35 2023 UTC (14 months, 1 week ago) by ad
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +3 -3 lines
Turnstiles: use the syncobj name for ps/top wmesg when sleeping since it's
more informative than "tstile".

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

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat Sep 23 18:48:04 2023 UTC (14 months, 2 weeks ago) by ad
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +2 -8 lines
- 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.49: download - view: text, markup, annotated - select for diffs
Sat Sep 23 18:21:11 2023 UTC (14 months, 2 weeks ago) by ad
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +3 -8 lines
Repply this change with a couple of bugs fixed:

- Do away with separate pool_cache for some kernel objects that have no special
  requirements and use the general purpose allocator instead. On one of my
  test systems this makes for a small (~1%) but repeatable reduction in system
  time during builds presumably because it decreases the kernel's cache /
  memory bandwidth footprint a little.
- vfs_lockf: cache a pointer to the uidinfo and put mutex in the data segment.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Sep 12 16:17:21 2023 UTC (14 months, 4 weeks ago) by ad
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +8 -3 lines
Back out recent change to replace pool_cache with then general allocator.
Will return to this when I have time again.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun Sep 10 14:45:52 2023 UTC (15 months ago) by ad
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +3 -8 lines
- Do away with separate pool_cache for some kernel objects that have no special
  requirements and use the general purpose allocator instead.  On one of my
  test systems this makes for a small (~1%) but repeatable reduction in system
  time during builds presumably because it decreases the kernel's cache /
  memory bandwidth footprint a little.
- vfs_lockf: cache a pointer to the uidinfo and put mutex in the data segment.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun Apr 9 09:18:09 2023 UTC (20 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +8 -6 lines
kern: KASSERT(A && B) -> KASSERT(A); KASSERT(B)

Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Oct 26 23:27:16 2022 UTC (2 years, 1 month ago) by riastradh
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +4 -4 lines
kern/kern_turnstile.c: Get turnstile0 from sys/sleeptab.h.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Wed Jun 29 22:27:01 2022 UTC (2 years, 5 months ago) by riastradh
Branches: MAIN
CVS tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +3 -3 lines
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.43: download - view: text, markup, annotated - select for diffs
Sat May 28 22:08:46 2022 UTC (2 years, 6 months ago) by andvar
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +3 -3 lines
s/grabing/grabbing/ in comments.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sat Apr 9 23:45:36 2022 UTC (2 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +6 -5 lines
kern: Handle l_mutex with atomic_store_release, atomic_load_consume.

- Where the lock is held and known to be correct, no atomic.
- In loops to acquire the lock, use atomic_load_relaxed before we
  restart with atomic_load_consume.

Nix membar_exit.

(Who knows, using atomic_load_consume here might fix bugs on Alpha!)

Revision 1.41: download - view: text, markup, annotated - select for diffs
Wed Feb 23 21:54:41 2022 UTC (2 years, 9 months ago) by andvar
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -3 lines
fix various typos in comments, mainly immediatly/immediately/,
as well shared and recently fixed typos in OpenBSD code by Jonathan Grey.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sat May 23 20:45:10 2020 UTC (4 years, 6 months ago) by ad
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-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
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +8 -13 lines
- Replace pid_table_lock with a lockless lookup covered by pserialize, with
  the "writer" side being pid_table expansion.  The basic idea is that when
  doing an LWP lookup there is usually already a lock held (p->p_lock), or a
  spin mutex that needs to be taken (l->l_mutex), and either can be used to
  get the found LWP stable and confidently determine that all is correct.

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

Revision 1.32.40.2: download - view: text, markup, annotated - select for diffs
Tue Apr 21 18:42:42 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.32.40.1: preferred, colored; branchpoint 1.32: preferred, colored; next MAIN 1.33: preferred, colored
Changes since revision 1.32.40.1: +1 -1 lines
Sync with HEAD

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

Revision 1.39: download - view: text, markup, annotated - select for diffs
Sun Apr 19 20:35:29 2020 UTC (4 years, 7 months ago) by ad
Branches: MAIN
CVS tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -3 lines
Set LW_SINTR earlier so it doesn't pose a problem for doing interruptable
waits with turnstiles (not currently done).

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

Revision 1.38: download - view: text, markup, annotated - select for diffs
Thu Mar 26 22:43:19 2020 UTC (4 years, 8 months ago) by ad
Branches: MAIN
CVS tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +4 -4 lines
TAILQ -> LIST

Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Mar 26 19:46:42 2020 UTC (4 years, 8 months ago) by ad
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +10 -9 lines
Change sleepq_t from a TAILQ to a LIST and remove SOBJ_SLEEPQ_FIFO.  Only
select/poll used the FIFO method and that was for collisions which rarely
occur.  Shrinks sleep_t and condvar_t.

Revision 1.35.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 25 22:38:51 2020 UTC (4 years, 10 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.35: preferred, colored; next MAIN 1.36: preferred, colored
Changes since revision 1.35: +4 -8 lines
Sync with head.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Tue Jan 21 20:31:57 2020 UTC (4 years, 10 months ago) by ad
Branches: MAIN
CVS tags: is-mlppp-base, is-mlppp, ad-namecache-base3, ad-namecache-base2
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +4 -8 lines
ddb's "show all locks":

- Make the output easier to scan quickly.

- Show every LWP that is blocked on a lock, and the details of the lock.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Mon Dec 16 19:22:15 2019 UTC (4 years, 11 months ago) by ad
Branches: MAIN
CVS tags: ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +13 -10 lines
Just make the turnstile locks statics and avoid the indirect reference
since COHERENCY_UNIT does the right thing in !MP.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Nov 24 13:14:23 2019 UTC (5 years ago) by ad
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +3 -3 lines
Put section attribute for turnstile0 in the correct place.  For LLVM.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Thu Nov 21 18:56:55 2019 UTC (5 years ago) by ad
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +49 -35 lines
Sleep queues & turnstiles:

- Avoid false sharing.
- Make the turnstile hash function more suitable.
- Increase turnstile hash table size.
- Make amends by having only one set of system wide sleep queue hash locks.

Revision 1.30.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:22:32 2012 UTC (12 years, 1 month ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.30.2.1: preferred, colored; branchpoint 1.30: preferred, colored; next MAIN 1.31: preferred, colored
Changes since revision 1.30.2.1: +34 -14 lines
sync with head

Revision 1.32: download - view: text, markup, annotated - select for diffs
Fri Jun 15 13:51:40 2012 UTC (12 years, 5 months ago) by yamt
Branches: MAIN
CVS tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, tls-maxphys-base-20171202, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, nick-nhusb, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, khorben-n900, jdolecek-ncq-base, jdolecek-ncq, isaki-audio2-base, isaki-audio2, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, agc-symver-base, agc-symver
Branch point for: phil-wifi
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +34 -14 lines
comments and assertions.
no functional changes.

Revision 1.30.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:27 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +142 -118 lines
sync with head

Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Dec 2 12:31:53 2011 UTC (13 years ago) by yamt
Branches: MAIN
CVS tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-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, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +142 -118 lines
move priority inheritance code to separate functions

Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Jul 27 14:35:34 2011 UTC (13 years, 4 months ago) by uebayasi
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -4 lines
These don't need uvm/uvm_extern.h.

Revision 1.28.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:09:33 2011 UTC (13 years, 6 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28: +7 -7 lines
Sync with HEAD.

Revision 1.28.4.1: download - view: text, markup, annotated - select for diffs
Tue May 31 03:05:02 2011 UTC (13 years, 6 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28: +7 -7 lines
sync with head

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri May 13 22:19:41 2011 UTC (13 years, 7 months ago) by rmind
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +7 -7 lines
Sprinkle __cacheline_aligned and __read_mostly, make some functions static.

Revision 1.23.12.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:28:17 2010 UTC (14 years, 7 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23: +25 -4 lines
sync to netbsd-5

Revision 1.18.2.4: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:18 2010 UTC (14 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.18.2.3: preferred, colored; branchpoint 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18.2.3: +7 -17 lines
sync with head

Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed Nov 18 12:26:22 2009 UTC (15 years ago) by yamt
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, matt-premerge-20091211, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: rmind-uvmplock, jruoho-x86intr
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -13 lines
turnstile_block: reduce code duplication.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Nov 18 12:25:15 2009 UTC (15 years ago) by yamt
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +4 -4 lines
turnstile_block: turn a comment into KASSERTs.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Wed Oct 21 21:12:06 2009 UTC (15 years, 1 month ago) by rmind
Branches: MAIN
CVS tags: jym-xensuspend-nbase
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +4 -4 lines
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.23.4.1: download - view: text, markup, annotated - select for diffs
Mon Sep 28 01:38:24 2009 UTC (15 years, 2 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23: +25 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #1028):
	sys/kern/kern_turnstile.c: revision 1.25 via patch
PR kern/41923: assertion "cur != owner" failed
In the for(;;) loop of turnstile_block(), the lock owner can change while
cur's lock is released (cur's lock is also the tschain_t's mutex).
Remove the KASSERT about owner being invariant and try to deal with the
fact that the owner can change instead.
http://mail-index.netbsd.org/tech-kern/2009/08/24/msg005957.html
and followups.

Revision 1.18.2.3: download - view: text, markup, annotated - select for diffs
Wed Sep 16 13:38:01 2009 UTC (15 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.18.2.2: preferred, colored; branchpoint 1.18: preferred, colored
Changes since revision 1.18.2.2: +25 -4 lines
sync with head

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun Sep 13 14:38:20 2009 UTC (15 years, 3 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-nfs-mp-base8
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +25 -4 lines
PR kern/41923: assertion "cur != owner" failed
In the for(;;) loop of turnstile_block(), the lock owner can change while
cur's lock is released (cur's lock is also the tschain_t's mutex).
Remove the KASSERT about owner being invariant and try to deal with the
fact that the owner can change instead.
http://mail-index.netbsd.org/tech-kern/2009/08/24/msg005957.html
and followups.

Revision 1.23.8.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:21:57 2009 UTC (15 years, 7 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23: +11 -11 lines
Sync with HEAD.

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

Revision 1.18.2.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:13:47 2009 UTC (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.18.2.1: preferred, colored; branchpoint 1.18: preferred, colored
Changes since revision 1.18.2.1: +35 -30 lines
sync with head.

Revision 1.23.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:37:00 2009 UTC (15 years, 7 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23: +11 -11 lines
Sync with HEAD.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Mar 21 13:11:14 2009 UTC (15 years, 8 months ago) by ad
Branches: MAIN
CVS tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +11 -11 lines
Allocate sleep queue locks with mutex_obj_alloc. Reduces memory usage
on !MP kernels, and reduces false sharing on MP ones.

Revision 1.22.4.1: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:17:28 2008 UTC (16 years, 1 month ago) by haad
Branches: haad-dm
Diff to: previous 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22: +3 -2 lines
Sync with HEAD.

Revision 1.15.6.3: download - view: text, markup, annotated - select for diffs
Sun Sep 28 10:40:53 2008 UTC (16 years, 2 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.15.6.2: preferred, colored; branchpoint 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15.6.2: +1 -0 lines
Sync with HEAD.

Revision 1.20.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:31:43 2008 UTC (16 years, 2 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.20.2.1: preferred, colored; branchpoint 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20.2.1: +3 -2 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Aug 12 14:13:34 2008 UTC (16 years, 4 months ago) by thorpej
Branches: MAIN
CVS tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, nick-hppapmap-base2, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, mjf-devfs2-base, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, matt-nb5-mips64, jym-xensuspend
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +3 -2 lines
turnstile_block(): When an LWP puts its turnstile onto a sync object's
turnstile chain, assert that its turnstile's free list pointer is NULL.

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

Revision 1.17.2.2: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:05:39 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.17.2.1: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.2.1: +27 -23 lines
sync with head

Revision 1.15.6.2: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:10 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.15.6.1: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.6.1: +39 -30 lines
Sync with HEAD.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat May 31 12:03:15 2008 UTC (16 years, 6 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl
Branch point for: haad-dm
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +7 -3 lines
Add a comment to turnstile_block:

        * NOTE: if you get a panic in this code block, it is likely that
        * a lock has been destroyed or corrupted while still in use.  Try
        * compiling a kernel with LOCKDEBUG to pinpoint the problem.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon May 26 12:08:38 2008 UTC (16 years, 6 months ago) by ad
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +22 -22 lines
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.17.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:35:09 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +11 -10 lines
sync with head.

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

Revision 1.20: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:24:04 2008 UTC (16 years, 7 months ago) by martin
Branches: MAIN
CVS tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +2 -9 lines
Remove clause 3 and 4 from TNF licenses

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

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

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

Revision 1.18: download - view: text, markup, annotated - select for diffs
Thu Apr 24 23:26:00 2008 UTC (16 years, 7 months ago) by alc
Branches: MAIN
CVS tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -3 lines
fix typo in comment

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Apr 4 19:16:24 2008 UTC (16 years, 8 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +7 -3 lines
When a timeshared LWP blocks on a turnstile, elevate its priority into the
PRI_KTHREAD range. This is kind of ugly, but needed because of direct handoff
with rwlocks, and because threads that block holding a mutex regularly hold
other locks/resources.

Problem addressed: priority lending works well where a thread blocking on a
turnstile has a high priority level (eg realtime). For timeshared threads
(low priority) it's unlikely to have much effect. In the latter case threads
awoken from a turnstile can and do compete for CPU time with regular waits
like disk I/O. On MP systems this can result in a feedback loop where
threads cannot quickly get access to a resource held by a thread waking from
a turnstile. The waking thread eventually runs when enough of the other
threads block waiting for it, freeing up the CPU. The end result is a lot of
idle time during builds.

Revision 1.15.6.1: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:43:03 2008 UTC (16 years, 8 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -4 lines
Sync with HEAD.

Revision 1.1.18.7: download - view: text, markup, annotated - select for diffs
Mon Mar 24 09:39:02 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.18.6: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.18.6: +4 -4 lines
sync with head.

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 24 07:16:14 2008 UTC (16 years, 8 months ago) by keiichi
Branches: keiichi-mipv6
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +4 -4 lines
sync with head.

Revision 1.10.8.4: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:05:00 2008 UTC (16 years, 8 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.10.8.3: preferred, colored; branchpoint 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10.8.3: +5 -5 lines
sync with HEAD

Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Mar 17 16:54:51 2008 UTC (16 years, 8 months ago) by ad
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -4 lines
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.1.18.6: download - view: text, markup, annotated - select for diffs
Wed Feb 27 08:36:55 2008 UTC (16 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.18.5: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.18.5: +3 -3 lines
sync with head.

Revision 1.10.14.3: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:06:46 2008 UTC (16 years, 9 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.10.14.2: preferred, colored; branchpoint 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10.14.2: +3 -4 lines
Sync with HEAD.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Feb 14 14:26:57 2008 UTC (16 years, 10 months ago) by ad
Branches: MAIN
CVS tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -3 lines
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.1.18.5: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:46:15 2008 UTC (16 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.18.4: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.18.4: +2 -3 lines
sync with head

Revision 1.10.8.3: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:56:12 2008 UTC (16 years, 11 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.10.8.2: preferred, colored; branchpoint 1.10: preferred, colored
Changes since revision 1.10.8.2: +3 -4 lines
sync with HEAD

Revision 1.13.4.1: download - view: text, markup, annotated - select for diffs
Tue Jan 8 22:11:38 2008 UTC (16 years, 11 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13: +2 -3 lines
Sync with HEAD

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Jan 4 21:18:11 2008 UTC (16 years, 11 months ago) by ad
Branches: MAIN
CVS tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -3 lines
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.10.6.3: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:38:22 2007 UTC (17 years ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.10.6.2: preferred, colored; branchpoint 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10.6.2: +3 -3 lines
Sync with HEAD.

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

Revision 1.12.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 17:57:44 2007 UTC (17 years ago) by ad
Branches: vmlocking2
Diff to: previous 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12: +3 -3 lines
Sync with head.

Revision 1.1.18.4: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:32:54 2007 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.18.3: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.18.3: +3 -3 lines
sync with head

Revision 1.13: download - view: text, markup, annotated - select for diffs
Wed Dec 5 07:06:54 2007 UTC (17 years ago) by ad
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +3 -3 lines
Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written
for Solaris.

Revision 1.10.14.1: download - view: text, markup, annotated - select for diffs
Mon Nov 19 00:48:45 2007 UTC (17 years ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +14 -18 lines
Sync with HEAD.

Revision 1.1.18.3: download - view: text, markup, annotated - select for diffs
Thu Nov 15 11:44:46 2007 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.18.2: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.18.2: +14 -18 lines
sync with head.

Revision 1.10.12.1: download - view: text, markup, annotated - select for diffs
Tue Nov 13 16:02:14 2007 UTC (17 years, 1 month ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +14 -18 lines
Sync with HEAD

Revision 1.10.6.2: download - view: text, markup, annotated - select for diffs
Sun Nov 11 16:48:05 2007 UTC (17 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.10.6.1: preferred, colored; branchpoint 1.10: preferred, colored
Changes since revision 1.10.6.1: +6 -9 lines
Sync with HEAD.

Revision 1.10.8.2: download - view: text, markup, annotated - select for diffs
Thu Nov 8 11:00:04 2007 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.10.8.1: preferred, colored; branchpoint 1.10: preferred, colored
Changes since revision 1.10.8.1: +6 -9 lines
sync with -HEAD

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Nov 7 00:23:22 2007 UTC (17 years, 1 month ago) by ad
Branches: MAIN
CVS tags: vmlocking2-base1, vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +6 -9 lines
Merge from vmlocking:

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

Revision 1.10.8.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:32:06 2007 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +10 -11 lines
sync with HEAD

Revision 1.10.6.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 19:25:32 2007 UTC (17 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +10 -11 lines
Sync with HEAD.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Nov 6 00:42:43 2007 UTC (17 years, 1 month ago) by ad
Branches: MAIN
CVS tags: jmcneill-base
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +10 -11 lines
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.6.2.8: download - view: text, markup, annotated - select for diffs
Thu Nov 1 21:58:21 2007 UTC (17 years, 1 month ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.7: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.2.7: +5 -6 lines
- 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.1.18.2: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:40:58 2007 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.18.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.18.1: +153 -61 lines
sync with head.

Revision 1.6.2.7: download - view: text, markup, annotated - select for diffs
Sat Sep 1 12:56:48 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.6: preferred, colored
Changes since revision 1.6.2.6: +6 -9 lines
Update for pool_cache API changes.

Revision 1.7.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:09:59 2007 UTC (17 years, 5 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7: +37 -47 lines
Sync with head.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Jul 9 21:10:54 2007 UTC (17 years, 5 months ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: mjf-devfs, matt-armv6, jmcneill-pm, bouyer-xenamd64
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +11 -11 lines
Merge some of the less invasive changes from the vmlocking branch:

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

Revision 1.6.2.6: download - view: text, markup, annotated - select for diffs
Sun Jul 1 21:27:59 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.5: preferred, colored
Changes since revision 1.6.2.5: +13 -13 lines
Repair priority inheritance (broken by the changes to priority levels).

Revision 1.6.2.5: download - view: text, markup, annotated - select for diffs
Sun Jun 17 21:31:29 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.4: preferred, colored
Changes since revision 1.6.2.4: +5 -5 lines
- 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.6.2.4: download - view: text, markup, annotated - select for diffs
Fri Jun 8 14:17:23 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.3: preferred, colored
Changes since revision 1.6.2.3: +23 -33 lines
Sync with head.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu May 17 14:51:41 2007 UTC (17 years, 6 months ago) by yamt
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +24 -40 lines
merge yamt-idlelwp branch.  asked by core@.  some ports still needs work.

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

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

Revision 1.3.2.9: download - view: text, markup, annotated - select for diffs
Sun May 13 17:02:59 2007 UTC (17 years, 7 months ago) by ad
Branches: yamt-idlelwp
Diff to: previous 1.3.2.8: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.2.8: +3 -3 lines
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.3.2.8: download - view: text, markup, annotated - select for diffs
Thu Apr 19 04:19:44 2007 UTC (17 years, 7 months ago) by ad
Branches: yamt-idlelwp
Diff to: previous 1.3.2.7: preferred, colored
Changes since revision 1.3.2.7: +8 -16 lines
Pull up a change from the vmlocking branch:

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

Revision 1.3.2.7: download - view: text, markup, annotated - select for diffs
Mon Apr 16 23:31:21 2007 UTC (17 years, 7 months ago) by ad
Branches: yamt-idlelwp
Diff to: previous 1.3.2.6: preferred, colored
Changes since revision 1.3.2.6: +14 -24 lines
- Nuke the seperate scheduler locking scheme for UP kernels - it has been
  at the root of too many bugs.
- Add a LW_BOUND flag that indicates an LWP is bound to a specific CPU.

Revision 1.3.2.6: download - view: text, markup, annotated - select for diffs
Sun Apr 15 16:38:49 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.3.2.5: preferred, colored
Changes since revision 1.3.2.5: +6 -4 lines
sched_mutex -> spc_mutex.

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

Revision 1.6.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 10 18:34:05 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.2: preferred, colored
Changes since revision 1.6.2.2: +13 -19 lines
- 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.6.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 10 13:26:39 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.1: preferred, colored
Changes since revision 1.6.2.1: +10 -4 lines
Sync with head.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Apr 10 13:11:08 2007 UTC (17 years, 8 months ago) by ad
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +10 -4 lines
turnstile_wakeup: when restoring inherited priority, only lock curlwp
if its lock is sched_mutex. We can arrive here while on a sleep queue
(from eg cv_wait) and so curlwp will already be locked.

Revision 1.3.2.4: download - view: text, markup, annotated - select for diffs
Sat Mar 24 17:10:48 2007 UTC (17 years, 8 months ago) by ad
Branches: yamt-idlelwp
Diff to: previous 1.3.2.3: preferred, colored
Changes since revision 1.3.2.3: +3 -3 lines
Fix UP kernels. Having the different locking scheme for UP/MP is turning
out to be more hassle than it's worth...

Revision 1.3.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 24 14:56:04 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.3.2.2: preferred, colored
Changes since revision 1.3.2.2: +3 -3 lines
sync with head.

Revision 1.3.2.2: download - view: text, markup, annotated - select for diffs
Sat Mar 24 00:43:08 2007 UTC (17 years, 8 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.3.2.1: preferred, colored
Changes since revision 1.3.2.1: +3 -3 lines
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.6.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 13 16:51:56 2007 UTC (17 years, 9 months ago) by ad
Branches: vmlocking
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
Sync with head.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Mar 12 18:18:34 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
CVS tags: reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

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

Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue Feb 27 15:07:29 2007 UTC (17 years, 9 months ago) by yamt
Branches: MAIN
Branch point for: vmlocking
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +5 -5 lines
typedef pri_t and use it instead of int and u_char.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Feb 27 12:17:55 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -4 lines
turnstile_wakeup(): on a !MULTIPROCESSOR kernel the LWP is already locked.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:20:53 2007 UTC (17 years, 9 months ago) by yamt
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +123 -21 lines
implement priority inheritance.

Revision 1.1.18.1: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:11:13 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +407 -0 lines
sync with head.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Feb 15 20:21:13 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
Branch point for: yamt-idlelwp
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +5 -3 lines
Add uvm_kick_scheduler() (MP safe) to replace wakeup(&proc0).

Revision 1.2: download - view: text, markup, annotated - select for diffs
Fri Feb 9 21:55:31 2007 UTC (17 years, 10 months ago) by ad
Branches: MAIN
CVS tags: post-newlock2-merge
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +405 -0 lines
Merge newlock2 to head.

Revision 1.1.36.9: download - view: text, markup, annotated - select for diffs
Fri Feb 9 19:58:10 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.8: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.36.8: +9 -6 lines
- 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.1.36.8: download - view: text, markup, annotated - select for diffs
Mon Feb 5 17:58:13 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.7: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.7: +4 -7 lines
Try to reduce cache line ping-ponging.

Revision 1.1.36.7: download - view: text, markup, annotated - select for diffs
Mon Feb 5 13:00:56 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.6: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.6: +60 -17 lines
- Dump the contents of a lock's turnstile when an error is detected.
- Add a 'show lock' command to DDB.

Revision 1.1.36.6: download - view: text, markup, annotated - select for diffs
Sat Jan 27 14:00:02 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.5: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.5: +5 -5 lines
Rename some functions to better describe what they do.

Revision 1.1.36.5: download - view: text, markup, annotated - select for diffs
Fri Dec 29 20:27:44 2006 UTC (17 years, 11 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.4: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.4: +8 -8 lines
Checkpoint work in progress.

Revision 1.1.36.4: download - view: text, markup, annotated - select for diffs
Fri Nov 17 16:34:37 2006 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.3: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.3: +62 -17 lines
Checkpoint work in progress.

Revision 1.1.36.3: download - view: text, markup, annotated - select for diffs
Tue Oct 24 21:10:21 2006 UTC (18 years, 1 month ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.2: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.2: +6 -5 lines
- Redo LWP locking slightly and fix some races.
- Fix some locking botches.
- Make signal mask / stack per-proc for SA processes.
- Add _lwp_kill().

Revision 1.1.36.2: download - view: text, markup, annotated - select for diffs
Fri Oct 20 19:38:44 2006 UTC (18 years, 1 month ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.1: +107 -256 lines
Add a sleep queue implementation.

Revision 1.1.36.1: download - view: text, markup, annotated - select for diffs
Sun Sep 10 23:42:42 2006 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +465 -0 lines
Add updated locking primatives.

Revision 1.1.2.8: download - view: text, markup, annotated - select for diffs
Fri Mar 22 03:51:42 2002 UTC (22 years, 8 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.7: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.7: +8 -8 lines
Use a regular simplelock_t for the turnstile chain lock.

Revision 1.1.2.7: download - view: text, markup, annotated - select for diffs
Sat Mar 16 20:57:42 2002 UTC (22 years, 9 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.6: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.6: +36 -10 lines
Add a "nextproc" argument to turnstile_wakeup() to selectively
wake up a single thread.  This will allow us to implement direct
handoff of rwlocks.

Revision 1.1.2.6: download - view: text, markup, annotated - select for diffs
Sat Mar 16 03:46:38 2002 UTC (22 years, 9 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.5: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.5: +35 -18 lines
Make turnstiles actually have two queues (reader and writer).  Users
of turnsitles still don't differentiate between them.

Revision 1.1.2.5: download - view: text, markup, annotated - select for diffs
Mon Mar 11 00:44:31 2002 UTC (22 years, 9 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.4: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.4: +3 -3 lines
Use <sys/simplelock.h> rather than <sys/lock.h>.

Revision 1.1.2.4: download - view: text, markup, annotated - select for diffs
Sun Mar 10 21:33:10 2002 UTC (22 years, 9 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.3: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.3: +4 -4 lines
Pass a "pri" argument to turnstile_block(), like we do to ltsleep().
This allows the caller of turnstile_block() to decide what to do about
priority and PCATCH (though we still don't handle PCATCH in turnstiles).

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

Revision 1.1.2.2: download - view: text, markup, annotated - select for diffs
Sun Mar 10 20:05:31 2002 UTC (22 years, 9 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.1: +4 -3 lines
TURNSTILE_CHAIN_UNLOCK(): Don't reference tc_oldspl after releasing
tc_lock.  From Bill Sommerfeld.

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

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

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

Revision 1.1
Sun Mar 10 19:08:24 2002 UTC (22 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, thorpej-vnode-attr-base, thorpej-vnode-attr, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, rpaulo-netinet-merge-pcb-base, rpaulo-netinet-merge-pcb, newlock2-nbase, newlock2-base, nathanw_sa_before_merge, nathanw_sa_base, ktrace-lwp-base, ktrace-lwp, kqueue-base, kent-audio2-base, kent-audio2, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, gehenna-devsw, gdamore-uart-base, gdamore-uart, elad-kernelauth-nbase, eeh-devprop-base, eeh-devprop
Branch point for: yamt-lazymbuf, newlock2, newlock
FILE REMOVED
file kern_turnstile.c was initially added on branch newlock.

Diff request

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

Log view options

CVSweb <webmaster@jp.NetBSD.org>