The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.112: download - view: text, markup, annotated - select for diffs
Sun Oct 15 10:28:23 2023 UTC (13 months, 3 weeks ago) by riastradh
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +11 -10 lines
kern_mutex.c: Sort includes.  No functional change intended.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Sun Oct 15 10:27:11 2023 UTC (13 months, 3 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +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.110: download - view: text, markup, annotated - select for diffs
Sat Sep 23 18:48:04 2023 UTC (14 months, 2 weeks ago) by ad
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +5 -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.109: download - view: text, markup, annotated - select for diffs
Thu Sep 7 20:05:42 2023 UTC (15 months ago) by ad
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +4 -27 lines
Remove dodgy and unused mutex_owner_running() & rw_owner_running().

Revision 1.65.2.3: download - view: text, markup, annotated - select for diffs
Mon Jul 31 14:42:45 2023 UTC (16 months, 1 week ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE
Diff to: previous 1.65.2.2: preferred, colored; branchpoint 1.65: preferred, colored; next MAIN 1.66: preferred, colored
Changes since revision 1.65.2.2: +3 -3 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.79.2.2: download - view: text, markup, annotated - select for diffs
Mon Jul 31 14:40:04 2023 UTC (16 months, 1 week ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE
Diff to: previous 1.79.2.1: preferred, colored; branchpoint 1.79: preferred, colored; next MAIN 1.80: preferred, colored
Changes since revision 1.79.2.1: +3 -3 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.101.2.1: download - view: text, markup, annotated - select for diffs
Mon Jul 31 14:38:25 2023 UTC (16 months, 1 week ago) by martin
Branches: 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
Diff to: previous 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101: +3 -3 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.108: download - view: text, markup, annotated - select for diffs
Mon Jul 17 12:54:29 2023 UTC (16 months, 3 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +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.107: download - view: text, markup, annotated - select for diffs
Mon May 1 12:18:08 2023 UTC (19 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +16 -21 lines
mutex(9): Write comments in terms of ordering semantics.

Phrasing things in terms of implementation details like `acquiring
and locking cache lines' both suggests a particular cache coherency
protocol, paints an incomplete picture for more involved protocols,
and doesn't really help to prove theorems the way ordering relations
do.

No functional change intended.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Mon May 1 12:17:56 2023 UTC (19 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +2 -3 lines
mutex(9): Omit needless membar_consumer.

In practical terms, this is not necessary because MUTEX_SET_WAITERS
already issues MUTEX_MEMBAR_ENTER, which on all architectures is a
sequential consistency barrier, i.e., read/write-before-read/write,
subsuming membar_consumer.

In theoretical terms, MUTEX_MEMBAR_ENTER might imply only
write-before-read/write, so one might imagine that the
read-before-read ordering of membar_consumer _could_ be necessary.
However, the memory operations that are significant here are:

1. load owner := mtx->mtx_owner
2. store mtx->mtx_owner := owner | MUTEX_BIT_WAITERS
3. load owner->l_cpu->ci_curlwp to test if equal to owner

(1) is program-before (2) and at the same memory location,
mtx->mtx_owner, so (1) happens-before (2).

And (2) is separated in program order by MUTEX_MEMBAR_ENTER from (3),
so (2) happens-before (3).

So even if the membar_consumer were intended to guarantee that (1)
happens-before (3), it's not necessary, because we can already prove
it from MUTEX_MEMBAR_ENTER.

But actually, we don't really need (1) happens-before (3), exactly;
what we really need is (2) happens-before (3), since this is a little
manifestation of Dekker's algorithm between cpu_switchto and
mutex_exit, where each CPU sets one flag and must ensure it is
visible to the other CPUs before testing the other flag -- one flag
here is the MUTEX_BIT_WAITERS bit, and the other `flag' here is the
condition owner->l_cpu->ci_curlwp == owner; the corresponding logic,
in cpu_switchto, is:

1'. store owner->l_cpu->ci_curlwp := owner
2'. load mtx->mtx_owner to test if MUTEX_BIT_WAITERS set

Revision 1.105: download - view: text, markup, annotated - select for diffs
Wed Apr 12 06:35:40 2023 UTC (20 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +11 -8 lines
kern: Nix mutex_owner.

There is no valid reason to use this except in assertions of the form

	KASSERT(mutex_owner(lock) == curlwp),

which is more obviously spelled as

	KASSERT(mutex_owned(lock)).

Exception: There's one horrible kludge in zfs that abuses this, which
should be eliminated.

XXX kernel revbump -- deleting symbol

PR kern/47114

Revision 1.104: download - view: text, markup, annotated - select for diffs
Fri Feb 24 11:21:28 2023 UTC (21 months, 2 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +4 -9 lines
mutex(9): Simplify membars.

- Elide macro indirection for membar_acquire.
- Use atomic_store_release instead of membar_release and store.

No functional change intended.  Possible very very very very minor
performance gain on architectures with a native store-release
instruction.

Note: It is possible there are some code paths that worked by
accident with this change which could, in theory, break now, such as
the logic I recently fixed in kern_descrip.c that assumed a
mutex_enter/exit cycle would serve as a store-before-store barrier:

	fp->f_... = ...;		// A

	/* fd_affix */
	mutex_enter(&fp->f_lock);
	fp->f_count++;
	mutex_exit(&fp->f_lock);
	...
	ff->ff_file = fp;		// B

This logic was never correct, and is likely already broken in
practice on aarch64 because the mutex_exit stub already uses STLXR
instead of DMB ISH(ST); STXR.  This change only affects the slow path
of mutex_exit, so it doesn't change even the accidental guarantees
mutex_exit makes in all paths.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Thu Feb 23 14:57:29 2023 UTC (21 months, 2 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +3 -3 lines
KERNEL_LOCK(9): Minor tweaks to ci->ci_biglock_wanted access.

1. Use atomic_load_relaxed to read ci->ci_biglock_wanted from another
   CPU, for clarity and to avoid the appearance of data races in thread
   sanitizers.  (Reading ci->ci_biglock_wanted on the local CPU need
   not be atomic because no other CPU can be writing to it.)

2. Use atomic_store_relaxed to update ci->ci_biglock_wanted when we
   start to spin, to avoid the appearance of data races.

3. Add comments to explain what's going on and cross-reference the
   specific matching membars in mutex_vector_enter.

related to PR kern/57240

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

Revision 1.101: download - view: text, markup, annotated - select for diffs
Mon Dec 5 07:09:04 2022 UTC (2 years ago) by skrll
Branches: MAIN
CVS tags: netbsd-10-base
Branch point for: netbsd-10
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +8 -10 lines
Simplify. Same code before and after.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Wed Oct 26 23:21:19 2022 UTC (2 years, 1 month ago) by riastradh
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +2 -3 lines
mutex(9): Properly declare _mutex_init in sys/mutex.h.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Sat Apr 9 23:46:10 2022 UTC (2 years, 8 months ago) by riastradh
Branches: MAIN
CVS tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +8 -6 lines
mutex(9): Convert to membar_acquire/release.

Except for setting the waiters bit -- not sure if this is actually
required to be store-before-load/store.  Seems unlikely -- surely
we'd have seen some serious bug by now if not, because membar_enter
has failed to guarantee that on x86! -- but I'm leaving it for now
until I have time to think enough about it to be sure one way or
another.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Wed Aug 25 04:13:42 2021 UTC (3 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +7 -2 lines
- In kern_mutex.c, if MUTEX_CAS() is not defined, define it in terms of
  atomic_cas_ulong().
- For arm, ia64, m68k, mips, or1k, riscv, vax: don't define our own
  MUTEX_CAS(), as they either use atomic_cas_ulong() or equivalent
  (atomic_cas_uint() on m68k).
- For alpha and sparc64, don't define MUTEX_CAS() in terms of their own
  _lock_cas(), which has its own memory barriers; the call sites in
  kern_mutex.c already have the appropriate memory barrier calls.  Thus,
  alpha and sparc64 can use default definition.
- For sh3, don't define MUTEX_CAS() in terms of its own _lock_cas();
  atomic_cas_ulong() is strong-aliased to _lock_cas(), therefore defining
  our own MUTEX_CAS() is redundant.

Per thread:
	https://mail-index.netbsd.org/tech-kern/2021/07/25/msg027562.html

Revision 1.92.2.2: download - view: text, markup, annotated - select for diffs
Sat Apr 3 22:29:00 2021 UTC (3 years, 8 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.92.2.1: preferred, colored; next MAIN 1.93: preferred, colored
Changes since revision 1.92.2.1: +4 -3 lines
Sync with HEAD.

Revision 1.96.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 3 21:45:00 2021 UTC (3 years, 8 months ago) by thorpej
Branches: thorpej-cfargs
Diff to: previous 1.96: preferred, colored; next MAIN 1.97: preferred, colored
Changes since revision 1.96: +3 -2 lines
Sync with HEAD.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Sat Apr 3 14:56:14 2021 UTC (3 years, 8 months ago) by thorpej
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-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +3 -2 lines
Fix an IPI deadlock scenario that resulted in a TLB shootdown timeout
panic reported by John Klos on port-alpha:

- pmap_tlb_shootnow(): If we acquire a pmap's activation lock, we will
  have raised the IPL on the current CPU to IPL_SCHED until we drop
  the tlb_lock (due to how nested spin mutexes work).  As such, when
  we release the activation lock, forcibly lower our IPL back to IPL_VM
  so that we can receive and process IPIs while waiting for other CPUs
  to process the shootdowns.
- mutex_vector_enter(): Invoke SPINLOCK_SPIN_HOOK while spinning to acquire
  a spin mutex.  This is a nop on most platforms, but it's important on
  the Alpha.  Without this, IPIs (and thus TLB shootdowns) cannot be
  processed if trying to acquire an IPL_SCHED spin mutex such as those
  used by the scheduler.

...and while we're poking around in here:

- Rework the Alpha SPINLOCK_SPIN_HOOK to only check curcpu()->ci_ipis
  if the current CPU's IPL is >= IPL_CLOCK (thus ensuring that preemption
  is disabled and thus guaranteeing that curcpu() is stable).  (Alpha does
  not yet support kernel preemption, but this is now one less thing that
  would need to be fixed.)

Revision 1.96: download - view: text, markup, annotated - select for diffs
Tue Mar 2 01:15:15 2021 UTC (3 years, 9 months ago) by rin
Branches: MAIN
Branch point for: thorpej-cfargs
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +3 -3 lines
Consistently right-justify backslash in macro definition.
No binary changes.

Revision 1.92.2.1: download - view: text, markup, annotated - select for diffs
Sun Jan 3 16:35:04 2021 UTC (3 years, 11 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +7 -7 lines
Sync w/ HEAD.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Tue Dec 15 08:35:52 2020 UTC (3 years, 11 months ago) by skrll
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +3 -3 lines
it's cpu_switchto (not cpu_switch)

Revision 1.94: download - view: text, markup, annotated - select for diffs
Tue Dec 15 08:17:31 2020 UTC (3 years, 11 months ago) by skrll
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +3 -3 lines
Fixup the big mutex_exit comment a little. It's actually, cpu_switchto
that posts a store fence and it's AFTER setting curlwp.

More to come.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Mon Dec 14 19:42:51 2020 UTC (3 years, 11 months ago) by skrll
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +6 -6 lines
Trailing whitespace

Revision 1.92: download - view: text, markup, annotated - select for diffs
Tue May 12 21:56:17 2020 UTC (4 years, 7 months ago) by ad
Branches: MAIN
Branch point for: thorpej-futex
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +4 -7 lines
PR kern/55251 (use of ZFS may trigger kernel memory corruption (KASAN error))

Previous wasn't quite right.  Redo it differently - disable preemption
earlier instead.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Tue May 12 21:24:29 2020 UTC (4 years, 7 months ago) by ad
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +8 -4 lines
PR kern/55251: use of ZFS may trigger kernel memory corruption

mutex_vector_enter(): reload mtx_owner with preemption disabled before
calling mutex_oncpu(), otherwise lwp_dtor() can intervene.

Revision 1.73.4.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:51 2020 UTC (4 years, 8 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.73.4.1: preferred, colored; branchpoint 1.73: preferred, colored; next MAIN 1.74: preferred, colored
Changes since revision 1.73.4.1: +88 -82 lines
Merge changes from current as of 20200406

Revision 1.79.2.1: download - view: text, markup, annotated - select for diffs
Sun Mar 8 11:21:29 2020 UTC (4 years, 9 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +4 -4 lines
Pull up following revision(s) (requested by chs in ticket #768):

	sys/kern/kern_mutex.c: revision 1.90

split an "a && b" assertion into two so it's clear in the dump which condition
was not true even if both are true by the time the dump is written.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Sun Mar 8 00:26:06 2020 UTC (4 years, 9 months ago) by chs
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +4 -4 lines
split an "a && b" assertion into two so it's clear in the dump which condition
was not true even if both are true by the time the dump is written.

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

Revision 1.89: download - view: text, markup, annotated - select for diffs
Thu Jan 23 12:35:23 2020 UTC (4 years, 10 months ago) by ad
Branches: MAIN
CVS tags: is-mlppp-base, is-mlppp, ad-namecache-base3, ad-namecache-base2
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +4 -3 lines
Update a comment.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Tue Jan 7 13:44:23 2020 UTC (4 years, 11 months ago) by ad
Branches: MAIN
CVS tags: ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +9 -9 lines
hppa has custom adaptive mutexes.  Allow it to build again while not
reintroducing the main read of mtx_owner that I wanted to eliminate.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Mon Jan 6 11:12:55 2020 UTC (4 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +34 -25 lines
mutex_vector_enter(): avoid some unneeded reads of mtx_owner.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Wed Dec 11 20:46:06 2019 UTC (5 years ago) by ad
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +7 -2 lines
Comment on previous explaining why it's needed.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Wed Dec 11 20:34:06 2019 UTC (5 years ago) by ad
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +10 -2 lines
mutex_vector_exit: if the arch doesn't have assembly stubs, we need to
unconditionally release the lock if(cold), so mutexes can be used before
interrupts are set up.  Removed with panicstr checks in 1.81.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Tue Dec 10 13:36:44 2019 UTC (5 years ago) by kre
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +3 -3 lines

Balance the parentheses - hopefully unbreak the build.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Tue Dec 10 11:35:29 2019 UTC (5 years ago) by ad
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +3 -3 lines
Inverted test.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Tue Dec 10 11:12:02 2019 UTC (5 years ago) by ad
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +11 -5 lines
Fix build break.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Mon Dec 9 21:05:23 2019 UTC (5 years ago) by ad
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +32 -66 lines
- Add a mutex_owner_running() for the benefit of the pagedaemon, which
  needs help with locking things in reverse order.
- Expunge the panicstr checks.
- Make MUTEX_NODEBUG work for adaptive mutexes too.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Fri Nov 29 19:44:59 2019 UTC (5 years ago) by ad
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +16 -5 lines
Get rid of MUTEX_RECEIVE/MUTEX_GIVE.

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

Revision 1.79: download - view: text, markup, annotated - select for diffs
Thu May 9 05:00:31 2019 UTC (5 years, 7 months ago) by ozaki-r
Branches: MAIN
CVS tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: netbsd-9
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +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.78: download - view: text, markup, annotated - select for diffs
Thu May 9 04:52:59 2019 UTC (5 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +4 -4 lines
Add missing "static" declaration

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

It can cause a false positive assertion failure.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Sun Mar 10 12:49:48 2019 UTC (5 years, 9 months ago) by skrll
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +6 -6 lines
Fix two oddities...

- remove extraneous semi-colons from do { } while (0) macro definitions
- actually wrap MUTEX_INITIALIZE_ADAPTIVE contents in do { }

Spotted by kre@

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

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

Revision 1.75: download - view: text, markup, annotated - select for diffs
Fri Aug 31 01:23:57 2018 UTC (6 years, 3 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.74: preferred, colored
Changes since revision 1.74: +4 -4 lines
Sprinkle __predict_false to dedicated assertions of mutex and rwlock

Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue Aug 14 01:09:53 2018 UTC (6 years, 3 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +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.65.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 2 09:07:52 2018 UTC (6 years, 8 months 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.65.2.1: preferred, colored; branchpoint 1.65: preferred, colored
Changes since revision 1.65.2.1: +15 -7 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.73: download - view: text, markup, annotated - select for diffs
Sun Feb 25 18:54:29 2018 UTC (6 years, 9 months ago) by chs
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.72: preferred, colored
Changes since revision 1.72: +15 -2 lines
add defines to control whether or not mutex operations are skipped
after we have panic'd.  no functional change.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Tue Feb 6 07:46:24 2018 UTC (6 years, 10 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +4 -2 lines
Check if adaptive mutex isn't called in interrupt context

By this check, we can notice this programming error without LOCKDEBUG.
The same check exists in rw_enter.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Mon Feb 5 04:25:04 2018 UTC (6 years, 10 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +15 -7 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.70: download - view: text, markup, annotated - select for diffs
Tue Jan 30 07:52:22 2018 UTC (6 years, 10 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +7 -7 lines
Apply C99-style struct initialization to syncobj_t

Revision 1.69: download - view: text, markup, annotated - select for diffs
Thu Jan 18 08:40:56 2018 UTC (6 years, 10 months ago) by skrll
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +3 -3 lines
typo in comment

Revision 1.65.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 13 21:57:11 2018 UTC (6 years, 10 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +8 -8 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.68: download - view: text, markup, annotated - select for diffs
Mon Dec 25 09:13:40 2017 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +8 -8 lines
Apply C99-style struct initialization to lockops_t

Revision 1.53.2.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:38:44 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.53.2.2: preferred, colored; branchpoint 1.53: preferred, colored; next MAIN 1.54: preferred, colored
Changes since revision 1.53.2.2: +81 -38 lines
update from HEAD

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

Revision 1.66: download - view: text, markup, annotated - select for diffs
Sat Sep 16 23:25:34 2017 UTC (7 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +5 -5 lines
add missing const

Revision 1.61.2.4: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:07 2017 UTC (7 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.61.2.3: preferred, colored; branchpoint 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61.2.3: +22 -2 lines
Sync with HEAD

Revision 1.64.4.2: download - view: text, markup, annotated - select for diffs
Tue May 2 03:19:22 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.64.4.1: preferred, colored; branchpoint 1.64: preferred, colored; next MAIN 1.65: preferred, colored
Changes since revision 1.64.4.1: +9 -7 lines
Sync with HEAD - tag prg-localcount2-base1

Revision 1.65: download - view: text, markup, annotated - select for diffs
Mon May 1 21:35:25 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: netbsd-8
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +22 -2 lines
Introduce mutex_ownable() to determine if it is possible for the current
process to acquire a mutex.

Revision 1.64.4.1: download - view: text, markup, annotated - select for diffs
Sun Apr 30 04:56:55 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +20 -2 lines
Introduce mutex_ownable(9) and use it in localcount_release(9).

Commit of same code to head is awaiting discussion on tech-kern.

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

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

Revision 1.61.2.3: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:56 2017 UTC (7 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.61.2.2: preferred, colored; branchpoint 1.61: preferred, colored
Changes since revision 1.61.2.2: +11 -11 lines
Sync with HEAD

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

Revision 1.61.2.2: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:20 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.61.2.1: preferred, colored; branchpoint 1.61: preferred, colored
Changes since revision 1.61.2.1: +4 -4 lines
Sync with HEAD

Revision 1.63: download - view: text, markup, annotated - select for diffs
Thu Jul 7 06:55:43 2016 UTC (8 years, 5 months ago) by msaitoh
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, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +4 -4 lines
KNF. Remove extra spaces. No functional change.

Revision 1.61.2.1: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:21 2015 UTC (9 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +3 -3 lines
Sync with HEAD

Revision 1.62: download - view: text, markup, annotated - select for diffs
Mon May 25 21:02:37 2015 UTC (9 years, 6 months ago) by prlw1
Branches: MAIN
CVS tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +3 -3 lines
typo

Revision 1.61: download - view: text, markup, annotated - select for diffs
Fri Nov 28 08:27:27 2014 UTC (10 years ago) by uebayasi
Branches: MAIN
CVS tags: nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +3 -3 lines
Consistently use KPREEMPT_*() here.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Fri Sep 19 17:52:43 2014 UTC (10 years, 2 months ago) by matt
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +37 -15 lines
Allow MD code to use something other than __cpu_simple_lock_t for doing spin
locks but use the same logic.

MUTEX_SPINBIT_LOCK_INIT
MUTEX_SPINBIT_LOCK_TRY
MUTEX_SPINBIT_LOCKED_P
MUTEX_SPINBIT_LOCK_UNLOCK
MUTEX_INITIALIZE_SPIN_IPL

For those platforms without sub-word CAS, you can use these to place the
mutex lock and ipl inside a full machine word and use CAS to update them.

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

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

Revision 1.51.4.2: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:03 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.51.4.1: preferred, colored; branchpoint 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.4.1: +6 -9 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.54.4.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:07 2014 UTC (10 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.54: preferred, colored; next MAIN 1.55: preferred, colored
Changes since revision 1.54: +5 -8 lines
sync with head

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat Oct 19 21:01:39 2013 UTC (11 years, 1 month ago) by mrg
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, 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.57: preferred, colored
Changes since revision 1.57: +5 -2 lines
use __USE() where appropriate.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sun Sep 22 14:59:07 2013 UTC (11 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +2 -8 lines
Remove redundant declaration of MUTEX_CLEAR_WAITERS without checking if
any of the !__HAVE_SIMPLE_MUTEX architectures need it based on the
assumption that HPPA is the only member of that category.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sun Sep 22 14:55:07 2013 UTC (11 years, 2 months ago) by skrll
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +3 -3 lines
Revert previous - it was wrong. hi joerg.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Sep 14 13:19:18 2013 UTC (11 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +3 -3 lines
MUTEX_CLEAR_WAITERS is only ever used by !__HAVE_SIMPLE_MUTEXES

Revision 1.53.2.1: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:18:57 2013 UTC (11 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +3 -3 lines
resync from head

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Apr 27 08:12:34 2013 UTC (11 years, 7 months 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.53: preferred, colored
Changes since revision 1.53: +3 -3 lines
Revert change that allowed rw_tryenter(&lock, RW_READER) to recurse
for vfs_busy(). This is no longer necessary.

Revision 1.51.4.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:25 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -23 lines
sync with head

Revision 1.51.8.2: download - view: text, markup, annotated - select for diffs
Sun Mar 4 00:46:30 2012 UTC (12 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.51.8.1: preferred, colored; branchpoint 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.8.1: +4 -4 lines
sync to latest -current.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sat Feb 25 22:32:44 2012 UTC (12 years, 9 months ago) by rmind
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, 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, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +4 -4 lines
{mutex,rw}_vector_enter: use macro versions to disable/enable preemption.

Revision 1.51.8.1: download - view: text, markup, annotated - select for diffs
Fri Feb 24 09:11:46 2012 UTC (12 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -21 lines
sync to -current.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Sun Feb 19 21:06:52 2012 UTC (12 years, 9 months ago) by rmind
Branches: MAIN
CVS tags: jmcneill-usbmp-base3
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -21 lines
Remove COMPAT_SA / KERN_SA.  Welcome to 6.99.3!
Approved by core@.

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

Revision 1.49.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 21 01:42:08 2011 UTC (13 years, 7 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.49: preferred, colored; next MAIN 1.50: preferred, colored
Changes since revision 1.49: +47 -52 lines
sync with head

Revision 1.51: download - view: text, markup, annotated - select for diffs
Mon Apr 11 19:11:08 2011 UTC (13 years, 8 months 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-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.50: preferred, colored
Changes since revision 1.50: +4 -7 lines
G/C unused MUTEX_COUNT_BIAS (it was for VAX)

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun Mar 20 23:19:16 2011 UTC (13 years, 8 months ago) by rmind
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +45 -47 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.44.10.1: download - view: text, markup, annotated - select for diffs
Sat Feb 5 06:00:13 2011 UTC (13 years, 10 months ago) by cliff
Branches: matt-nb5-mips64
Diff to: previous 1.44: preferred, colored; next MAIN 1.45: preferred, colored
Changes since revision 1.44: +4 -2 lines
- include opt_multiprocessor.h for explicit MULTIPROCESSOR dependency

Revision 1.48.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:44:09 2010 UTC (14 years, 7 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.48: preferred, colored; next MAIN 1.49: preferred, colored
Changes since revision 1.48: +9 -9 lines
Sync with HEAD.

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

Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon Feb 8 09:54:27 2010 UTC (14 years, 10 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.48: preferred, colored
Changes since revision 1.48: +9 -9 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.48: download - view: text, markup, annotated - select for diffs
Sat Feb 6 04:50:19 2010 UTC (14 years, 10 months ago) by cube
Branches: MAIN
CVS tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +9 -9 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.47: download - view: text, markup, annotated - select for diffs
Fri Feb 5 06:43:16 2010 UTC (14 years, 10 months ago) by skrll
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +9 -9 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.46: download - view: text, markup, annotated - select for diffs
Wed Nov 4 13:29:45 2009 UTC (15 years, 1 month ago) by pooka
Branches: MAIN
CVS tags: matt-premerge-20091211
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +3 -101 lines
Heave-ho mutex/rwlock object routines into separate modules -- they
don't have anything to do with the lock internals.

Revision 1.35.2.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:13:46 2009 UTC (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.35.2.1: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.2.1: +28 -16 lines
sync with head.

Revision 1.44.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 3 18:32:56 2009 UTC (15 years, 9 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.44: preferred, colored; next MAIN 1.45: preferred, colored
Changes since revision 1.44: +5 -5 lines
Sync with HEAD.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun Jan 25 04:45:14 2009 UTC (15 years, 10 months ago) by rmind
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +5 -5 lines
mutex_vector_enter: few predictions.

Revision 1.30.6.3: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:18 2009 UTC (15 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.30.6.2: preferred, colored; branchpoint 1.30: preferred, colored; next MAIN 1.31: preferred, colored
Changes since revision 1.30.6.2: +19 -0 lines
Sync with HEAD.

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

Revision 1.44: download - view: text, markup, annotated - select for diffs
Wed Oct 15 06:51:20 2008 UTC (16 years, 2 months ago) by wrstuden
Branches: MAIN
CVS tags: netbsd-5-base, 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, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, matt-nb5-mips64
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +21 -2 lines
Merge wrstuden-revivesa into HEAD.

Revision 1.40.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 1 03:48:11 2008 UTC (16 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.40.2.1: preferred, colored; branchpoint 1.40: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.2.1: +21 -2 lines
Disable generating an upcall for blocking on an adaptive mutex. While
we are indeed blocking, there really is no way for the app to take
advantage of this. We could, for instance, be sleeping on p_lock!

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

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

Revision 1.30.6.2: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:08 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.30.6.1: preferred, colored; branchpoint 1.30: preferred, colored
Changes since revision 1.30.6.1: +19 -25 lines
Sync with HEAD.

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

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sat May 31 13:15:21 2008 UTC (16 years, 6 months ago) by ad
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +5 -5 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.41: download - view: text, markup, annotated - select for diffs
Mon May 19 17:06:02 2008 UTC (16 years, 6 months ago) by ad
Branches: MAIN
CVS tags: hpcarm-cleanup-nbase
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -4 lines
Reduce ifdefs due to MULTIPROCESSOR slightly.

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

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

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

Revision 1.39: download - view: text, markup, annotated - select for diffs
Wed Apr 30 00:40:13 2008 UTC (16 years, 7 months ago) by yamt
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -3 lines
mutex_vector_enter: fix a typo in a comment.

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

Revision 1.37: download - view: text, markup, annotated - select for diffs
Mon Apr 28 13:18:50 2008 UTC (16 years, 7 months ago) by ad
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -2 lines
MUTEX_SPIN_SPLRAISE: add another __insn_barrier() for safety.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sun Apr 27 14:29:09 2008 UTC (16 years, 7 months ago) by ad
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +5 -4 lines
Minor fix for preemption safety.

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

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Apr 11 15:28:34 2008 UTC (16 years, 8 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +9 -5 lines
mutex_vector_enter: reduce reads of mtx_owner slightly.

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

Revision 1.33: download - view: text, markup, annotated - select for diffs
Fri Mar 28 22:19:39 2008 UTC (16 years, 8 months ago) by ad
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +6 -3 lines
mutex_vector_exit: add another panicstr check.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Fri Mar 28 16:23:39 2008 UTC (16 years, 8 months ago) by ad
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -5 lines
Remove dead code from previous.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Mar 27 19:11:05 2008 UTC (16 years, 8 months ago) by ad
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +103 -2 lines
Add code for dynamically allocated mutexes, as posted on tech-kern.

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

Revision 1.1.18.6: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:46:07 2008 UTC (16 years, 10 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 -15 lines
sync with head

Revision 1.15.8.3: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:56:05 2008 UTC (16 years, 11 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.15.8.2: preferred, colored; branchpoint 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15.8.2: +53 -45 lines
sync with HEAD

Revision 1.26.4.2: download - view: text, markup, annotated - select for diffs
Tue Jan 8 22:11:34 2008 UTC (16 years, 11 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.26.4.1: preferred, colored; branchpoint 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26.4.1: +4 -8 lines
Sync with HEAD

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sat Jan 5 12:31:39 2008 UTC (16 years, 11 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, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base, ad-socklock-base1
Branch point for: mjf-devfs2
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +3 -10 lines
simple_lock_only_held() is gone.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Jan 4 21:31:06 2008 UTC (16 years, 11 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +3 -2 lines
sys/lock.h is required now. ok ad

Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri Jan 4 21:18:09 2008 UTC (16 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -2 lines
Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.

Revision 1.26.4.1: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:55:54 2008 UTC (16 years, 11 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +5 -7 lines
Sync with HEAD

Revision 1.21.2.3: download - view: text, markup, annotated - select for diffs
Thu Dec 27 00:46:00 2007 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.21.2.2: preferred, colored; branchpoint 1.21: preferred, colored
Changes since revision 1.21.2.2: +5 -7 lines
Sync with HEAD.

Revision 1.24.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 21:39:40 2007 UTC (16 years, 11 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.24.2.1: preferred, colored; branchpoint 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24.2.1: +5 -7 lines
Sync with head.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Mon Dec 24 14:57:56 2007 UTC (16 years, 11 months ago) by ad
Branches: MAIN
CVS tags: vmlocking2-base3
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +5 -7 lines
Add back mutex_owner() for Solaris compat.

Revision 1.15.6.7: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:38:18 2007 UTC (17 years ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.15.6.6: preferred, colored; branchpoint 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15.6.6: +6 -7 lines
Sync with HEAD.

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

Revision 1.24.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 17:57:41 2007 UTC (17 years ago) by ad
Branches: vmlocking2
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +6 -7 lines
Sync with head.

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

Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Dec 6 01:18:46 2007 UTC (17 years ago) by ad
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, 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.25: preferred, colored
Changes since revision 1.25: +6 -11 lines
mutex_init: use 'if' instead of 'switch' to avoid complaints from the
compiler.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Dec 5 06:50:07 2007 UTC (17 years ago) by ad
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +6 -2 lines
mutex_init: make MUTEX_DEFAULT + IPL_SOFT* return an adaptive mutex.

Revision 1.15.6.6: download - view: text, markup, annotated - select for diffs
Mon Dec 3 16:14:51 2007 UTC (17 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.15.6.5: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.6.5: +6 -6 lines
Sync with HEAD.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Nov 30 23:05:43 2007 UTC (17 years ago) by ad
Branches: MAIN
CVS tags: vmlocking2-base1, vmlocking-nbase
Branch point for: vmlocking2
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +6 -6 lines
Use membar_*().

Revision 1.15.6.5: download - view: text, markup, annotated - select for diffs
Wed Nov 21 21:56:00 2007 UTC (17 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.15.6.4: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.6.4: +39 -24 lines
Sync with HEAD.

Revision 1.19.2.3: download - view: text, markup, annotated - select for diffs
Wed Nov 21 21:19:45 2007 UTC (17 years ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.19.2.2: preferred, colored; branchpoint 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19.2.2: +37 -22 lines
Sync with HEAD

Revision 1.23: download - view: text, markup, annotated - select for diffs
Wed Nov 21 10:19:10 2007 UTC (17 years ago) by yamt
Branches: MAIN
CVS tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +39 -24 lines
make kmutex_t and krwlock_t smaller by killing lock id.
ok'ed by Andrew Doran.

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

Revision 1.1.18.4: download - view: text, markup, annotated - select for diffs
Thu Nov 15 11:44:43 2007 UTC (17 years, 1 month 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: +12 -6 lines
sync with head.

Revision 1.19.2.2: download - view: text, markup, annotated - select for diffs
Tue Nov 13 16:02:07 2007 UTC (17 years, 1 month ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.19.2.1: preferred, colored; branchpoint 1.19: preferred, colored
Changes since revision 1.19.2.1: +10 -4 lines
Sync with HEAD

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

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

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Nov 7 00:23:22 2007 UTC (17 years, 1 month ago) by ad
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +11 -5 lines
Merge from vmlocking:

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

Revision 1.15.8.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:31:44 2007 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +18 -15 lines
sync with HEAD

Revision 1.15.6.3: download - view: text, markup, annotated - select for diffs
Sun Nov 4 21:03:32 2007 UTC (17 years, 1 month ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.15.6.2: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.6.2: +3 -3 lines
Sync with HEAD.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Nov 4 17:26:02 2007 UTC (17 years, 1 month ago) by pooka
Branches: MAIN
CVS tags: jmcneill-base
Branch point for: mjf-devfs
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -3 lines
fix typo in comment (greetings to ad, someone read your longwinded
prattling dissertation)

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

Revision 1.15.6.2: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:48:32 2007 UTC (17 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.15.6.1: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.6.1: +9 -6 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.19.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 25 22:40:00 2007 UTC (17 years, 1 month ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -3 lines
Sync with HEAD.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Oct 19 12:16:42 2007 UTC (17 years, 1 month ago) by ad
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -3 lines
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.18.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 14 11:48:41 2007 UTC (17 years, 2 months ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18: +8 -5 lines
sync with head.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Oct 11 19:45:25 2007 UTC (17 years, 2 months ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +8 -5 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.11.2.15: download - view: text, markup, annotated - select for diffs
Tue Oct 9 15:22:18 2007 UTC (17 years, 2 months ago) by ad
Branches: vmlocking
Diff to: previous 1.11.2.14: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11.2.14: +3 -3 lines
Sync with head.

Revision 1.11.2.14: download - view: text, markup, annotated - select for diffs
Tue Oct 9 13:44:27 2007 UTC (17 years, 2 months ago) by ad
Branches: vmlocking
Diff to: previous 1.11.2.13: preferred, colored
Changes since revision 1.11.2.13: +10 -10 lines
Sync with head.

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

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

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

Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Sep 10 11:34:10 2007 UTC (17 years, 3 months ago) by skrll
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +7 -7 lines
Merge nick-csl-alignment.

Revision 1.1.18.2: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:40:51 2007 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.18.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.18.1: +83 -86 lines
sync with head.

Revision 1.11.2.13: download - view: text, markup, annotated - select for diffs
Fri Aug 31 14:44:36 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.11.2.12: preferred, colored
Changes since revision 1.11.2.12: +12 -5 lines
Apply a patch from yamt@: collapse MUTEX_DEFAULT and MUTEX_DRIVER to mean
the same thing. Only enable adaptive mutexes for IPL_SOFTBIO and IPL_NONE
right now.

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

Revision 1.11.2.11: download - view: text, markup, annotated - select for diffs
Tue Aug 14 10:18:50 2007 UTC (17 years, 4 months ago) by yamt
Branches: vmlocking
Diff to: previous 1.11.2.10: preferred, colored
Changes since revision 1.11.2.10: +15 -3 lines
mutex_vector_exit: fix a lock/unlock inversion.

Revision 1.11.2.10: download - view: text, markup, annotated - select for diffs
Sun Jul 29 11:43:23 2007 UTC (17 years, 4 months ago) by ad
Branches: vmlocking
Diff to: previous 1.11.2.9: preferred, colored
Changes since revision 1.11.2.9: +93 -149 lines
Simplify the code a bit.

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 18 13:36:18 2007 UTC (17 years, 4 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +7 -7 lines
Initial work on provided correctly aligned __cpu_simple_lock_t for hppa
and first attempt at adapting i386 to the changes.

More to come.

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

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

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

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

Revision 1.11.2.8: download - view: text, markup, annotated - select for diffs
Fri Jun 8 14:17:20 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.11.2.7: preferred, colored
Changes since revision 1.11.2.7: +3 -47 lines
Sync with head.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu May 17 14:51:40 2007 UTC (17 years, 6 months ago) by yamt
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -49 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.11.2.7: download - view: text, markup, annotated - select for diffs
Sun May 13 17:36:35 2007 UTC (17 years, 7 months ago) by ad
Branches: vmlocking
Diff to: previous 1.11.2.6: preferred, colored
Changes since revision 1.11.2.6: +13 -9 lines
- Pass the error number and residual count to biodone(), and let it handle
  setting error indicators. Prepare to eliminate B_ERROR.
- Add a flag argument to brelse() to be set into the buf's flags, instead
  of doing it directly. Typically used to set B_INVAL.
- Add a "struct cpu_info *" argument to kthread_create(), to be used to
  create bound threads. Change "bool mpsafe" to "int flags".
- Allow exit of LWPs in the IDL state when (l != curlwp).
- More locking fixes & conversion to the new API.

Revision 1.4.2.6: download - view: text, markup, annotated - select for diffs
Thu Apr 19 04:19:43 2007 UTC (17 years, 7 months ago) by ad
Branches: yamt-idlelwp
Diff to: previous 1.4.2.5: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.2.5: +2 -4 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.13.4.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 06:47:30 2007 UTC (17 years, 7 months ago) by thorpej
Branches: thorpej-atomic
Diff to: previous 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13: +9 -2 lines
In the simple case, provide a generic CAS macro if the MD header does
not provide one.

Revision 1.11.2.6: download - view: text, markup, annotated - select for diffs
Tue Apr 10 22:33:13 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.11.2.5: preferred, colored
Changes since revision 1.11.2.5: +10 -35 lines
Partially back out 1.11.2.4. It does not work with more than two CPUs,
and blocking is the best way to solve the problem. The issue with
pressure on other locks has been fixed by restoring kernel priority to
objects blocking on turnstiles.

Revision 1.11.2.5: download - view: text, markup, annotated - select for diffs
Tue Apr 10 18:34:04 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.11.2.4: preferred, colored
Changes since revision 1.11.2.4: +2 -4 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.11.2.4: download - view: text, markup, annotated - select for diffs
Fri Apr 6 12:26:44 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.11.2.3: preferred, colored
Changes since revision 1.11.2.3: +51 -24 lines
- Blocking in order to avoid deadlocking against the kernel_lock turns
  out to be not so good, since it puts a lot of back pressure onto other
  locks. Instead, just drop kernel_lock and re-acquire it when returning
  from mutex_vector_exit. In the LOCKDEBUG case, continue to block as it
  helps to expose locking bugs.
- Allow NODEBUG mutexes to be spin mutexes, also. To be revisited.

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

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

Revision 1.11.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 13 17:50:54 2007 UTC (17 years, 9 months ago) by ad
Branches: vmlocking
Diff to: previous 1.11.2.1: preferred, colored
Changes since revision 1.11.2.1: +19 -2 lines
Pull in the initial set of changes for the vmlocking branch.

Revision 1.11.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 13 16:51:54 2007 UTC (17 years, 9 months ago) by ad
Branches: vmlocking
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +9 -6 lines
Sync with head.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Mar 12 22:34:08 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, reinoud-bufcleanup
Branch point for: thorpej-atomic
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -4 lines
mutex_vector_enter: put a read memory barrier between the final check that
(1) the holder is no longer running and (2) the waiters bit is set. Needed
to ensure that the operations happen in the correct order.

Revision 1.4.2.4: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:58:35 2007 UTC (17 years, 9 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.4.2.3: preferred, colored
Changes since revision 1.4.2.3: +26 -17 lines
Sync with HEAD.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Mar 12 02:19:14 2007 UTC (17 years, 9 months ago) by matt
Branches: MAIN
Branch point for: mjf-ufs-trans
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +7 -4 lines
Define/use MUTEX_COUNT_BIAS for those implementations that need one (like
vax).

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Mar 10 16:01:13 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
Branch point for: vmlocking
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +8 -3 lines
Add a MUTEX_NODEBUG type that avoids allocating debugging resources for
the lock. To be used for e.g. struct vm_page until a better way is found.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Mar 9 14:08:26 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -6 lines
mutex_onproc: remove unnecessary memory barriers.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Mar 4 21:06:13 2007 UTC (17 years, 9 months ago) by mrg
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -3 lines
change an error message from:
	Mutex error: sched_unlock_idle: sched_unlock_idle
to
	Mutex error: sched_unlock_idle: sched_mutex not locked

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Mar 3 10:08:19 2007 UTC (17 years, 9 months ago) by itohy
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +11 -7 lines
Remove extra space so that symbol renaming works properly.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Mar 2 13:14:12 2007 UTC (17 years, 9 months ago) by itohy
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +5 -5 lines
kern_mutex.c:190: macro `MUTEX_RECEIVE' used without args
kern_mutex.c:199: macro `MUTEX_RECEIVE' used without args
kern_mutex.c:206: macro `MUTEX_GIVE' used without args

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

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Feb 26 19:11:28 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +9 -15 lines
- Nuke mutex_owner()
- mutex_getowner() -> mutex_owner()

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

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

Revision 1.4.2.2: download - view: text, markup, annotated - select for diffs
Sun Feb 18 14:09:54 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.4.2.1: preferred, colored
Changes since revision 1.4.2.1: +1 -1 lines
update a comment.

Revision 1.4.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 17 10:30:57 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -46 lines
- separate context switching and thread scheduling.
- introduce idle lwp.
- change some related MD/MI interfaces and implement i386 version.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Feb 15 15:49:27 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
Branch point for: yamt-idlelwp
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +34 -4 lines
- Add a mutex_wakeup() which clears the waiters flag and wakes all waiters.
  Will be needed to fix a problem with mutexes on sparc.
- mutex_tryenter(): fix a false "locking against myself" error.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat Feb 10 21:07:52 2007 UTC (17 years, 10 months ago) by ad
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +13 -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:30 2007 UTC (17 years, 10 months ago) by ad
Branches: MAIN
CVS tags: post-newlock2-merge
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +864 -0 lines
Merge newlock2 to head.

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

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

Revision 1.1.36.19: download - view: text, markup, annotated - select for diffs
Mon Feb 5 16:31:49 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.18: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.18: +4 -4 lines
Don't signal the lockdebug code that we want to acquire a spin mutex
before raising the SPL, otherwise a spurious 'locking against myself'
error could be triggered.

Revision 1.1.36.18: download - view: text, markup, annotated - select for diffs
Sat Feb 3 16:35:30 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.17: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.17: +7 -3 lines
Play nicer when the system is panicing/cold.

Revision 1.1.36.17: download - view: text, markup, annotated - select for diffs
Thu Feb 1 05:36:20 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.16: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.16: +10 -7 lines
Handle hppa weirdness.

Revision 1.1.36.16: download - view: text, markup, annotated - select for diffs
Wed Jan 31 13:09:11 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.15: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.15: +11 -2 lines
Catch deadlocks earlier.

Revision 1.1.36.15: download - view: text, markup, annotated - select for diffs
Tue Jan 30 11:45:28 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.14: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.14: +8 -4 lines
For now always call sched_unlock_idle/sched_lock_idle. They will be
removed by yamt's cpu_switchto() changes.

Revision 1.1.36.14: download - view: text, markup, annotated - select for diffs
Sun Jan 28 07:20:38 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.13: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.13: +29 -19 lines
- Fix sequence error between saving/raising the SPL.
- Changes for JavaStation.
- Fix bugs with mips & sparc support routines.

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

Revision 1.1.36.12: download - view: text, markup, annotated - select for diffs
Wed Jan 17 20:26:36 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.11: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.11: +25 -31 lines
Fix detection of deadlock against the big lock.

Revision 1.1.36.11: download - view: text, markup, annotated - select for diffs
Tue Jan 16 01:26:20 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.10: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.10: +5 -7 lines
Minor corrections.

Revision 1.1.36.10: download - view: text, markup, annotated - select for diffs
Fri Jan 12 20:18:29 2007 UTC (17 years, 11 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.9: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.9: +16 -15 lines
Fix 'SPL NOT LOWERED ON SYSCALL EXIT' with amd64.

Revision 1.1.36.9: download - view: text, markup, annotated - select for diffs
Fri Jan 12 01:04:06 2007 UTC (17 years, 11 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: +8 -10 lines
Sync with head.

Revision 1.1.36.8: download - view: text, markup, annotated - select for diffs
Thu Jan 11 22:22:59 2007 UTC (17 years, 11 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: +86 -27 lines
Checkpoint work in progress.

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

Revision 1.1.36.6: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:39:22 2006 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.5: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.5: +5 -4 lines
Sync with head.

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

Revision 1.1.36.4: download - view: text, markup, annotated - select for diffs
Tue Oct 24 21:02:06 2006 UTC (18 years, 1 month 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: +14 -11 lines
Compile fixes.

Revision 1.1.36.3: download - view: text, markup, annotated - select for diffs
Fri Oct 20 19:45:13 2006 UTC (18 years, 1 month ago) by ad
Branches: newlock2
Diff to: previous 1.1.36.2: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.36.2: +73 -75 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, 3 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:41 2006 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +526 -0 lines
Add updated locking primatives.

Revision 1.1.2.9: download - view: text, markup, annotated - select for diffs
Fri Mar 22 18:49:01 2002 UTC (22 years, 8 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.8: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.8: +4 -2 lines
Wrap the stuff that manipulates the guts of a mutex in __MUTEX_PRIVATE.

Revision 1.1.2.8: download - view: text, markup, annotated - select for diffs
Fri Mar 22 01:45:51 2002 UTC (22 years, 8 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.7: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.7: +4 -4 lines
Cast the return value of __builtin_return_address().

Revision 1.1.2.7: download - view: text, markup, annotated - select for diffs
Fri Mar 22 00:15:54 2002 UTC (22 years, 8 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.6: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.6: +51 -6 lines
Add some minimal mutex debugging infrastructure.
* struct mutex_debug_info, which MD code adds to the kmutex_t
  when MUTEX_DEBUG is defined, contains the PC values of the
  last-locked and last-unlocked.
* MD code is expected to set last-locked in the enter fast path.
* MD code is expected to always call mutex_vector_exit() in the
  exit case.

Note: this code relies on MD code performing a tail-call to the
slow-path.

Revision 1.1.2.6: download - view: text, markup, annotated - select for diffs
Sat Mar 16 20:57:42 2002 UTC (22 years, 9 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.5: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.5: +3 -3 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.5: download - view: text, markup, annotated - select for diffs
Sat Mar 16 03:46:37 2002 UTC (22 years, 9 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.4: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.4: +4 -3 lines
Make turnstiles actually have two queues (reader and writer).  Users
of turnsitles still don't differentiate between them.

Revision 1.1.2.4: download - view: text, markup, annotated - select for diffs
Tue Mar 12 07:51:38 2002 UTC (22 years, 9 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.3: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.3: +9 -4 lines
mutex_vector_exit(): be more informative if we panic.

Revision 1.1.2.3: download - view: text, markup, annotated - select for diffs
Tue Mar 12 00:07:31 2002 UTC (22 years, 9 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.2: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.2: +18 -2 lines
Implement mutex_owned() (returns true if current thread owns mutex).

Revision 1.1.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 11 17:08:35 2002 UTC (22 years, 9 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1.2.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.1: +17 -2 lines
Implement mutex_owner().

Revision 1.1.2.1: download - view: text, markup, annotated - select for diffs
Sun Mar 10 21:39:48 2002 UTC (22 years, 9 months ago) by thorpej
Branches: newlock
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +248 -0 lines
New kernel mutex implementation, modeled after those found in Solaris
and described in:

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

Both adaptive (spin/sleep) and spin (spin + block interrupts) mutexes
are implemented.  See <sys/mutex.h> for the support that machine-dependent
code must supply.

Revision 1.1
Sun Mar 10 21:39:48 2002 UTC (22 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, thorpej-vnode-attr-base, thorpej-vnode-attr, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, rpaulo-netinet-merge-pcb-base, rpaulo-netinet-merge-pcb, newlock2-nbase, newlock2-base, nathanw_sa_before_merge, nathanw_sa_base, ktrace-lwp-base, ktrace-lwp, kqueue-base, kent-audio2-base, kent-audio2, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, gehenna-devsw, gdamore-uart-base, gdamore-uart, elad-kernelauth-nbase, eeh-devprop-base, eeh-devprop
Branch point for: yamt-lazymbuf, newlock2, newlock
FILE REMOVED
file kern_mutex.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>