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


Default branch: MAIN


Revision 1.76 / (download) - annotate - [select for diffs], Sun Oct 15 10:28:48 2023 UTC (6 months ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.75: +9 -8 lines
Diff to previous 1.75 (colored) to selected 1.60 (colored)

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

Revision 1.75 / (download) - annotate - [select for diffs], Sun Oct 15 10:27:11 2023 UTC (6 months ago) by riastradh
Branch: MAIN
Changes since 1.74: +3 -2 lines
Diff to previous 1.74 (colored) to selected 1.60 (colored)

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

Remove it in ddb/db_syncobj.h too.

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

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

Revision 1.74 / (download) - annotate - [select for diffs], Wed Oct 4 20:39:35 2023 UTC (6 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored) to selected 1.60 (colored)

Turnstiles: use the syncobj name for ps/top wmesg when sleeping since it's
more informative than "tstile".

Revision 1.73 / (download) - annotate - [select for diffs], Sat Sep 23 18:48:04 2023 UTC (6 months, 3 weeks ago) by ad
Branch: MAIN
Changes since 1.72: +8 -3 lines
Diff to previous 1.72 (colored) to selected 1.60 (colored)

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

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

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

Revision 1.72 / (download) - annotate - [select for diffs], Thu Sep 7 20:05:42 2023 UTC (7 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.71: +3 -29 lines
Diff to previous 1.71 (colored) to selected 1.60 (colored)

Remove dodgy and unused mutex_owner_running() & rw_owner_running().

Revision 1.46.6.4 / (download) - annotate - [select for diffs], Mon Jul 31 14:49:37 2023 UTC (8 months, 2 weeks ago) by martin
Branch: netbsd-8
Changes since 1.46.6.3: +4 -5 lines
Diff to previous 1.46.6.3 (colored) to branchpoint 1.46 (colored) next main 1.47 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Mon Jul 31 14:48:07 2023 UTC (8 months, 2 weeks ago) by martin
Branch: netbsd-9
Changes since 1.54.2.1: +4 -5 lines
Diff to previous 1.54.2.1 (colored) to branchpoint 1.54 (colored) next main 1.55 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Mon Jul 31 14:45:59 2023 UTC (8 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: 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
Changes since 1.66.4.1: +4 -6 lines
Diff to previous 1.66.4.1 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Mon Jul 31 14:42:45 2023 UTC (8 months, 2 weeks ago) by martin
Branch: netbsd-8
Changes since 1.46.6.2: +4 -4 lines
Diff to previous 1.46.6.2 (colored) to branchpoint 1.46 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Mon Jul 31 14:40:04 2023 UTC (8 months, 2 weeks ago) by martin
Branch: netbsd-9
Changes since 1.54: +4 -4 lines
Diff to previous 1.54 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Mon Jul 31 14:38:25 2023 UTC (8 months, 2 weeks ago) by martin
Branch: netbsd-10
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Mon Jul 17 12:54:29 2023 UTC (9 months ago) by riastradh
Branch: MAIN
Changes since 1.70: +3 -2 lines
Diff to previous 1.70 (colored) to selected 1.60 (colored)

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

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

Revision 1.70 / (download) - annotate - [select for diffs], Fri Feb 24 11:11:10 2023 UTC (13 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.69: +7 -14 lines
Diff to previous 1.69 (colored) to selected 1.60 (colored)

rwlock(9): Omit needless macro indirection for membars.

No functional change intended.

Revision 1.69 / (download) - annotate - [select for diffs], Fri Feb 24 11:02:27 2023 UTC (13 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.68: +2 -7 lines
Diff to previous 1.68 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Fri Feb 24 11:01:43 2023 UTC (13 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.67: +4 -6 lines
Diff to previous 1.67 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Fri Jan 27 09:28:41 2023 UTC (14 months, 2 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored) to selected 1.60 (colored)

Sprinkle __predict_{true,false} for panicstr checks

Revision 1.66 / (download) - annotate - [select for diffs], Sat Apr 9 23:46:19 2022 UTC (2 years ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.65: +10 -9 lines
Diff to previous 1.65 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Wed Apr 8 14:08:51 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.50.4.1: +212 -155 lines
Diff to previous 1.50.4.1 (colored) to branchpoint 1.50 (colored) next main 1.51 (colored) to selected 1.60 (colored)

Merge changes from current as of 20200406

Revision 1.59.2.7 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:03 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.59.2.6: +17 -2 lines
Diff to previous 1.59.2.6 (colored) to branchpoint 1.59 (colored) next main 1.60 (colored)

Sync with head.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Feb 22 21:24:45 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, 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
Changes since 1.64: +17 -2 lines
Diff to previous 1.64 (colored) to selected 1.60 (colored)

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

Sync with head.

Revision 1.59.2.5 / (download) - annotate - [select for diffs], Sat Jan 25 21:45:00 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.59.2.4: +3 -31 lines
Diff to previous 1.59.2.4 (colored) to branchpoint 1.59 (colored) to selected 1.60 (colored)

Remove unintentional differences to base.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Jan 22 12:44:54 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2
Changes since 1.63: +8 -2 lines
Diff to previous 1.63 (colored) to selected 1.60 (colored)

Add a comment.

Revision 1.59.2.4 / (download) - annotate - [select for diffs], Wed Jan 22 11:40:17 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.59.2.3: +106 -307 lines
Diff to previous 1.59.2.3 (colored) to branchpoint 1.59 (colored) to selected 1.60 (colored)

Back out previous.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Jan 21 20:29:51 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.62: +25 -2 lines
Diff to previous 1.62 (colored) to selected 1.60 (colored)

Add a rw_owner_running() for the pagedaemon.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Jan 20 18:48:15 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.61: +8 -3 lines
Diff to previous 1.61 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Sun Jan 19 21:08:29 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.59.2.2: +314 -85 lines
Diff to previous 1.59.2.2 (colored) to branchpoint 1.59 (colored) to selected 1.60 (colored)

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

Revision 1.59.2.2 / (download) - annotate - [select for diffs], Sun Jan 19 19:44:34 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.59.2.1: +134 -130 lines
Diff to previous 1.59.2.1 (colored) to branchpoint 1.59 (colored) to selected 1.60 (colored)

Sync with head.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Jan 19 18:34:24 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base1
Changes since 1.60: +134 -130 lines
Diff to previous 1.60 (colored)

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) - annotate - [select for diffs], Fri Jan 17 21:47:35 2020 UTC (4 years, 3 months ago) by ad
Branch: ad-namecache
Changes since 1.59: +11 -6 lines
Diff to previous 1.59 (colored) to selected 1.60 (colored)

Sync with head.

Revision 1.60 / (download) - annotate - [selected], Sun Jan 12 18:37:10 2020 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.59: +11 -6 lines
Diff to previous 1.59 (colored)

- 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) - annotate - [select for diffs], Mon Dec 9 21:02:10 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.58: +2 -15 lines
Diff to previous 1.58 (colored) to selected 1.60 (colored)

Expunge the panicstr checks, we don't need them.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Nov 30 14:21:16 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.57: +7 -7 lines
Diff to previous 1.57 (colored) to selected 1.60 (colored)

Back out previous.  It works on amd64 under stress test but not
evbarm-aarch64 for some reason.  Will revisit.

Revision 1.57 / (download) - annotate - [select for diffs], Fri Nov 29 20:50:54 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.56: +9 -9 lines
Diff to previous 1.56 (colored) to selected 1.60 (colored)

A couple more tweaks to avoid reading the lock word.

Revision 1.56 / (download) - annotate - [select for diffs], Fri Nov 29 20:04:54 2019 UTC (4 years, 4 months ago) by riastradh
Branch: MAIN
Changes since 1.55: +4 -2 lines
Diff to previous 1.55 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Mon Nov 25 20:16:22 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.54: +47 -37 lines
Diff to previous 1.54 (colored) to selected 1.60 (colored)

Remove some unneeded memory barriers and reads of the lock word.
Prodded by Mateusz Guzik.

Revision 1.50.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:03 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.50: +9 -7 lines
Diff to previous 1.50 (colored) to selected 1.60 (colored)

Sync with HEAD

Revision 1.54 / (download) - annotate - [select for diffs], Thu May 9 05:00:31 2019 UTC (4 years, 11 months ago) by ozaki-r
Branch: 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
Changes since 1.53: +5 -5 lines
Diff to previous 1.53 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Wed Apr 17 02:29:43 2019 UTC (5 years ago) by ozaki-r
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored) to selected 1.60 (colored)

Don't check pserialize_not_in_read_section after panic

It can cause a false positive assertion failure.

Revision 1.50.2.1 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:42 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.50: +6 -4 lines
Diff to previous 1.50 (colored) next main 1.51 (colored) to selected 1.60 (colored)

Sync with HEAD

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

Revision 1.52 / (download) - annotate - [select for diffs], Fri Aug 31 01:23:57 2018 UTC (5 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.51: +4 -4 lines
Diff to previous 1.51 (colored) to selected 1.60 (colored)

Sprinkle __predict_false to dedicated assertions of mutex and rwlock

Revision 1.51 / (download) - annotate - [select for diffs], Tue Aug 14 01:09:53 2018 UTC (5 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.50: +4 -2 lines
Diff to previous 1.50 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Mon Apr 2 09:07:52 2018 UTC (6 years ago) by martin
Branch: 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
Changes since 1.46.6.1: +12 -5 lines
Diff to previous 1.46.6.1 (colored) to branchpoint 1.46 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Mon Feb 5 04:25:04 2018 UTC (6 years, 2 months ago) by ozaki-r
Branch: 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
Changes since 1.49: +12 -5 lines
Diff to previous 1.49 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Tue Jan 30 07:52:22 2018 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.48: +7 -7 lines
Diff to previous 1.48 (colored) to selected 1.60 (colored)

Apply C99-style struct initialization to syncobj_t

Revision 1.46.6.1 / (download) - annotate - [select for diffs], Sat Jan 13 21:57:11 2018 UTC (6 years, 3 months ago) by snj
Branch: netbsd-8
Changes since 1.46: +5 -5 lines
Diff to previous 1.46 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Mon Dec 25 09:13:40 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.47: +5 -5 lines
Diff to previous 1.47 (colored) to selected 1.60 (colored)

Apply C99-style struct initialization to lockops_t

Revision 1.38.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:44 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.38.2.3: +32 -31 lines
Diff to previous 1.38.2.3 (colored) to branchpoint 1.38 (colored) next main 1.39 (colored) to selected 1.60 (colored)

update from HEAD

Revision 1.47 / (download) - annotate - [select for diffs], Sat Sep 16 23:55:33 2017 UTC (6 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.46: +5 -5 lines
Diff to previous 1.46 (colored) to selected 1.60 (colored)

more const

Revision 1.45.6.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:02 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.45: +9 -8 lines
Diff to previous 1.45 (colored) next main 1.46 (colored) to selected 1.60 (colored)

Sync with HEAD

Revision 1.45.4.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:47 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.45: +9 -8 lines
Diff to previous 1.45 (colored) next main 1.46 (colored) to selected 1.60 (colored)

Sync with HEAD

Revision 1.45.2.1 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:56 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.45: +9 -8 lines
Diff to previous 1.45 (colored) next main 1.46 (colored) to selected 1.60 (colored)

Sync with HEAD

Revision 1.46 / (download) - annotate - [select for diffs], Thu Jan 26 04:11:56 2017 UTC (7 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.45: +9 -8 lines
Diff to previous 1.45 (colored) to selected 1.60 (colored)

For LOCKDEBUG:
Always provide the location of the caller of the lock as __func__, __LINE__.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Nov 28 08:28:17 2014 UTC (9 years, 4 months ago) by uebayasi
Branch: 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
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored) to selected 1.60 (colored)

Consistently use KPREEMPT_*() here.

Revision 1.44 / (download) - annotate - [select for diffs], Fri Sep 5 05:57:21 2014 UTC (9 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.43: +23 -23 lines
Diff to previous 1.43 (colored) to selected 1.60 (colored)

Don't next structure and enum definitions.
Don't use C++ keywords new, try, class, private, etc.

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

Rebase to HEAD as of a few days ago.

Revision 1.42.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:55:58 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored) next main 1.43 (colored) to selected 1.60 (colored)

Rebase.

Revision 1.43 / (download) - annotate - [select for diffs], Wed Jul 30 07:44:00 2014 UTC (9 years, 8 months ago) by ozaki-r
Branch: 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
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored) to selected 1.60 (colored)

Fix typo in comment

Revision 1.37.4.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.37.4.2: +14 -10 lines
Diff to previous 1.37.4.2 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored) to selected 1.60 (colored)

sync with head.

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

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

Revision 1.40.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:07 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.40: +7 -3 lines
Diff to previous 1.40 (colored) next main 1.41 (colored) to selected 1.60 (colored)

sync with head

Revision 1.42 / (download) - annotate - [select for diffs], Sat Oct 19 21:01:39 2013 UTC (10 years, 6 months ago) by mrg
Branch: 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
Changes since 1.41: +6 -2 lines
Diff to previous 1.41 (colored) to selected 1.60 (colored)

use __USE() where appropriate.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Sep 4 10:16:16 2013 UTC (10 years, 7 months ago) by skrll
Branch: MAIN
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored) to selected 1.60 (colored)

Typo in comment.

Revision 1.38.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:18:58 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.38.2.1: +9 -9 lines
Diff to previous 1.38.2.1 (colored) to branchpoint 1.38 (colored) to selected 1.60 (colored)

resync from head

Revision 1.40 / (download) - annotate - [select for diffs], Sat Apr 27 08:12:35 2013 UTC (10 years, 11 months ago) by mlelstv
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Changes since 1.39: +9 -9 lines
Diff to previous 1.39 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Mon Feb 25 00:29:51 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.38: +4 -2 lines
Diff to previous 1.38 (colored) to selected 1.60 (colored)

resync with head

Revision 1.37.4.2 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:44 2013 UTC (11 years, 3 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.37.4.1: +4 -2 lines
Diff to previous 1.37.4.1 (colored) to branchpoint 1.37 (colored) to selected 1.60 (colored)

sync with (a bit old) head

Revision 1.39 / (download) - annotate - [select for diffs], Wed Dec 12 14:53:01 2012 UTC (11 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, agc-symver-base, agc-symver
Changes since 1.38: +4 -2 lines
Diff to previous 1.38 (colored) to selected 1.60 (colored)

rw_vector_enter: reload owner in the case of no hand-off.
this fixes crashes in rw_oncpu().

Revision 1.37.4.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:26 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored) to selected 1.60 (colored)

sync with head

Revision 1.37.8.1 / (download) - annotate - [select for diffs], Sun Mar 4 00:46:31 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored) next main 1.38 (colored) to selected 1.60 (colored)

sync to latest -current.

Revision 1.38 / (download) - annotate - [select for diffs], Sat Feb 25 22:32:44 2012 UTC (12 years, 1 month ago) by rmind
Branch: 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
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored) to selected 1.60 (colored)

{mutex,rw}_vector_enter: use macro versions to disable/enable preemption.

Revision 1.36.4.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:31 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.36: +36 -39 lines
Diff to previous 1.36 (colored) next main 1.37 (colored) to selected 1.60 (colored)

Sync with HEAD.

Revision 1.36.2.1 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:08 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.36: +36 -39 lines
Diff to previous 1.36 (colored) next main 1.37 (colored) to selected 1.60 (colored)

sync with head

Revision 1.37 / (download) - annotate - [select for diffs], Sun Mar 20 23:19:16 2011 UTC (13 years, 1 month ago) by rmind
Branch: 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
Changes since 1.36: +36 -39 lines
Diff to previous 1.36 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Sat Feb 5 06:00:14 2011 UTC (13 years, 2 months ago) by cliff
Branch: matt-nb5-mips64
Changes since 1.28.10.2.2.1: +4 -2 lines
Diff to previous 1.28.10.2.2.1 (colored) to branchpoint 1.28.10.2 (colored) next main 1.29 (colored) to selected 1.60 (colored)

- include opt_multiprocessor.h for explicit MULTIPROCESSOR dependency

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:10 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.35: +6 -6 lines
Diff to previous 1.35 (colored) next main 1.36 (colored) to selected 1.60 (colored)

Sync with HEAD.

Revision 1.28.10.2.2.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:28:17 2010 UTC (14 years ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.28.10.2: +2 -2 lines
Diff to previous 1.28.10.2 (colored) to selected 1.60 (colored)

sync to netbsd-5

Revision 1.21.2.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:17 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.21.2.3: +6 -103 lines
Diff to previous 1.21.2.3 (colored) to branchpoint 1.21 (colored) next main 1.22 (colored) to selected 1.60 (colored)

sync with head

Revision 1.36 / (download) - annotate - [select for diffs], Mon Feb 8 09:54:27 2010 UTC (14 years, 2 months ago) by skrll
Branch: 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
Changes since 1.35: +6 -6 lines
Diff to previous 1.35 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Sat Feb 6 04:50:19 2010 UTC (14 years, 2 months ago) by cube
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.34: +6 -6 lines
Diff to previous 1.34 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Fri Feb 5 06:43:16 2010 UTC (14 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.33: +6 -6 lines
Diff to previous 1.33 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Wed Nov 4 13:29:45 2009 UTC (14 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.32: +2 -99 lines
Diff to previous 1.32 (colored) to selected 1.60 (colored)

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

Sync with HEAD.

Revision 1.28.10.2 / (download) - annotate - [select for diffs], Wed Jul 1 22:32:58 2009 UTC (14 years, 9 months ago) by snj
Branch: netbsd-5-0
CVS Tags: netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.28.10.1: +5 -3 lines
Diff to previous 1.28.10.1 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored) to selected 1.60 (colored)

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

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) - annotate - [select for diffs], Sat May 16 10:41:48 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.21.2.2: +6 -4 lines
Diff to previous 1.21.2.2 (colored) to branchpoint 1.21 (colored) to selected 1.60 (colored)

sync with head

Revision 1.32 / (download) - annotate - [select for diffs], Sat May 16 08:36:32 2009 UTC (14 years, 11 months ago) by yamt
Branch: 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
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored) to selected 1.60 (colored)

rw_vector_exit: remove a redundant condition.

Revision 1.28.8.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:56 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.28: +107 -19 lines
Diff to previous 1.28 (colored) to selected 1.60 (colored)

Sync with HEAD.

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

Revision 1.28.4.1 / (download) - annotate - [select for diffs], Wed May 13 00:33:32 2009 UTC (14 years, 11 months ago) by snj
Branch: netbsd-5
Changes since 1.28: +6 -17 lines
Diff to previous 1.28 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Wed May 13 00:24:48 2009 UTC (14 years, 11 months ago) by snj
Branch: netbsd-5-0
Changes since 1.28: +6 -17 lines
Diff to previous 1.28 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Sat May 9 03:33:10 2009 UTC (14 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: jym-xensuspend-base
Changes since 1.30: +5 -3 lines
Diff to previous 1.30 (colored) to selected 1.60 (colored)

lockdebug fixes for rw_tryupgrade/rw_downgrade.

Revision 1.21.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:47 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.21.2.1: +110 -29 lines
Diff to previous 1.21.2.1 (colored) to branchpoint 1.21 (colored) to selected 1.60 (colored)

sync with head.

Revision 1.28.2.1 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:59 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.28: +104 -18 lines
Diff to previous 1.28 (colored) next main 1.29 (colored) to selected 1.60 (colored)

Sync with HEAD.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Apr 24 17:53:06 2009 UTC (14 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.29: +6 -17 lines
Diff to previous 1.29 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Sun Apr 19 08:36:04 2009 UTC (15 years ago) by ad
Branch: MAIN
Changes since 1.28: +100 -3 lines
Diff to previous 1.28 (colored) to selected 1.60 (colored)

Add rw_obj_*() functions to mirror the existing mutex functions.
Proposed on tech-kern quite some time ago.

Revision 1.26.4.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:27 2008 UTC (15 years, 6 months ago) by haad
Branch: haad-dm
Changes since 1.26: +5 -5 lines
Diff to previous 1.26 (colored) next main 1.27 (colored) to selected 1.60 (colored)

Sync with HEAD.

Revision 1.18.6.2 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:52 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.18.6.1: +3 -3 lines
Diff to previous 1.18.6.1 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored) to selected 1.60 (colored)

Sync with HEAD.

Revision 1.23.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:42 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.23.2.1: +5 -5 lines
Diff to previous 1.23.2.1 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored) to selected 1.60 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.26.2.2 / (download) - annotate - [select for diffs], Thu Jul 31 04:51:02 2008 UTC (15 years, 8 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.26.2.1: +3 -3 lines
Diff to previous 1.26.2.1 (colored) to branchpoint 1.26 (colored) next main 1.27 (colored) to selected 1.60 (colored)

Sync with head.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jul 29 16:13:39 2008 UTC (15 years, 8 months ago) by thorpej
Branch: 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
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Fri Jul 18 16:37:49 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored) to selected 1.60 (colored)

Sync with head.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jul 17 23:00:01 2008 UTC (15 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored) to selected 1.60 (colored)

PR/39155: Wolfgang Solfrank: Invalid parameter to turnstile_exit in rw_downgrade.

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:51 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.23: +5 -10 lines
Diff to previous 1.23 (colored) to selected 1.60 (colored)

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

Revision 1.20.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:39 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.20.2.1: +5 -10 lines
Diff to previous 1.20.2.1 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored) to selected 1.60 (colored)

sync with head

Revision 1.18.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:09 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.18: +234 -174 lines
Diff to previous 1.18 (colored) to selected 1.60 (colored)

Sync with HEAD.

Revision 1.26 / (download) - annotate - [select for diffs], Sat May 31 13:31:25 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl, haad-dm
Changes since 1.25: +3 -6 lines
Diff to previous 1.25 (colored) to selected 1.60 (colored)

Use __noinline.

Revision 1.25 / (download) - annotate - [select for diffs], Sat May 31 13:15:21 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.24: +4 -4 lines
Diff to previous 1.24 (colored) to selected 1.60 (colored)

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

Reduce ifdefs due to MULTIPROCESSOR slightly.

Revision 1.20.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:08 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.20: +14 -18 lines
Diff to previous 1.20 (colored) to selected 1.60 (colored)

sync with head.

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

sync with head.

Revision 1.23 / (download) - annotate - [select for diffs], Tue May 6 17:11:45 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Changes since 1.22: +8 -8 lines
Diff to previous 1.22 (colored) to selected 1.60 (colored)

Allow rw_tryenter(&lock, RW_READER) to recurse, for vfs_busy().

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

Remove clause 3 and 4 from TNF licenses

Revision 1.21 / (download) - annotate - [select for diffs], Tue Apr 22 14:46:35 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.20: +8 -5 lines
Diff to previous 1.20 (colored) to selected 1.60 (colored)

mutex_owned, rw_read_held, rw_write_held, rw_lock_held: check for a NULL
pointer.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Apr 11 14:55:51 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.19: +202 -163 lines
Diff to previous 1.19 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Fri Apr 4 17:25:09 2008 UTC (16 years ago) by ad
Branch: MAIN
Changes since 1.18: +33 -3 lines
Diff to previous 1.18 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Sun Mar 23 02:04:59 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.8.8.2: +9 -7 lines
Diff to previous 1.8.8.2 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored) to selected 1.60 (colored)

sync with HEAD

Revision 1.11.4.2 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:46 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.11.4.1: +11 -7 lines
Diff to previous 1.11.4.1 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored) to selected 1.60 (colored)

Sync with HEAD.

Revision 1.1.18.6 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:14 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.5: +9 -7 lines
Diff to previous 1.1.18.5 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored) to selected 1.60 (colored)

sync with head.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jan 28 19:58:32 2008 UTC (16 years, 2 months ago) by ad
Branch: 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
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored) to selected 1.60 (colored)

Fix error in previous. Spotted by yamt@.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Jan 26 14:13:37 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.16: +4 -3 lines
Diff to previous 1.16 (colored) to selected 1.60 (colored)

rw_write_held: return true only if held by the current LWP.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jan 25 19:02:31 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.15: +7 -6 lines
Diff to previous 1.15 (colored) to selected 1.60 (colored)

- 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) - annotate - [select for diffs], Mon Jan 21 09:46:11 2008 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.4: +4 -2 lines
Diff to previous 1.1.18.4 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

sync with head

Revision 1.8.8.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:08 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.8.8.1: +32 -16 lines
Diff to previous 1.8.8.1 (colored) to branchpoint 1.8 (colored) to selected 1.60 (colored)

sync with HEAD

Revision 1.13.4.1 / (download) - annotate - [select for diffs], Tue Jan 8 22:11:35 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.13: +4 -2 lines
Diff to previous 1.13 (colored) next main 1.14 (colored) to selected 1.60 (colored)

Sync with HEAD

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jan 4 21:54:49 2008 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored) to selected 1.60 (colored)

Need sys/lock.h for kernel_lock.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jan 4 21:52:48 2008 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored) to selected 1.60 (colored)

Pull in sys/atomic.h for memory barriers.

Revision 1.8.6.4 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:19 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.8.6.3: +3 -2 lines
Diff to previous 1.8.6.3 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored) to selected 1.60 (colored)

Sync with HEAD.

Revision 1.11.4.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:31 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.11: +30 -16 lines
Diff to previous 1.11 (colored) to selected 1.60 (colored)

Sync with HEAD.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:42 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking2
Changes since 1.12: +3 -2 lines
Diff to previous 1.12 (colored) next main 1.13 (colored) to selected 1.60 (colored)

Sync with head.

Revision 1.1.18.4 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:47 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.3: +30 -16 lines
Diff to previous 1.1.18.3 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

sync with head

Revision 1.13 / (download) - annotate - [select for diffs], Tue Dec 4 09:13:59 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.12: +3 -2 lines
Diff to previous 1.12 (colored) to selected 1.60 (colored)

rw_vector_enter: assert !cpu_intr_p().

Revision 1.8.6.3 / (download) - annotate - [select for diffs], Wed Nov 21 21:56:00 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.8.6.2: +29 -16 lines
Diff to previous 1.8.6.2 (colored) to branchpoint 1.8 (colored) to selected 1.60 (colored)

Sync with HEAD.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Wed Nov 21 21:19:45 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.11: +29 -16 lines
Diff to previous 1.11 (colored) next main 1.12 (colored) to selected 1.60 (colored)

Sync with HEAD

Revision 1.12 / (download) - annotate - [select for diffs], Wed Nov 21 10:19:10 2007 UTC (16 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2
Changes since 1.11: +29 -16 lines
Diff to previous 1.11 (colored) to selected 1.60 (colored)

make kmutex_t and krwlock_t smaller by killing lock id.
ok'ed by Andrew Doran.

Revision 1.8.8.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:31:54 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.8: +32 -28 lines
Diff to previous 1.8 (colored) to selected 1.60 (colored)

sync with HEAD

Revision 1.1.18.3 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:26 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.2: +32 -28 lines
Diff to previous 1.1.18.2 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

sync with head.

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

Sync with HEAD.

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

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:42 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.10: +30 -26 lines
Diff to previous 1.10 (colored) next main 1.11 (colored) to selected 1.60 (colored)

sync with head.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Oct 11 19:45:25 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base
Branch point for: mjf-devfs, bouyer-xenamd64
Changes since 1.10: +30 -26 lines
Diff to previous 1.10 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Tue Oct 9 13:44:28 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.6.2.6: +5 -5 lines
Diff to previous 1.6.2.6 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored) to selected 1.60 (colored)

Sync with head.

Revision 1.8.6.1 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:01 2007 UTC (16 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.8: +5 -5 lines
Diff to previous 1.8 (colored) to selected 1.60 (colored)

Sync with HEAD.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Sep 21 19:14:12 2007 UTC (16 years, 7 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base
Branch point for: yamt-x86pmap
Changes since 1.9: +4 -4 lines
Diff to previous 1.9 (colored) to selected 1.60 (colored)

Include sys/cdefs.h first.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Sep 17 21:33:34 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored) to selected 1.60 (colored)

__FUNCTION__ -> __func__

Revision 1.1.18.2 / (download) - annotate - [select for diffs], Mon Sep 3 14:40:54 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.1: +37 -14 lines
Diff to previous 1.1.18.1 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

sync with head.

Revision 1.6.2.6 / (download) - annotate - [select for diffs], Mon Aug 20 18:08:55 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.6.2.5: +4 -3 lines
Diff to previous 1.6.2.5 (colored) to branchpoint 1.6 (colored) to selected 1.60 (colored)

Track where locks were initialized.

Revision 1.6.2.5 / (download) - annotate - [select for diffs], Sun Jul 29 11:43:23 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.6.2.4: +27 -22 lines
Diff to previous 1.6.2.4 (colored) to branchpoint 1.6 (colored) to selected 1.60 (colored)

Simplify the code a bit.

Revision 1.6.2.4 / (download) - annotate - [select for diffs], Sun Jul 15 22:17:08 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.6.2.3: +4 -4 lines
Diff to previous 1.6.2.3 (colored) to branchpoint 1.6 (colored) to selected 1.60 (colored)

KASSERT(!cpu_intr_p()) in a couple of places.

Revision 1.6.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:09:55 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.6: +9 -13 lines
Diff to previous 1.6 (colored) next main 1.7 (colored) to selected 1.60 (colored)

Sync with head.

Revision 1.8 / (download) - annotate - [select for diffs], Thu May 17 14:51:40 2007 UTC (16 years, 11 months ago) by yamt
Branch: 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
Changes since 1.7: +2 -3 lines
Diff to previous 1.7 (colored) to selected 1.60 (colored)

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

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

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

Revision 1.3.2.4 / (download) - annotate - [select for diffs], Thu Apr 19 04:19:43 2007 UTC (17 years ago) by ad
Branch: yamt-idlelwp
Changes since 1.3.2.3: +2 -3 lines
Diff to previous 1.3.2.3 (colored) next main 1.4 (colored) to selected 1.60 (colored)

Pull up a change from the vmlocking branch:

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

Revision 1.7.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 06:47:31 2007 UTC (17 years ago) by thorpej
Branch: thorpej-atomic
Changes since 1.7: +8 -2 lines
Diff to previous 1.7 (colored) next main 1.8 (colored) to selected 1.60 (colored)

In the simple case, provide a generic CAS macro if the MD header does
not provide one.

Revision 1.3.2.3 / (download) - annotate - [select for diffs], Sun Apr 15 16:03:50 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.3.2.2: +9 -12 lines
Diff to previous 1.3.2.2 (colored) to selected 1.60 (colored)

sync with head.

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Tue Apr 10 18:34:04 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.6.2.2: +2 -3 lines
Diff to previous 1.6.2.2 (colored) to branchpoint 1.6 (colored) to selected 1.60 (colored)

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

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:39 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.6.2.1: +9 -14 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored) to selected 1.60 (colored)

Sync with head.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Mar 30 11:06:58 2007 UTC (17 years ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base
Branch point for: thorpej-atomic
Changes since 1.6: +9 -12 lines
Diff to previous 1.6 (colored) to selected 1.60 (colored)

Cosmetic changes.

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Wed Mar 21 20:10:21 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.6: +2 -3 lines
Diff to previous 1.6 (colored) to selected 1.60 (colored)

GC the simplelock/spinlock debugging stuff.

Revision 1.3.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:37 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.3.2.1: +4 -4 lines
Diff to previous 1.3.2.1 (colored) to selected 1.60 (colored)

Sync with HEAD.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Mar 3 10:08:19 2007 UTC (17 years, 1 month ago) by itohy
Branch: MAIN
CVS Tags: reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.5: +4 -4 lines
Diff to previous 1.5 (colored) to selected 1.60 (colored)

Remove extra space so that symbol renaming works properly.

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:24 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.3: +30 -3 lines
Diff to previous 1.3 (colored) to selected 1.60 (colored)

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

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 26 19:06:10 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.4: +8 -2 lines
Diff to previous 1.4 (colored) to selected 1.60 (colored)

Add a comment.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Feb 26 09:20:53 2007 UTC (17 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.3: +24 -3 lines
Diff to previous 1.3 (colored) to selected 1.60 (colored)

implement priority inheritance.

Revision 1.1.18.1 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:10 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1: +672 -0 lines
Diff to previous 1.1 (colored) to selected 1.60 (colored)

sync with head.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Feb 10 21:07:52 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.2: +6 -8 lines
Diff to previous 1.2 (colored) to selected 1.60 (colored)

- Add/correct comments.
- Print correct function name when an assertion triggers.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:31 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.1: +674 -0 lines
Diff to previous 1.1 (colored) to selected 1.60 (colored)

Merge newlock2 to head.

Revision 1.1.36.10 / (download) - annotate - [select for diffs], Fri Feb 9 19:58:10 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.1.36.9: +3 -3 lines
Diff to previous 1.1.36.9 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored) to selected 1.60 (colored)

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

Revision 1.1.36.9 / (download) - annotate - [select for diffs], Tue Feb 6 17:27:30 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.1.36.8: +11 -6 lines
Diff to previous 1.1.36.8 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

lockstat:

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

Revision 1.1.36.8 / (download) - annotate - [select for diffs], Mon Feb 5 13:03:57 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.1.36.7: +101 -47 lines
Diff to previous 1.1.36.7 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

- 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) - annotate - [select for diffs], Wed Jan 31 13:09:11 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.1.36.6: +13 -10 lines
Diff to previous 1.1.36.6 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

Catch deadlocks earlier.

Revision 1.1.36.6 / (download) - annotate - [select for diffs], Thu Jan 11 22:22:59 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.1.36.5: +28 -41 lines
Diff to previous 1.1.36.5 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

Checkpoint work in progress.

Revision 1.1.36.5 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:44 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.1.36.4: +73 -58 lines
Diff to previous 1.1.36.4 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

Checkpoint work in progress.

Revision 1.1.36.4 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:36 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.1.36.3: +46 -14 lines
Diff to previous 1.1.36.3 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

Checkpoint work in progress.

Revision 1.1.36.3 / (download) - annotate - [select for diffs], Fri Oct 20 19:45:13 2006 UTC (17 years, 6 months ago) by ad
Branch: newlock2
Changes since 1.1.36.2: +45 -64 lines
Diff to previous 1.1.36.2 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

- Update for lockdebug changes.
- Define mutex_getspl(), mutex_setspl() for modifying saved SPL value.

Revision 1.1.36.2 / (download) - annotate - [select for diffs], Mon Sep 11 01:31:39 2006 UTC (17 years, 7 months ago) by ad
Branch: newlock2
Changes since 1.1.36.1: +4 -3 lines
Diff to previous 1.1.36.1 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

Don't do the simplelock check if panicstr is set.

Revision 1.1.36.1 / (download) - annotate - [select for diffs], Sun Sep 10 23:42:42 2006 UTC (17 years, 7 months ago) by ad
Branch: newlock2
Changes since 1.1: +596 -0 lines
Diff to previous 1.1 (colored) to selected 1.60 (colored)

Add updated locking primatives.

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Fri Mar 22 03:27:00 2002 UTC (22 years, 1 month ago) by thorpej
Branch: newlock
Changes since 1.1.2.4: +60 -13 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored) to selected 1.60 (colored)

Add some basic debugging infrastructure as found in mutexes.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Sun Mar 17 20:18:56 2002 UTC (22 years, 1 month ago) by thorpej
Branch: newlock
Changes since 1.1.2.3: +14 -20 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Sat Mar 16 20:57:42 2002 UTC (22 years, 1 month ago) by thorpej
Branch: newlock
Changes since 1.1.2.2: +4 -4 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

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) - annotate - [select for diffs], Sat Mar 16 03:46:38 2002 UTC (22 years, 1 month ago) by thorpej
Branch: newlock
Changes since 1.1.2.1: +6 -4 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) to selected 1.60 (colored)

Make turnstiles actually have two queues (reader and writer).  Users
of turnsitles still don't differentiate between them.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Thu Mar 14 17:11:03 2002 UTC (22 years, 1 month ago) by thorpej
Branch: newlock
Changes since 1.1: +462 -0 lines
Diff to previous 1.1 (colored) to selected 1.60 (colored)

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 (22 years, 1 month ago) by thorpej
Branch: 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.

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




CVSweb <webmaster@jp.NetBSD.org>