The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.76: download - view: text, markup, annotated - select for diffs
Sun Oct 15 10:28:48 2023 UTC (18 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.75: preferred, colored
Changes since revision 1.75: +9 -8 lines
kern_rwlock.c: Sort includes.  No functional change intended.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Sun Oct 15 10:27:11 2023 UTC (18 months, 3 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +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.74: download - view: text, markup, annotated - select for diffs
Wed Oct 4 20:39:35 2023 UTC (19 months, 1 week ago) by ad
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -3 lines
Turnstiles: use the syncobj name for ps/top wmesg when sleeping since it's
more informative than "tstile".

Revision 1.73: download - view: text, markup, annotated - select for diffs
Sat Sep 23 18:48:04 2023 UTC (19 months, 2 weeks ago) by ad
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +8 -3 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.72: download - view: text, markup, annotated - select for diffs
Thu Sep 7 20:05:42 2023 UTC (20 months ago) by ad
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -29 lines
Remove dodgy and unused mutex_owner_running() & rw_owner_running().

Revision 1.46.6.4: download - view: text, markup, annotated - select for diffs
Mon Jul 31 14:49:37 2023 UTC (21 months, 1 week ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE
Diff to: previous 1.46.6.3: preferred, colored; branchpoint 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46.6.3: +4 -5 lines
Pull up following revision(s) (requested by riastradh in ticket #1861):

	sys/kern/kern_rwlock.c: revision 1.68 (patch)

rwlock(9): Fix membars.

rw_downgrade must be a release operation, and rw_tryupgrade must be
an acquire operation.  membar_producer is not enough -- need to use
membar_release and membar_acquire.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/22/msg028726.html

Revision 1.54.2.2: download - view: text, markup, annotated - select for diffs
Mon Jul 31 14:48:07 2023 UTC (21 months, 1 week ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE
Diff to: previous 1.54.2.1: preferred, colored; branchpoint 1.54: preferred, colored; next MAIN 1.55: preferred, colored
Changes since revision 1.54.2.1: +4 -5 lines
Pull up following revision(s) (requested by riastradh in ticket #1678):

	sys/kern/kern_rwlock.c: revision 1.68 (patch)

rwlock(9): Fix membars.

rw_downgrade must be a release operation, and rw_tryupgrade must be
an acquire operation.  membar_producer is not enough -- need to use
membar_release and membar_acquire.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/22/msg028726.html

Revision 1.66.4.2: download - view: text, markup, annotated - select for diffs
Mon Jul 31 14:45:59 2023 UTC (21 months, 1 week ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Diff to: previous 1.66.4.1: preferred, colored; branchpoint 1.66: preferred, colored; next MAIN 1.67: preferred, colored
Changes since revision 1.66.4.1: +4 -6 lines
Pull up following revision(s) (requested by riastradh in ticket #266):

	sys/kern/kern_rwlock.c: revision 1.68

rwlock(9): Fix membars.

rw_downgrade must be a release operation, and rw_tryupgrade must be
an acquire operation.  membar_producer is not enough -- need to use
membar_release and membar_acquire.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/22/msg028726.html

Revision 1.46.6.3: download - view: text, markup, annotated - select for diffs
Mon Jul 31 14:42:45 2023 UTC (21 months, 1 week ago) by martin
Branches: netbsd-8
Diff to: previous 1.46.6.2: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.6.2: +4 -4 lines
Pull up following revision(s) (requested by riastradh in ticket #1860):

	sys/kern/kern_rwlock.c: revision 1.67
	sys/kern/kern_lock.c: revision 1.182
	sys/kern/kern_mutex.c: revision 1.102
	(all via patch)

Sprinkle __predict_{true,false} for panicstr checks

Revision 1.54.2.1: download - view: text, markup, annotated - select for diffs
Mon Jul 31 14:40:04 2023 UTC (21 months, 1 week ago) by martin
Branches: netbsd-9
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +4 -4 lines
Pull up following revision(s) (requested by riastradh in ticket #1677):

	sys/kern/kern_rwlock.c: revision 1.67
	sys/kern/kern_lock.c: revision 1.182
	sys/kern/kern_mutex.c: revision 1.102

Sprinkle __predict_{true,false} for panicstr checks

Revision 1.66.4.1: download - view: text, markup, annotated - select for diffs
Mon Jul 31 14:38:25 2023 UTC (21 months, 1 week ago) by martin
Branches: netbsd-10
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +4 -4 lines
Pull up following revision(s) (requested by riastradh in ticket #265):

	sys/kern/kern_rwlock.c: revision 1.67
	sys/kern/kern_lock.c: revision 1.182
	sys/kern/kern_mutex.c: revision 1.102

Sprinkle __predict_{true,false} for panicstr checks

Revision 1.71: download - view: text, markup, annotated - select for diffs
Mon Jul 17 12:54:29 2023 UTC (21 months, 3 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +3 -2 lines
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.70: download - view: text, markup, annotated - select for diffs
Fri Feb 24 11:11:10 2023 UTC (2 years, 2 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +7 -14 lines
rwlock(9): Omit needless macro indirection for membars.

No functional change intended.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Fri Feb 24 11:02:27 2023 UTC (2 years, 2 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +2 -7 lines
kern: Eliminate most __HAVE_ATOMIC_AS_MEMBAR conditionals.

I'm leaving in the conditional around the legacy membar_enters
(store-before-load, store-before-store) in kern_mutex.c and in
kern_lock.c because they may still matter: store-before-load barriers
tend to be the most expensive kind, so eliding them is probably
worthwhile on x86.  (It also may not matter; I just don't care to do
measurements right now, and it's a single valid and potentially
justifiable use case in the whole tree.)

However, membar_release/acquire can be mere instruction barriers on
all TSO platforms including x86, so there's no need to go out of our
way with a bad API to conditionalize them.  If the procedure call
overhead is measurable we just could change them to be macros on x86
that expand into __insn_barrier.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html

Revision 1.68: download - view: text, markup, annotated - select for diffs
Fri Feb 24 11:01:43 2023 UTC (2 years, 2 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +4 -6 lines
rwlock(9): Fix membars.

rw_downgrade must be a release operation, and rw_tryupgrade must be
an acquire operation.  membar_producer is not enough -- need to use
membar_release and membar_acquire.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/22/msg028726.html

XXX pullup-8
XXX pullup-9
XXX pullup-10

Revision 1.67: download - view: text, markup, annotated - select for diffs
Fri Jan 27 09:28:41 2023 UTC (2 years, 3 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +4 -4 lines
Sprinkle __predict_{true,false} for panicstr checks

Revision 1.66: download - view: text, markup, annotated - select for diffs
Sat Apr 9 23:46:19 2022 UTC (3 years, 1 month ago) by riastradh
Branches: MAIN
CVS tags: netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +10 -9 lines
rwlock(9): Convert to membar_acquire/release.

Leave an XXX comment where I suspect there might be a missing membar
-- to be audited when I have more time to think!

Revision 1.50.4.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:51 2020 UTC (5 years, 1 month ago) by martin
Branches: phil-wifi
Diff to: previous 1.50.4.1: preferred, colored; branchpoint 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50.4.1: +212 -155 lines
Merge changes from current as of 20200406

Revision 1.59.2.7: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:03 2020 UTC (5 years, 2 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.59.2.6: preferred, colored; branchpoint 1.59: preferred, colored; next MAIN 1.60: preferred, colored
Changes since revision 1.59.2.6: +17 -2 lines
Sync with head.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Sat Feb 22 21:24:45 2020 UTC (5 years, 2 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, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +17 -2 lines
Add rw_lock_op(): return either RW_READER or RW_WRITER for a lock that is
known to be held by the caller.  Panic if the lock is not held.

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

Revision 1.59.2.5: download - view: text, markup, annotated - select for diffs
Sat Jan 25 21:45:00 2020 UTC (5 years, 3 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.59.2.4: preferred, colored; branchpoint 1.59: preferred, colored
Changes since revision 1.59.2.4: +3 -31 lines
Remove unintentional differences to base.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Wed Jan 22 12:44:54 2020 UTC (5 years, 3 months ago) by ad
Branches: MAIN
CVS tags: ad-namecache-base2
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +8 -2 lines
Add a comment.

Revision 1.59.2.4: download - view: text, markup, annotated - select for diffs
Wed Jan 22 11:40:17 2020 UTC (5 years, 3 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.59.2.3: preferred, colored; branchpoint 1.59: preferred, colored
Changes since revision 1.59.2.3: +106 -307 lines
Back out previous.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Tue Jan 21 20:29:51 2020 UTC (5 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +25 -2 lines
Add a rw_owner_running() for the pagedaemon.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Mon Jan 20 18:48:15 2020 UTC (5 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +8 -3 lines
PR kern/54880: -current hangs in mountroot

- Don't set the RW_NODEBUG flag on init, since assembly stubs can't handle it.
- rw_downgrade(): fix a case where the RW_NODEBUG flag was lost.

Revision 1.59.2.3: download - view: text, markup, annotated - select for diffs
Sun Jan 19 21:08:29 2020 UTC (5 years, 3 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.59.2.2: preferred, colored; branchpoint 1.59: preferred, colored
Changes since revision 1.59.2.2: +314 -85 lines
Adaptive rwlocks proposed on tech-kern and working well on this branch
with vnode locks.

Revision 1.59.2.2: download - view: text, markup, annotated - select for diffs
Sun Jan 19 19:44:34 2020 UTC (5 years, 3 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.59.2.1: preferred, colored; branchpoint 1.59: preferred, colored
Changes since revision 1.59.2.1: +134 -130 lines
Sync with head.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sun Jan 19 18:34:24 2020 UTC (5 years, 3 months ago) by ad
Branches: MAIN
CVS tags: ad-namecache-base1
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +134 -130 lines
Tidy rwlocks a bit, no functional change intended.  Mainly:

- rw_downgrade(): do it in a for () loop like all the others.
- Explicitly carry around RW_NODEBUG - don't be lazy.
- Remove pointless macros.
- Don't make assertions conditional on LOCKDEBUG, there's no reason.
- Make space for a new flag bit (not added yet).

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

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sun Jan 12 18:37:10 2020 UTC (5 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +11 -6 lines
- Shuffle some items around in struct lwp to save space.  Remove an unused
  item or two.

- For lockstat, get a useful callsite for vnode locks (caller to vn_lock()).

Revision 1.59: download - view: text, markup, annotated - select for diffs
Mon Dec 9 21:02:10 2019 UTC (5 years, 5 months ago) by ad
Branches: MAIN
CVS tags: ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +2 -15 lines
Expunge the panicstr checks, we don't need them.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat Nov 30 14:21:16 2019 UTC (5 years, 5 months ago) by ad
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +7 -7 lines
Back out previous.  It works on amd64 under stress test but not
evbarm-aarch64 for some reason.  Will revisit.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Fri Nov 29 20:50:54 2019 UTC (5 years, 5 months ago) by ad
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +9 -9 lines
A couple more tweaks to avoid reading the lock word.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Fri Nov 29 20:04:54 2019 UTC (5 years, 5 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +4 -2 lines
Largely eliminate the MD rwlock.h header file.

This was full of definitions that have been obsolete for over a
decade.  The file still remains for __HAVE_RW_STUBS but that's all.
Used only internally in kern_rwlock.c now, not by <sys/rwlock.h>.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Mon Nov 25 20:16:22 2019 UTC (5 years, 5 months ago) by ad
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +47 -37 lines
Remove some unneeded memory barriers and reads of the lock word.
Prodded by Mateusz Guzik.

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

Revision 1.54: download - view: text, markup, annotated - select for diffs
Thu May 9 05:00:31 2019 UTC (6 years ago) by ozaki-r
Branches: MAIN
CVS tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: netbsd-9
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +5 -5 lines
Avoid prepending a timestamp to lock debug outputs on ddb

Lock printer functions (lockops_t#lo_dump) use printf_nolog to print, but
printf_nolog now prepends a timestamp which is unnecessary for ddb:

    db{0}> show all locks/t
    [Locks tracked through LWPs]
    Locks held by an LWP (iperf):
    Lock 0 (initialized at soinit)
    lock address : 0xffffedeb84b06080 type     :     sleep/adaptive
    initialized  : 0xffffffff806d8c3f
    shared holds :                  0 exclusive:                  1
    shares wanted:                  0 exclusive:                 11
    current cpu  :                  0 last held:                  1
    current lwp  : 0xffffedeb849ff040 last held: 0xffffedeb7dfdb240
    last locked* : 0xffffffff806d8335 unlocked : 0xffffffff806d8385
    [ 79103.0868574] owner field  : 0xffffedeb7dfdb240 wait/spin:                1/0

Fix it by passing a printer function to lo_dump functions, i.e., make the
functions use db_printf on ddb.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Wed Apr 17 02:29:43 2019 UTC (6 years ago) by ozaki-r
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +3 -3 lines
Don't check pserialize_not_in_read_section after panic

It can cause a false positive assertion failure.

Revision 1.50.2.1: download - view: text, markup, annotated - select for diffs
Thu Sep 6 06:56:42 2018 UTC (6 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50: +6 -4 lines
Sync with HEAD

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

Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Aug 31 01:23:57 2018 UTC (6 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -4 lines
Sprinkle __predict_false to dedicated assertions of mutex and rwlock

Revision 1.51: download - view: text, markup, annotated - select for diffs
Tue Aug 14 01:09:53 2018 UTC (6 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +4 -2 lines
Check pserialize_not_in_read_section for adaptive mutexes and rwlocks

The overhead of the checks is not negligible so they're turned on only if both
DEBUG and LOCKDEBUG are enabled.

Revision 1.46.6.2: download - view: text, markup, annotated - select for diffs
Mon Apr 2 09:07:52 2018 UTC (7 years, 1 month ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Diff to: previous 1.46.6.1: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.6.1: +12 -5 lines
Pull up following revision(s) (requested by ozaki-r in ticket #687):
	sys/kern/kern_rwlock_obj.c: revision 1.4
	sys/rump/librump/rumpkern/locks.c: revision 1.80
	sys/kern/kern_rwlock.c: revision 1.50
	sys/arch/x86/x86/db_memrw.c: revision 1.5,1.6
	sys/ddb/db_command.c: revision 1.150-1.153
	share/man/man4/ddb.4: revision 1.175 (via patch),1.176-1.178
	sys/kern/kern_mutex_obj.c: revision 1.6
	sys/kern/subr_lockdebug.c: revision 1.61-1.64
	sys/sys/lockdebug.h: revision 1.17
	sys/kern/kern_mutex.c: revision 1.71
	sys/sys/lockdebug.h: revision 1.18,1.19
	sys/kern/subr_xcall.c: revision 1.26

Obtain proper initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc

Initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc
were not useful because the addresses were mutex_obj_alloc or rw_obj_alloc
itself. What we want to know are callers of them.

Spinkle ASSERT_SLEEPABLE to xcall functions

Use db_printf instead of printf in ddb

Add a new command, show lockstat, which shows statistics of locks
Currently the command shows the number of allocated locks.
The command is useful only if LOCKDEBUG is enabled.

Add a new command, show all locks, which shows information of active locks

The command shows information of all active (i.e., being held) locks that are
tracked through either of LWPs or CPUs by the LOCKDEBUG facility.  The /t
modifier additionally shows a backtrace for each LWP additionally.  This
feature is useful for debugging especially to analyze deadlocks.
The command is useful only if LOCKDEBUG is enabled.

Don't pass a unset address to lockdebug_lock_print

x86: avoid accessing invalid addresses in ddb like arm32
This avoids that a command stops in the middle of an execution if
a fault occurs due to an access to an invalid address.

Get rid of a redundant output

Improve wording. Fix a Cm argument.

ddb: rename "show lockstat" to "show lockstats" to avoid conflicting with lockstat(8)
Requested by mrg@

Revision 1.50: download - view: text, markup, annotated - select for diffs
Mon Feb 5 04:25:04 2018 UTC (7 years, 3 months ago) by ozaki-r
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-base, 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
Branch point for: phil-wifi, pgoyette-compat
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +12 -5 lines
Obtain proper initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc

Initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc
were not useful because the addresses were mutex_obj_alloc or rw_obj_alloc
itself. What we want to know are callers of them.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Tue Jan 30 07:52:22 2018 UTC (7 years, 3 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +7 -7 lines
Apply C99-style struct initialization to syncobj_t

Revision 1.46.6.1: download - view: text, markup, annotated - select for diffs
Sat Jan 13 21:57:11 2018 UTC (7 years, 3 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +5 -5 lines
Pull up following revision(s) (requested by ozaki-r in ticket #495):
	lib/librumpuser/rumpfiber.c: revision 1.13
	lib/librumpuser/rumpuser_pth.c: revision 1.46
	lib/librumpuser/rumpuser_pth_dummy.c: revision 1.18
	sys/kern/kern_condvar.c: revision 1.40
	sys/kern/kern_lock.c: revision 1.161
	sys/kern/kern_mutex.c: revision 1.68
	sys/kern/kern_rwlock.c: revision 1.48
	sys/rump/include/rump/rumpuser.h: revision 1.115
	sys/rump/librump/rumpkern/locks.c: revision 1.76-1.79
Apply C99-style struct initialization to lockops_t
--
Tweak LOCKDEBUG macros (NFC)
--
Distinguish spin mutex and adaptive mutex on rump kernels for LOCKDEBUG
Formerly rump kernels treated the two types of mutexes as both adaptive for
LOCKDEBUG for some reasons.
Now we can detect violations of mutex restrictions on rump kernels such as
taking an adaptive mutex with holding a spin mutex as well as normal kernels.
--
rump: check if the mutex is surely owned by the caller in mutex_exit
Unlocking a not-owned mutex wasn't detected well (it could detect if the mutex
is not held by anyone but that's not enough). Let's check it (the check is the
same as normal kernel's mutex).
If LOCKDEBUG is enabled, give the check over LOCKDEBUG because it can provide
better debugging information.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Mon Dec 25 09:13:40 2017 UTC (7 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +5 -5 lines
Apply C99-style struct initialization to lockops_t

Revision 1.38.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:38:44 2017 UTC (7 years, 5 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.38.2.3: preferred, colored; branchpoint 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38.2.3: +32 -31 lines
update from HEAD

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sat Sep 16 23:55:33 2017 UTC (7 years, 7 months ago) by christos
Branches: MAIN
CVS tags: tls-maxphys-base-20171202
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +5 -5 lines
more const

Revision 1.45.6.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:02 2017 UTC (8 years ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45: +9 -8 lines
Sync with HEAD

Revision 1.45.4.1: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:47 2017 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45: +9 -8 lines
Sync with HEAD

Revision 1.45.2.1: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:56 2017 UTC (8 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45: +9 -8 lines
Sync with HEAD

Revision 1.46: download - view: text, markup, annotated - select for diffs
Thu Jan 26 04:11:56 2017 UTC (8 years, 3 months ago) by christos
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +9 -8 lines
For LOCKDEBUG:
Always provide the location of the caller of the lock as __func__, __LINE__.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Fri Nov 28 08:28:17 2014 UTC (10 years, 5 months ago) by uebayasi
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, nick-nhusb, bouyer-socketcan
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +3 -3 lines
Consistently use KPREEMPT_*() here.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Fri Sep 5 05:57:21 2014 UTC (10 years, 8 months ago) by matt
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +23 -23 lines
Don't next structure and enum definitions.
Don't use C++ keywords new, try, class, private, etc.

Revision 1.38.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:29 2014 UTC (10 years, 8 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.38.2.2: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.2.2: +6 -2 lines
Rebase to HEAD as of a few days ago.

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

Revision 1.43: download - view: text, markup, annotated - select for diffs
Wed Jul 30 07:44:00 2014 UTC (10 years, 9 months ago) by ozaki-r
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +3 -3 lines
Fix typo in comment

Revision 1.37.4.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:03 2014 UTC (10 years, 11 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.37.4.2: preferred, colored; branchpoint 1.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37.4.2: +14 -10 lines
sync with head.

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

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

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

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sat Oct 19 21:01:39 2013 UTC (11 years, 6 months ago) by mrg
Branches: MAIN
CVS tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +6 -2 lines
use __USE() where appropriate.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Wed Sep 4 10:16:16 2013 UTC (11 years, 8 months ago) by skrll
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -3 lines
Typo in comment.

Revision 1.38.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:18:58 2013 UTC (11 years, 10 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.38.2.1: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.2.1: +9 -9 lines
resync from head

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sat Apr 27 08:12:35 2013 UTC (12 years ago) by mlelstv
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +9 -9 lines
Revert change that allowed rw_tryenter(&lock, RW_READER) to recurse
for vfs_busy(). This is no longer necessary.

Revision 1.38.2.1: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:29:51 2013 UTC (12 years, 2 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +4 -2 lines
resync with head

Revision 1.37.4.2: download - view: text, markup, annotated - select for diffs
Wed Jan 16 05:33:44 2013 UTC (12 years, 3 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.37.4.1: preferred, colored; branchpoint 1.37: preferred, colored
Changes since revision 1.37.4.1: +4 -2 lines
sync with (a bit old) head

Revision 1.39: download - view: text, markup, annotated - select for diffs
Wed Dec 12 14:53:01 2012 UTC (12 years, 5 months ago) by yamt
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, agc-symver-base, agc-symver
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +4 -2 lines
rw_vector_enter: reload owner in the case of no hand-off.
this fixes crashes in rw_oncpu().

Revision 1.37.4.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:26 2012 UTC (13 years ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +4 -4 lines
sync with head

Revision 1.37.8.1: download - view: text, markup, annotated - select for diffs
Sun Mar 4 00:46:31 2012 UTC (13 years, 2 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37: +4 -4 lines
sync to latest -current.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sat Feb 25 22:32:44 2012 UTC (13 years, 2 months ago) by rmind
Branches: MAIN
CVS tags: yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +4 -4 lines
{mutex,rw}_vector_enter: use macro versions to disable/enable preemption.

Revision 1.36.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:09:31 2011 UTC (13 years, 11 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36: +36 -39 lines
Sync with HEAD.

Revision 1.36.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 21 01:42:08 2011 UTC (14 years ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36: +36 -39 lines
sync with head

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sun Mar 20 23:19:16 2011 UTC (14 years, 1 month ago) by rmind
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, 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-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache, jmcneill-usbmp
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +36 -39 lines
Optimise mutex_onproc() and rw_onproc() by making them O(1), instead
of O(ncpu) for adaptive paths.  Add an LWP destructor, lwp_dtor() with
a comment describing the principle of this barrier.

Reviewed by yamt@ and ad@.

Revision 1.28.10.2.2.2: download - view: text, markup, annotated - select for diffs
Sat Feb 5 06:00:14 2011 UTC (14 years, 3 months ago) by cliff
Branches: matt-nb5-mips64
Diff to: previous 1.28.10.2.2.1: preferred, colored; branchpoint 1.28.10.2: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.10.2.2.1: +4 -2 lines
- include opt_multiprocessor.h for explicit MULTIPROCESSOR dependency

Revision 1.35.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:44:10 2010 UTC (15 years ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.35: preferred, colored; next MAIN 1.36: preferred, colored
Changes since revision 1.35: +6 -6 lines
Sync with HEAD.

Revision 1.28.10.2.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:28:17 2010 UTC (15 years ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.28.10.2: preferred, colored
Changes since revision 1.28.10.2: +2 -2 lines
sync to netbsd-5

Revision 1.21.2.4: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:17 2010 UTC (15 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.21.2.3: preferred, colored; branchpoint 1.21: preferred, colored; next MAIN 1.22: preferred, colored
Changes since revision 1.21.2.3: +6 -103 lines
sync with head

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Feb 8 09:54:27 2010 UTC (15 years, 3 months ago) by skrll
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, 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.35: preferred, colored
Changes since revision 1.35: +6 -6 lines
Re-apply:

	Invert the sense of the bit to mark if LOCKDEBUG is enabled to
	disabled.

	This will help my fellow developers spot "use before initialised"
	problems that hppa picks up very well.

but fix the !LOCKDEBUG case by defining the "no debug" bits to zero so
they have no effect on lock stubs.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Feb 6 04:50:19 2010 UTC (15 years, 3 months ago) by cube
Branches: MAIN
CVS tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +6 -6 lines
Revert commit from Fri Feb  5 06:43:17 UTC 2010 by skrll:

      Invert the sense of the bit to mark if LOCKDEBUG is enabled to disabled.

      This will help my fellow developers spot "use before initialised" problems
      that hppa picks up very well.

It has to be done differently, because the semantics of mtx_owner in the non-
LOCKDEBUG case can vary significantly between archs, and thus it is not
possible to simply flip a bit to 1.

Ok core@, as at least i386 is unbootable right now.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Feb 5 06:43:16 2010 UTC (15 years, 3 months ago) by skrll
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +6 -6 lines
Invert the sense of the bit to mark if LOCKDEBUG is enabled to disabled.

This will help my fellow developers spot "use before initialised" problems
that hppa picks up very well.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Wed Nov 4 13:29:45 2009 UTC (15 years, 6 months ago) by pooka
Branches: MAIN
CVS tags: matt-premerge-20091211
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -99 lines
Heave-ho mutex/rwlock object routines into separate modules -- they
don't have anything to do with the lock internals.

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

Revision 1.28.10.2: download - view: text, markup, annotated - select for diffs
Wed Jul 1 22:32:58 2009 UTC (15 years, 10 months ago) by snj
Branches: netbsd-5-0
CVS tags: netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Diff to: previous 1.28.10.1: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.10.1: +5 -3 lines
Pull up following revision(s) (requested by rmind in ticket #837):
	sys/kern/kern_rwlock.c: revision 1.31
lockdebug fixes for rw_tryupgrade/rw_downgrade.

Revision 1.28.4.2: download - view: text, markup, annotated - select for diffs
Wed Jul 1 22:32:42 2009 UTC (15 years, 10 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.28.4.1: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.4.1: +5 -3 lines
Pull up following revision(s) (requested by rmind in ticket #837):
	sys/kern/kern_rwlock.c: revision 1.31
lockdebug fixes for rw_tryupgrade/rw_downgrade.

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

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sat May 16 08:36:32 2009 UTC (15 years, 11 months ago) by yamt
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, jymxensuspend-base, jym-xensuspend-nbase
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -3 lines
rw_vector_exit: remove a redundant condition.

Revision 1.28.8.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:21:56 2009 UTC (16 years ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +107 -19 lines
Sync with HEAD.

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

Revision 1.28.4.1: download - view: text, markup, annotated - select for diffs
Wed May 13 00:33:32 2009 UTC (16 years ago) by snj
Branches: netbsd-5
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +6 -17 lines
Pull up following revision(s) (requested by ad in ticket #725):
	sys/kern/kern_rwlock.c: revision 1.30
A workaround for a bug with some Opteron revisions where locked operations
sometimes do not serve as memory barriers, allowing memory references to
bleed outside of critical sections.  It is possible that this is the
reason for pkgbuild's longstanding crashiness.
For rwlocks, always enable the explicit membars. They were disabled only
on x86, and since they are not in the fast-path it's not a big deal.
TODO: convert these to an atomic_membar_foo() or similar that does ordering
between regular data references and atomic references.

Revision 1.28.10.1: download - view: text, markup, annotated - select for diffs
Wed May 13 00:24:48 2009 UTC (16 years ago) by snj
Branches: netbsd-5-0
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +6 -17 lines
Pull up following revision(s) (requested by ad in ticket #725):
	sys/kern/kern_rwlock.c: revision 1.30
A workaround for a bug with some Opteron revisions where locked operations
sometimes do not serve as memory barriers, allowing memory references to
bleed outside of critical sections.  It's possible that this is the
reason for pkgbuild's longstanding crashiness.
For rwlocks, always enable the explicit membars. They were disabled only
on x86, and since they are not in the fast-path it's not a big deal.
TODO: convert these to an atomic_membar_foo() or similar that does ordering
between regular data references and atomic references.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sat May 9 03:33:10 2009 UTC (16 years ago) by yamt
Branches: MAIN
CVS tags: jym-xensuspend-base
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +5 -3 lines
lockdebug fixes for rw_tryupgrade/rw_downgrade.

Revision 1.21.2.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:13:47 2009 UTC (16 years ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.21.2.1: preferred, colored; branchpoint 1.21: preferred, colored
Changes since revision 1.21.2.1: +110 -29 lines
sync with head.

Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:36:59 2009 UTC (16 years ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28: +104 -18 lines
Sync with HEAD.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri Apr 24 17:53:06 2009 UTC (16 years ago) by ad
Branches: MAIN
CVS tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +6 -17 lines
A workaround for a bug with some Opteron revisions where locked operations
sometimes do not serve as memory barriers, allowing memory references to
bleed outside of critical sections.  It's possible that this is the
reason for pkgbuild's longstanding crashiness.

For rwlocks, always enable the explicit membars. They were disabled only
on x86, and since they are not in the fast-path it's not a big deal.
TODO: convert these to an atomic_membar_foo() or similar that does ordering
between regular data references and atomic references.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sun Apr 19 08:36:04 2009 UTC (16 years ago) by ad
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +100 -3 lines
Add rw_obj_*() functions to mirror the existing mutex functions.
Proposed on tech-kern quite some time ago.

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

Revision 1.18.6.2: download - view: text, markup, annotated - select for diffs
Sun Sep 28 10:40:52 2008 UTC (16 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.18.6.1: preferred, colored; branchpoint 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18.6.1: +3 -3 lines
Sync with HEAD.

Revision 1.23.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:31:42 2008 UTC (16 years, 7 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.23.2.1: preferred, colored; branchpoint 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23.2.1: +5 -5 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.26.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 31 04:51:02 2008 UTC (16 years, 9 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.26.2.1: preferred, colored; branchpoint 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26.2.1: +3 -3 lines
Sync with head.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Tue Jul 29 16:13:39 2008 UTC (16 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base, 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, mjf-devfs2-base, 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-0, netbsd-5, jym-xensuspend
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -3 lines
rw_vector_exit(): When doing direct hand-off to a writer, only set
RW_WRITE_WANTED if there are additional writers waiting.

Revision 1.26.2.1: download - view: text, markup, annotated - select for diffs
Fri Jul 18 16:37:49 2008 UTC (16 years, 9 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +4 -4 lines
Sync with head.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Jul 17 23:00:01 2008 UTC (16 years, 9 months ago) by rmind
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +4 -4 lines
PR/39155: Wolfgang Solfrank: Invalid parameter to turnstile_exit in rw_downgrade.

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

Revision 1.20.2.2: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:05:39 2008 UTC (16 years, 11 months ago) by yamt
Branches: yamt-pf42
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: +5 -10 lines
sync with head

Revision 1.18.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:09 2008 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +234 -174 lines
Sync with HEAD.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat May 31 13:31:25 2008 UTC (16 years, 11 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl, haad-dm
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -6 lines
Use __noinline.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat May 31 13:15:21 2008 UTC (16 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +4 -4 lines
LOCKDEBUG:

- Tweak it so it can also catch common errors with condition variables.
  The change to kern_condvar.c is not included in this commit and will
  come later.

- Don't call kmem_alloc() if operating in interrupt context, just fail
  the allocation and disable debugging for the object. Makes it safe
  to do mutex_init/rw_init/cv_init in interrupt context, when running
  a LOCKDEBUG kernel.

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

Revision 1.20.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:35:08 2008 UTC (16 years, 11 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +14 -18 lines
sync with head.

Revision 1.21.2.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:25:25 2008 UTC (17 years ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +8 -15 lines
sync with head.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue May 6 17:11:45 2008 UTC (17 years ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-base2, yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +8 -8 lines
Allow rw_tryenter(&lock, RW_READER) to recurse, for vfs_busy().

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

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Apr 22 14:46:35 2008 UTC (17 years ago) by ad
Branches: MAIN
CVS tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +8 -5 lines
mutex_owned, rw_read_held, rw_write_held, rw_lock_held: check for a NULL
pointer.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Apr 11 14:55:51 2008 UTC (17 years, 1 month ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +202 -163 lines
rwlock changes, discussed on tech-kern:

- Use atomic ops directly, since rwlocks work the same way on all platforms.
- Try to make it a bit more cache efficient, and use branch hints.
- Fix a bug in rw_downgrade() where the turnstile lock was not released.
- Remove a couple of redundant assertions.
- Use atomic_swap instead of atomic_cas where it's safe to do so.
- After acquiring the turnstile lock in rw_vector_enter, check if the
  owner is running again and spin if so.
- Introduce and use rw_onproc() instead of abusing mutex_onproc().
- Change the handoff/release algorithm to reduce the window when a rwlock
  can held, but the owner not on a CPU.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri Apr 4 17:25:09 2008 UTC (17 years, 1 month ago) by ad
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +33 -3 lines
Do adaptive spinning for rwlocks, but only if the lock is write held and
there are no waiters. This gives a major boost to build.sh on larger
systems as directory vnode locks are exclusive for lookup, but are often
only held for a very short period of time.

This change has the potential to more readily expose lock order reversals
and other types of deadlock.

Revision 1.8.8.3: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:04:59 2008 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
Diff to: previous 1.8.8.2: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.8.2: +9 -7 lines
sync with HEAD

Revision 1.11.4.2: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:06:46 2008 UTC (17 years, 2 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.11.4.1: preferred, colored; branchpoint 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11.4.1: +11 -7 lines
Sync with HEAD.

Revision 1.1.18.6: download - view: text, markup, annotated - select for diffs
Mon Feb 4 09:24:14 2008 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.18.5: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.18.5: +9 -7 lines
sync with head.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Jan 28 19:58:32 2008 UTC (17 years, 3 months ago) by ad
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: mjf-devfs2
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -3 lines
Fix error in previous. Spotted by yamt@.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat Jan 26 14:13:37 2008 UTC (17 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +4 -3 lines
rw_write_held: return true only if held by the current LWP.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Jan 25 19:02:31 2008 UTC (17 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +7 -6 lines
- Prevent LOCKDEBUG from complaining if we do rw_tryenter() on a lock
  that we already own.
- Add an assembly stub for rw_tryenter().

Revision 1.1.18.5: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:46:11 2008 UTC (17 years, 3 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: +4 -2 lines
sync with head

Revision 1.8.8.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:56:08 2008 UTC (17 years, 4 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.8.8.1: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.8.1: +32 -16 lines
sync with HEAD

Revision 1.13.4.1: download - view: text, markup, annotated - select for diffs
Tue Jan 8 22:11:35 2008 UTC (17 years, 4 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: +4 -2 lines
Sync with HEAD

Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Jan 4 21:54:49 2008 UTC (17 years, 4 months ago) by ad
Branches: MAIN
CVS tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -2 lines
Need sys/lock.h for kernel_lock.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Jan 4 21:52:48 2008 UTC (17 years, 4 months ago) by ad
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -2 lines
Pull in sys/atomic.h for memory barriers.

Revision 1.8.6.4: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:38:19 2007 UTC (17 years, 5 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.8.6.3: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.6.3: +3 -2 lines
Sync with HEAD.

Revision 1.11.4.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:20:31 2007 UTC (17 years, 5 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +30 -16 lines
Sync with HEAD.

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

Revision 1.1.18.4: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:32:47 2007 UTC (17 years, 5 months 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: +30 -16 lines
sync with head

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Dec 4 09:13:59 2007 UTC (17 years, 5 months 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 -2 lines
rw_vector_enter: assert !cpu_intr_p().

Revision 1.8.6.3: download - view: text, markup, annotated - select for diffs
Wed Nov 21 21:56:00 2007 UTC (17 years, 5 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.8.6.2: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.6.2: +29 -16 lines
Sync with HEAD.

Revision 1.11.2.1: download - view: text, markup, annotated - select for diffs
Wed Nov 21 21:19:45 2007 UTC (17 years, 5 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11: +29 -16 lines
Sync with HEAD

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Nov 21 10:19:10 2007 UTC (17 years, 5 months ago) by yamt
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: +29 -16 lines
make kmutex_t and krwlock_t smaller by killing lock id.
ok'ed by Andrew Doran.

Revision 1.8.8.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:31:54 2007 UTC (17 years, 6 months ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +32 -28 lines
sync with HEAD

Revision 1.1.18.3: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:35:26 2007 UTC (17 years, 6 months 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: +32 -28 lines
sync with head.

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

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

Revision 1.10.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 14 11:48:42 2007 UTC (17 years, 7 months ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +30 -26 lines
sync with head.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Oct 11 19:45:25 2007 UTC (17 years, 7 months ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base
Branch point for: mjf-devfs, bouyer-xenamd64
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +30 -26 lines
Merge from vmlocking:

- G/C spinlockmgr() and simple_lock debugging.
- Always include the kernel_lock functions, for LKMs.
- Slightly improved subr_lockdebug code.
- Keep sizeof(struct lock) the same if LOCKDEBUG.

Revision 1.6.2.7: download - view: text, markup, annotated - select for diffs
Tue Oct 9 13:44:28 2007 UTC (17 years, 7 months ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.6: preferred, colored; branchpoint 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.2.6: +5 -5 lines
Sync with head.

Revision 1.8.6.1: download - view: text, markup, annotated - select for diffs
Tue Oct 2 18:29:01 2007 UTC (17 years, 7 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +5 -5 lines
Sync with HEAD.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Sep 21 19:14:12 2007 UTC (17 years, 7 months ago) by dsl
Branches: MAIN
CVS tags: yamt-x86pmap-base2, yamt-x86pmap-base
Branch point for: yamt-x86pmap
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +4 -4 lines
Include sys/cdefs.h first.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Sep 17 21:33:34 2007 UTC (17 years, 7 months ago) by ad
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -3 lines
__FUNCTION__ -> __func__

Revision 1.1.18.2: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:40:54 2007 UTC (17 years, 8 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: +37 -14 lines
sync with head.

Revision 1.6.2.6: download - view: text, markup, annotated - select for diffs
Mon Aug 20 18:08:55 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.5: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.5: +4 -3 lines
Track where locks were initialized.

Revision 1.6.2.5: download - view: text, markup, annotated - select for diffs
Sun Jul 29 11:43:23 2007 UTC (17 years, 9 months ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.4: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.4: +27 -22 lines
Simplify the code a bit.

Revision 1.6.2.4: download - view: text, markup, annotated - select for diffs
Sun Jul 15 22:17:08 2007 UTC (17 years, 10 months ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.3: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.3: +4 -4 lines
KASSERT(!cpu_intr_p()) in a couple of places.

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

Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu May 17 14:51:40 2007 UTC (17 years, 11 months ago) by yamt
Branches: MAIN
CVS tags: 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: matt-armv6, jmcneill-pm
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -3 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.4: download - view: text, markup, annotated - select for diffs
Thu Apr 19 04:19:43 2007 UTC (18 years ago) by ad
Branches: yamt-idlelwp
Diff to: previous 1.3.2.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.2.3: +2 -3 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.7.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 06:47:31 2007 UTC (18 years ago) by thorpej
Branches: thorpej-atomic
Diff to: previous 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7: +8 -2 lines
In the simple case, provide a generic CAS macro if the MD header does
not provide one.

Revision 1.3.2.3: download - view: text, markup, annotated - select for diffs
Sun Apr 15 16:03:50 2007 UTC (18 years, 1 month ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.3.2.2: preferred, colored
Changes since revision 1.3.2.2: +9 -12 lines
sync with head.

Revision 1.6.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 10 18:34:04 2007 UTC (18 years, 1 month ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.2: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.2: +2 -3 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 (18 years, 1 month ago) by ad
Branches: vmlocking
Diff to: previous 1.6.2.1: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.1: +9 -14 lines
Sync with head.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Mar 30 11:06:58 2007 UTC (18 years, 1 month ago) by ad
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base
Branch point for: thorpej-atomic
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +9 -12 lines
Cosmetic changes.

Revision 1.6.2.1: download - view: text, markup, annotated - select for diffs
Wed Mar 21 20:10:21 2007 UTC (18 years, 1 month ago) by ad
Branches: vmlocking
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -3 lines
GC the simplelock/spinlock debugging stuff.

Revision 1.3.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:58:37 2007 UTC (18 years, 2 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.3.2.1: preferred, colored
Changes since revision 1.3.2.1: +4 -4 lines
Sync with HEAD.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Mar 3 10:08:19 2007 UTC (18 years, 2 months ago) by itohy
Branches: MAIN
CVS tags: reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +4 -4 lines
Remove extra space so that symbol renaming works properly.

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

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Feb 26 19:06:10 2007 UTC (18 years, 2 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: +8 -2 lines
Add a comment.

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

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

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat Feb 10 21:07:52 2007 UTC (18 years, 3 months ago) by ad
Branches: MAIN
Branch point for: yamt-idlelwp
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +6 -8 lines
- Add/correct comments.
- Print correct function name when an assertion triggers.

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

Revision 1.1.36.10: download - view: text, markup, annotated - select for diffs
Fri Feb 9 19:58:10 2007 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.9: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.36.9: +3 -3 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.9: download - view: text, markup, annotated - select for diffs
Tue Feb 6 17:27:30 2007 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.8: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.8: +11 -6 lines
lockstat:

- Cache enabled/disabled status on entry.
- Don't read the cycle counter unless enabled.

Revision 1.1.36.8: download - view: text, markup, annotated - select for diffs
Mon Feb 5 13:03:57 2007 UTC (18 years, 3 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: +101 -47 lines
- Decouple downgrade from rw_vector_exit(), and simplify a bit.
- Fix a problem that could cause stalls under load.

Revision 1.1.36.7: download - view: text, markup, annotated - select for diffs
Wed Jan 31 13:09:11 2007 UTC (18 years, 3 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: +13 -10 lines
Catch deadlocks earlier.

Revision 1.1.36.6: download - view: text, markup, annotated - select for diffs
Thu Jan 11 22:22:59 2007 UTC (18 years, 4 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: +28 -41 lines
Checkpoint work in progress.

Revision 1.1.36.5: download - view: text, markup, annotated - select for diffs
Fri Dec 29 20:27:44 2006 UTC (18 years, 4 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: +73 -58 lines
Checkpoint work in progress.

Revision 1.1.36.4: download - view: text, markup, annotated - select for diffs
Fri Nov 17 16:34:36 2006 UTC (18 years, 5 months 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: +46 -14 lines
Checkpoint work in progress.

Revision 1.1.36.3: download - view: text, markup, annotated - select for diffs
Fri Oct 20 19:45:13 2006 UTC (18 years, 6 months 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: +45 -64 lines
- Update for lockdebug changes.
- Define mutex_getspl(), mutex_setspl() for modifying saved SPL value.

Revision 1.1.36.2: download - view: text, markup, annotated - select for diffs
Mon Sep 11 01:31:39 2006 UTC (18 years, 8 months 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: +4 -3 lines
Don't do the simplelock check if panicstr is set.

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

Revision 1.1.2.5: download - view: text, markup, annotated - select for diffs
Fri Mar 22 03:27:00 2002 UTC (23 years, 1 month ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.4: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.4: +60 -13 lines
Add some basic debugging infrastructure as found in mutexes.

Revision 1.1.2.4: download - view: text, markup, annotated - select for diffs
Sun Mar 17 20:18:56 2002 UTC (23 years, 2 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: +14 -20 lines
Change RWLOCK_ACQUIRE() and RWLOCK_RELEASE() to evaluate to true
or false depending on the success of the "compare and swap" operation.

This makes them a lot easier to implement on IA32.

Revision 1.1.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 16 20:57:42 2002 UTC (23 years, 2 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: +4 -4 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.2: download - view: text, markup, annotated - select for diffs
Sat Mar 16 03:46:38 2002 UTC (23 years, 2 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: +6 -4 lines
Make turnstiles actually have two queues (reader and writer).  Users
of turnsitles still don't differentiate between them.

Revision 1.1.2.1: download - view: text, markup, annotated - select for diffs
Thu Mar 14 17:11:03 2002 UTC (23 years, 2 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +462 -0 lines
Reader/writer lock implementation, modeled after the Solaris rwlocks,
a description of which can be found in:

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

XXX Does not currently distinguish between waiting readers and
    waiting writers.
XXX Because of above, does not yet implement direct-handoff.

Revision 1.1
Thu Mar 14 17:11:03 2002 UTC (23 years, 2 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, 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_rwlock.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>