The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.184 / (download) - annotate - [select for diffs], Sun Apr 9 08:17:36 2023 UTC (8 weeks ago) by riastradh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.183: +16 -13 lines
Diff to previous 1.183 (colored)

ASSERT_SLEEPABLE(9): Micro-optimize this a little bit.

This convinces gcc to do less -- make a smaller stack frame, compute
fewer conditional moves in favour of predicted-not-taken branches --
in the fast path where we are sleepable as the caller expects.

Wasn't able to convince it to do the ncsw loop with a
predicted-not-taken branch, but let's leave the __predict_false in
there anyway because it's still a good prediction.

Revision 1.183 / (download) - annotate - [select for diffs], Thu Feb 23 14:57:29 2023 UTC (3 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.182: +22 -16 lines
Diff to previous 1.182 (colored)

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.182 / (download) - annotate - [select for diffs], Fri Jan 27 09:28:41 2023 UTC (4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.181: +3 -3 lines
Diff to previous 1.181 (colored)

Sprinkle __predict_{true,false} for panicstr checks

Revision 1.181 / (download) - annotate - [select for diffs], Wed Oct 26 23:28:18 2022 UTC (7 months, 1 week ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10
Changes since 1.180: +2 -3 lines
Diff to previous 1.180 (colored)

kern/kern_lock.c: We get start_init_exec from sys/kernel.h now.

Revision 1.180 / (download) - annotate - [select for diffs], Tue Sep 13 09:28:05 2022 UTC (8 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.179: +5 -3 lines
Diff to previous 1.179 (colored)

KERNEL_LOCK(9): Avoid spinning out until 10sec have passed.

This means we'll never spin out if the hardclock timer is stuck.  But
the hardclock timer never runs with the kernel lock held itself, so
it's not immediately clear that's important.

Revision 1.179 / (download) - annotate - [select for diffs], Tue Sep 13 09:14:26 2022 UTC (8 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.178: +3 -3 lines
Diff to previous 1.178 (colored)

KERNEL_LOCK(9): Restore backoff while spinning in !LOCKDEBUG case.

When the spinout logic was put under LOCKDEBUG among a series of
other changes that got reverted, the backoff was inadvertently made
LOCKDEBUG-only too.

Revision 1.178 / (download) - annotate - [select for diffs], Sat Aug 20 23:37:12 2022 UTC (9 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.177: +5 -6 lines
Diff to previous 1.177 (colored)

KERNEL_LOCK(9): Limit ipi trace diagnostic to after init has started.

Revision 1.177 / (download) - annotate - [select for diffs], Tue Aug 16 21:23:37 2022 UTC (9 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.176: +4 -2 lines
Diff to previous 1.176 (colored)

KERNEL_LOCK(9): Fix previous for non-LOCKDEBUG builds.

Revision 1.176 / (download) - annotate - [select for diffs], Tue Aug 16 18:13:09 2022 UTC (9 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.175: +3 -2 lines
Diff to previous 1.175 (colored)

KERNEL_LOCK(9): Record kernel lock holder in fast path too.

Revision 1.175 / (download) - annotate - [select for diffs], Tue Aug 16 16:25:16 2022 UTC (9 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.174: +4 -2 lines
Diff to previous 1.174 (colored)

KERNEL_LOCK(9): Need kpreempt_disable to ipi_send, oops.

Revision 1.174 / (download) - annotate - [select for diffs], Tue Aug 16 00:26:39 2022 UTC (9 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.173: +28 -2 lines
Diff to previous 1.173 (colored)

KERNEL_LOCK(9): Send an IPI to print holder's stack trace on spinout.

Revision 1.173 / (download) - annotate - [select for diffs], Sun Oct 31 16:26:26 2021 UTC (19 months ago) by skrll
Branch: MAIN
Changes since 1.172: +3 -4 lines
Diff to previous 1.172 (colored)

Revert the 2015 change I made that allowed sleeping in the idle lwp
if it wasn't running yet, e.g. in cpu_hatch
---
 sys/kern/kern_lock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 40557427de86..c0c9d8adaf9e 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -89,8 +89,7 @@ assert_sleepable(void)
 	} while (pctr != lwp_pctr());

 	reason = NULL;
-	if (idle && !cold &&
-	    kcpuset_isset(kcpuset_running, cpu_index(curcpu()))) {
+	if (idle && !cold) {
 		reason = "idle";
 	}
 	if (cpu_intr_p()) {
--
2.25.1

Revision 1.171.2.1 / (download) - annotate - [select for diffs], Sun Jan 3 16:35:04 2021 UTC (2 years, 5 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.171: +2 -6 lines
Diff to previous 1.171 (colored) next main 1.172 (colored)

Sync w/ HEAD.

Revision 1.172 / (download) - annotate - [select for diffs], Tue Dec 22 01:57:29 2020 UTC (2 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.171: +2 -6 lines
Diff to previous 1.171 (colored)

Comments.

Revision 1.171 / (download) - annotate - [select for diffs], Sat May 2 09:13:40 2020 UTC (3 years, 1 month ago) by martin
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.170: +3 -3 lines
Diff to previous 1.170 (colored)

Fix inverted condition in r1.136 - we do want LOCKDEBUG spinouts of the
kernel lock to assert as soon as we have userland running - not in
the early boot phase (where firmware loading and device init could take
a long time).

Revision 1.161.4.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:51 2020 UTC (3 years, 1 month ago) by martin
Branch: phil-wifi
Changes since 1.161.4.1: +33 -6 lines
Diff to previous 1.161.4.1 (colored) to branchpoint 1.161 (colored) next main 1.162 (colored)

Merge changes from current as of 20200406

Revision 1.170 / (download) - annotate - [select for diffs], Sun Mar 8 15:05:18 2020 UTC (3 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.169: +2 -22 lines
Diff to previous 1.169 (colored)

Kill off kernel_lock_plug_leak(), and go back to dropping kernel_lock in
exit1(), since there seems little hope of finding the leaking code any
time soon.  Can still be caught with LOCKDEBUG.

Revision 1.164.2.3 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:02 2020 UTC (3 years, 3 months ago) by ad
Branch: ad-namecache
Changes since 1.164.2.2: +35 -2 lines
Diff to previous 1.164.2.2 (colored) to branchpoint 1.164 (colored) next main 1.165 (colored)

Sync with head.

Revision 1.169 / (download) - annotate - [select for diffs], Mon Feb 10 22:11:09 2020 UTC (3 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.168: +4 -2 lines
Diff to previous 1.168 (colored)

Put back the delay hooks which were deleted before. Without them VirtualBox
spins out.

Revision 1.168 / (download) - annotate - [select for diffs], Mon Jan 27 21:05:43 2020 UTC (3 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.167: +33 -2 lines
Diff to previous 1.167 (colored)

Add a kernel_lock_plug_leak() that drops any holds and tries to identify
the baddy.

Revision 1.164.2.2 / (download) - annotate - [select for diffs], Sat Jan 25 22:38:51 2020 UTC (3 years, 4 months ago) by ad
Branch: ad-namecache
Changes since 1.164.2.1: +9 -11 lines
Diff to previous 1.164.2.1 (colored) to branchpoint 1.164 (colored)

Sync with head.

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

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

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

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

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

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

Revision 1.164.2.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:35 2020 UTC (3 years, 4 months ago) by ad
Branch: ad-namecache
Changes since 1.164: +24 -10 lines
Diff to previous 1.164 (colored)

Sync with head.

Revision 1.165 / (download) - annotate - [select for diffs], Fri Jan 17 20:26:22 2020 UTC (3 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base1
Changes since 1.164: +24 -10 lines
Diff to previous 1.164 (colored)

kernel_lock:

- Defer setting ci_biglock_wanted for a bit, because if curlwp holds a mutex
  or rwlock, and otherlwp is spinning waiting for the mutex/rwlock, setting
  ci_biglock_wanted causes otherlwp to block to avoid deadlock.  If the spin
  on kernel_lock is short there's no point causing trouble.

- Do exponential backoff.

- Put the spinout check under LOCKDEBUG to match the others.

Revision 1.164 / (download) - annotate - [select for diffs], Tue Dec 3 15:20:59 2019 UTC (3 years, 6 months ago) by riastradh
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.163: +4 -2 lines
Diff to previous 1.163 (colored)

Use __insn_barrier to enforce ordering in l_ncsw loops.

(Only need ordering observable by interruption, not by other CPUs.)

Revision 1.161.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:03 2019 UTC (3 years, 11 months ago) by christos
Branch: phil-wifi
Changes since 1.161: +6 -6 lines
Diff to previous 1.161 (colored)

Sync with HEAD

Revision 1.163 / (download) - annotate - [select for diffs], Thu May 9 05:00:31 2019 UTC (4 years ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.162: +5 -5 lines
Diff to previous 1.162 (colored)

Avoid prepending a timestamp to lock debug outputs on ddb

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

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

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

Revision 1.162 / (download) - annotate - [select for diffs], Thu May 9 04:53:52 2019 UTC (4 years ago) by ozaki-r
Branch: MAIN
Changes since 1.161: +4 -4 lines
Diff to previous 1.161 (colored)

Make _kernel_lock_dump static

Revision 1.158.6.2 / (download) - annotate - [select for diffs], Sat Jan 13 21:57:11 2018 UTC (5 years, 4 months ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.158.6.1: +5 -5 lines
Diff to previous 1.158.6.1 (colored) to branchpoint 1.158 (colored) next main 1.159 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #495):
	lib/librumpuser/rumpfiber.c: revision 1.13
	lib/librumpuser/rumpuser_pth.c: revision 1.46
	lib/librumpuser/rumpuser_pth_dummy.c: revision 1.18
	sys/kern/kern_condvar.c: revision 1.40
	sys/kern/kern_lock.c: revision 1.161
	sys/kern/kern_mutex.c: revision 1.68
	sys/kern/kern_rwlock.c: revision 1.48
	sys/rump/include/rump/rumpuser.h: revision 1.115
	sys/rump/librump/rumpkern/locks.c: revision 1.76-1.79
Apply C99-style struct initialization to lockops_t
--
Tweak LOCKDEBUG macros (NFC)
--
Distinguish spin mutex and adaptive mutex on rump kernels for LOCKDEBUG
Formerly rump kernels treated the two types of mutexes as both adaptive for
LOCKDEBUG for some reasons.
Now we can detect violations of mutex restrictions on rump kernels such as
taking an adaptive mutex with holding a spin mutex as well as normal kernels.
--
rump: check if the mutex is surely owned by the caller in mutex_exit
Unlocking a not-owned mutex wasn't detected well (it could detect if the mutex
is not held by anyone but that's not enough). Let's check it (the check is the
same as normal kernel's mutex).
If LOCKDEBUG is enabled, give the check over LOCKDEBUG because it can provide
better debugging information.

Revision 1.161 / (download) - annotate - [select for diffs], Mon Dec 25 09:13:40 2017 UTC (5 years, 5 months ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi
Changes since 1.160: +5 -5 lines
Diff to previous 1.160 (colored)

Apply C99-style struct initialization to lockops_t

Revision 1.153.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:44 2017 UTC (5 years, 6 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.153.2.2: +10 -5 lines
Diff to previous 1.153.2.2 (colored) to branchpoint 1.153 (colored) next main 1.154 (colored)

update from HEAD

Revision 1.158.6.1 / (download) - annotate - [select for diffs], Thu Nov 30 14:40:46 2017 UTC (5 years, 6 months ago) by martin
Branch: netbsd-8
Changes since 1.158: +6 -2 lines
Diff to previous 1.158 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #405):
	sys/sys/pserialize.h: revision 1.2
	sys/kern/kern_lock.c: revision 1.160
	sys/kern/subr_pserialize.c: revision 1.9
	sys/rump/librump/rumpkern/emul.c: revision 1.184
	sys/rump/librump/rumpkern/emul.c: revision 1.185
	sys/rump/librump/rumpkern/rump.c: revision 1.330
Implement debugging feature for pserialize(9)
The debugging feature detects violations of pserialize constraints.
It causes a panic:
- if a context switch happens in a read section, or
- if a sleepable function is called in a read section.
The feature is enabled only if LOCKDEBUG is on.
Discussed on tech-kern@
Add missing inclusion of pserialize.h (fix build)

Revision 1.160 / (download) - annotate - [select for diffs], Tue Nov 21 08:49:14 2017 UTC (5 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.159: +6 -2 lines
Diff to previous 1.159 (colored)

Implement debugging feature for pserialize(9)

The debugging feature detects violations of pserialize constraints.
It causes a panic:
- if a context switch happens in a read section, or
- if a sleepable function is called in a read section.

The feature is enabled only if LOCKDEBUG is on.

Discussed on tech-kern@

Revision 1.159 / (download) - annotate - [select for diffs], Sat Sep 16 23:55:33 2017 UTC (5 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.158: +4 -4 lines
Diff to previous 1.158 (colored)

more const

Revision 1.157.4.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:02 2017 UTC (6 years, 1 month ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.157: +3 -3 lines
Diff to previous 1.157 (colored) next main 1.158 (colored)

Sync with HEAD

Revision 1.157.2.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:47 2017 UTC (6 years, 2 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.157: +3 -3 lines
Diff to previous 1.157 (colored) next main 1.158 (colored)

Sync with HEAD

Revision 1.155.6.2 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:56 2017 UTC (6 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.155.6.1: +3 -3 lines
Diff to previous 1.155.6.1 (colored) to branchpoint 1.155 (colored) next main 1.156 (colored)

Sync with HEAD

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

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

Revision 1.155.4.1 / (download) - annotate - [select for diffs], Tue Jan 5 22:16:44 2016 UTC (7 years, 4 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Changes since 1.155: +4 -3 lines
Diff to previous 1.155 (colored) next main 1.156 (colored)

Pull up following revision(s) (requested by skrll in ticket #1056):
	sys/kern/kern_lock.c: revision 1.156
Allow sleeping in the idle lwp if the cpu isn't running yet.
OK'ed by rmind a while ago.

Revision 1.155.6.1 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:21 2015 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.155: +5 -4 lines
Diff to previous 1.155 (colored)

Sync with HEAD

Revision 1.157 / (download) - annotate - [select for diffs], Sat Apr 11 15:24:25 2015 UTC (8 years, 1 month ago) by skrll
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.156: +3 -3 lines
Diff to previous 1.156 (colored)

Trailing whitespace

Revision 1.156 / (download) - annotate - [select for diffs], Sat Apr 11 15:23:56 2015 UTC (8 years, 1 month ago) by skrll
Branch: MAIN
Changes since 1.155: +4 -3 lines
Diff to previous 1.155 (colored)

Allow sleeping in the idle lwp if the cpu isn't running yet.

OK'ed by rmind a while ago.

Revision 1.153.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (8 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.153.2.1: +1 -1 lines
Diff to previous 1.153.2.1 (colored) to branchpoint 1.153 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.151.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.151.2.2: +4 -4 lines
Diff to previous 1.151.2.2 (colored) to branchpoint 1.151 (colored) next main 1.152 (colored)

sync with head.

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

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

Revision 1.154.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:07 2014 UTC (9 years ago) by rmind
Branch: rmind-smpnet
Changes since 1.154: +3 -3 lines
Diff to previous 1.154 (colored) next main 1.155 (colored)

sync with head

Revision 1.155 / (download) - annotate - [select for diffs], Sat Sep 14 20:24:22 2013 UTC (9 years, 8 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-base, 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
Branch point for: nick-nhusb, netbsd-7
Changes since 1.154: +3 -3 lines
Diff to previous 1.154 (colored)

Move a CTASSERT to global scope (easiest way to avoid gcc 4.8.1 local unused
typedef warnings)

Revision 1.153.2.1 / (download) - annotate - [select for diffs], Sun Jun 23 06:18:57 2013 UTC (9 years, 11 months ago) by tls
Branch: tls-maxphys
Changes since 1.153: +3 -3 lines
Diff to previous 1.153 (colored)

resync from head

Revision 1.154 / (download) - annotate - [select for diffs], Sat Apr 27 08:12:34 2013 UTC (10 years, 1 month ago) by mlelstv
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Changes since 1.153: +3 -3 lines
Diff to previous 1.153 (colored)

Revert change that allowed rw_tryenter(&lock, RW_READER) to recurse
for vfs_busy(). This is no longer necessary.

Revision 1.151.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:29 2012 UTC (10 years, 7 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.151.2.1: +3 -3 lines
Diff to previous 1.151.2.1 (colored) to branchpoint 1.151 (colored)

sync with head

Revision 1.153 / (download) - annotate - [select for diffs], Thu Aug 30 02:23:14 2012 UTC (10 years, 9 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.152: +3 -3 lines
Diff to previous 1.152 (colored)

Use __cacheline_aligned

Revision 1.151.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:24 2012 UTC (11 years, 1 month ago) by yamt
Branch: yamt-pagecache
Changes since 1.151: +8 -2 lines
Diff to previous 1.151 (colored)

sync with head

Revision 1.152 / (download) - annotate - [select for diffs], Sun Nov 27 03:24:00 2011 UTC (11 years, 6 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp
Changes since 1.151: +8 -2 lines
Diff to previous 1.151 (colored)

add KERNEL_LOCKED_P() macro

Revision 1.151 / (download) - annotate - [select for diffs], Sun Jul 17 20:54:52 2011 UTC (11 years, 10 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.150: +2 -3 lines
Diff to previous 1.150 (colored)

Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.

Revision 1.137.4.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:16 2010 UTC (13 years, 2 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.137.4.4: +4 -5 lines
Diff to previous 1.137.4.4 (colored) to branchpoint 1.137 (colored) next main 1.138 (colored)

sync with head

Revision 1.150 / (download) - annotate - [select for diffs], Sun Dec 20 20:42:23 2009 UTC (13 years, 5 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, rmind-uvmplock-nbase, rmind-uvmplock-base, rmind-uvmplock, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.149: +4 -5 lines
Diff to previous 1.149 (colored)

remove dated and wrong comments about curlwp being NULL.
_kernel_{,un}lock() always assume it is valid now.

Revision 1.137.4.4 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:16 2009 UTC (13 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.137.4.3: +3 -3 lines
Diff to previous 1.137.4.3 (colored) to branchpoint 1.137 (colored)

sync with head.

Revision 1.147.4.1 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:34 2009 UTC (13 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.147: +17 -5 lines
Diff to previous 1.147 (colored) next main 1.148 (colored)

Sync with HEAD.

Revision 1.149 / (download) - annotate - [select for diffs], Fri Jul 17 22:17:37 2009 UTC (13 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase
Changes since 1.148: +3 -3 lines
Diff to previous 1.148 (colored)

Fix spelling: situatations -> situations.

Revision 1.137.4.3 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:31 2009 UTC (13 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.137.4.2: +17 -5 lines
Diff to previous 1.137.4.2 (colored) to branchpoint 1.137 (colored)

sync with head

Revision 1.148 / (download) - annotate - [select for diffs], Sat May 23 17:08:04 2009 UTC (14 years ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5
Changes since 1.147: +17 -5 lines
Diff to previous 1.147 (colored)

- Add lwp_pctr(), get an LWP's preemption/ctxsw counter.
- Fix a preemption bug in CURCPU_IDLE_P() that can lead to a bogus
  assertion failure on DEBUG kernels.
- Fix MP/preemption races with timecounter detachment.

Revision 1.137.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:46 2009 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.137.4.1: +8 -22 lines
Diff to previous 1.137.4.1 (colored) to branchpoint 1.137 (colored)

sync with head.

Revision 1.146.4.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:38 2009 UTC (14 years, 4 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.146: +2 -4 lines
Diff to previous 1.146 (colored) next main 1.147 (colored)

Sync with HEAD.

Revision 1.134.6.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:18 2009 UTC (14 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.134.6.4: +0 -2 lines
Diff to previous 1.134.6.4 (colored) to branchpoint 1.134 (colored) next main 1.135 (colored)

Sync with HEAD.

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

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

Revision 1.147 / (download) - annotate - [select for diffs], Wed Nov 12 12:36:16 2008 UTC (14 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base, jym-xensuspend-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: jym-xensuspend
Changes since 1.146: +2 -4 lines
Diff to previous 1.146 (colored)

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.

Revision 1.141.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:42 2008 UTC (14 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.141.2.1: +3 -14 lines
Diff to previous 1.141.2.1 (colored) to branchpoint 1.141 (colored) next main 1.142 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.144.2.2 / (download) - annotate - [select for diffs], Thu Jul 3 18:38:11 2008 UTC (14 years, 11 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.144.2.1: +3 -3 lines
Diff to previous 1.144.2.1 (colored) to branchpoint 1.144 (colored) next main 1.145 (colored)

Sync with head.

Revision 1.134.6.4 / (download) - annotate - [select for diffs], Wed Jul 2 19:08:20 2008 UTC (14 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.134.6.3: +1 -1 lines
Diff to previous 1.134.6.3 (colored) to branchpoint 1.134 (colored)

Sync with HEAD.

Revision 1.146 / (download) - annotate - [select for diffs], Wed Jul 2 14:47:34 2008 UTC (14 years, 11 months ago) by matt
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base, 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, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, haad-dm
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored)

Switch from KASSERT to CTASSERT for those asserts testing sizes of types.

Revision 1.134.6.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:14 2008 UTC (14 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.134.6.2: +0 -11 lines
Diff to previous 1.134.6.2 (colored) to branchpoint 1.134 (colored)

Sync with HEAD.

Revision 1.144.2.1 / (download) - annotate - [select for diffs], Fri Jun 27 15:11:39 2008 UTC (14 years, 11 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.144: +2 -13 lines
Diff to previous 1.144 (colored)

Sync with head.

Revision 1.145 / (download) - annotate - [select for diffs], Wed Jun 25 13:16:58 2008 UTC (14 years, 11 months ago) by pooka
Branch: MAIN
Changes since 1.144: +2 -13 lines
Diff to previous 1.144 (colored)

Don't compile kern_lock for rump any more, it's no longer required.
Allows us to get rid of the incorrect _RUMPKERNEL ifdefs outside sys/rump.

Revision 1.141.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:50 2008 UTC (14 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.141: +7 -8 lines
Diff to previous 1.141 (colored)

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

Revision 1.137.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:39 2008 UTC (15 years ago) by yamt
Branch: yamt-pf42
Changes since 1.137.2.1: +7 -8 lines
Diff to previous 1.137.2.1 (colored) to branchpoint 1.137 (colored) next main 1.138 (colored)

sync with head

Revision 1.134.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:08 2008 UTC (15 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.134.6.1: +20 -22 lines
Diff to previous 1.134.6.1 (colored) to branchpoint 1.134 (colored)

Sync with HEAD.

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

LOCKDEBUG:

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

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

Revision 1.143 / (download) - annotate - [select for diffs], Tue May 27 17:50:03 2008 UTC (15 years ago) by ad
Branch: MAIN
Changes since 1.142: +3 -3 lines
Diff to previous 1.142 (colored)

Replace a couple of tsleep calls with cv_wait.

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

Reduce ifdefs due to MULTIPROCESSOR slightly.

Revision 1.137.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:08 2008 UTC (15 years ago) by yamt
Branch: yamt-pf42
Changes since 1.137: +17 -18 lines
Diff to previous 1.137 (colored)

sync with head.

Revision 1.137.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:25 2008 UTC (15 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.137: +17 -18 lines
Diff to previous 1.137 (colored)

sync with head.

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

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

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

Remove clause 3 and 4 from TNF licenses

Revision 1.139 / (download) - annotate - [select for diffs], Mon Apr 28 15:36:01 2008 UTC (15 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.138: +2 -0 lines
Diff to previous 1.138 (colored)

Add MI code to support in-kernel preemption. Preemption is deferred by
one of the following:

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

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

Revision 1.138 / (download) - annotate - [select for diffs], Sun Apr 27 14:13:05 2008 UTC (15 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.137: +14 -10 lines
Diff to previous 1.137 (colored)

Extend spl protection to keep all kernel_lock state in sync. There could
have been problems before. This might help with the assertion failures
seen on sparc64.

Revision 1.134.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:01 2008 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.134: +32 -16 lines
Diff to previous 1.134 (colored)

Sync with HEAD.

Revision 1.137 / (download) - annotate - [select for diffs], Tue Apr 1 19:49:31 2008 UTC (15 years, 2 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.136: +6 -10 lines
Diff to previous 1.136 (colored)

remove useless passing of the lwp from the KERNEL_LOCK() ABI
(not the API; this would be easy as well)
agreed (a while ago) by ad

Revision 1.136 / (download) - annotate - [select for diffs], Sun Mar 30 15:39:46 2008 UTC (15 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.135: +5 -3 lines
Diff to previous 1.135 (colored)

Don't report kernel lock spinouts if init has not yet started.
XXX This should be backed out when we are sure that the drivers
are good citizens and configure nicely with interrupts enabled /
the system running.

Revision 1.134.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:13 2008 UTC (15 years, 2 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.134: +25 -7 lines
Diff to previous 1.134 (colored) next main 1.135 (colored)

sync with head.

Revision 1.118.6.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:59 2008 UTC (15 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.118.6.2: +79 -588 lines
Diff to previous 1.118.6.2 (colored) to branchpoint 1.118 (colored) next main 1.119 (colored)

sync with HEAD

Revision 1.88.2.10 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:33 2008 UTC (15 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.88.2.9: +25 -7 lines
Diff to previous 1.88.2.9 (colored) next main 1.89 (colored)

sync with head.

Revision 1.135 / (download) - annotate - [select for diffs], Mon Mar 17 08:27:50 2008 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.134: +25 -7 lines
Diff to previous 1.134 (colored)

- simplify ASSERT_SLEEPABLE.
- move it from proc.h to systm.h.
- add some more checks.
- make it a little more lkm friendly.

Revision 1.124.2.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:45 2008 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.124.2.2: +62 -582 lines
Diff to previous 1.124.2.2 (colored) next main 1.125 (colored)

Sync with HEAD.

Revision 1.88.2.9 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:12 2008 UTC (15 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.88.2.8: +4 -550 lines
Diff to previous 1.88.2.8 (colored)

sync with head.

Revision 1.134 / (download) - annotate - [select for diffs], Wed Jan 30 14:54:26 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.133: +4 -540 lines
Diff to previous 1.133 (colored)

Goodbye lockmgr().

Revision 1.133 / (download) - annotate - [select for diffs], Sat Jan 26 14:29:31 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.132: +3 -13 lines
Diff to previous 1.132 (colored)

lockstat: no longer track lockmgr() events.

Revision 1.88.2.8 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:05 2008 UTC (15 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.88.2.7: +86 -60 lines
Diff to previous 1.88.2.7 (colored)

sync with head

Revision 1.129.4.3 / (download) - annotate - [select for diffs], Thu Jan 10 23:44:26 2008 UTC (15 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.129.4.2: +58 -39 lines
Diff to previous 1.129.4.2 (colored) to branchpoint 1.129 (colored) next main 1.130 (colored)

Sync with HEAD

Revision 1.132 / (download) - annotate - [select for diffs], Thu Jan 10 20:14:12 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.131: +60 -41 lines
Diff to previous 1.131 (colored)

- Fix a memory order problem with non-interlocked mutex release.
- Give kernel_lock its own cache line.

Revision 1.118.6.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:04 2008 UTC (15 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.118.6.1: +55 -144 lines
Diff to previous 1.118.6.1 (colored) to branchpoint 1.118 (colored)

sync with HEAD

Revision 1.129.4.2 / (download) - annotate - [select for diffs], Tue Jan 8 22:11:33 2008 UTC (15 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.129.4.1: +1 -0 lines
Diff to previous 1.129.4.1 (colored) to branchpoint 1.129 (colored)

Sync with HEAD

Revision 1.131 / (download) - annotate - [select for diffs], Fri Jan 4 21:18:08 2008 UTC (15 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.130: +3 -2 lines
Diff to previous 1.130 (colored)

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

Revision 1.129.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:55:52 2008 UTC (15 years, 5 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.129: +27 -21 lines
Diff to previous 1.129 (colored)

Sync with HEAD

Revision 1.130 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:50 2008 UTC (15 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.129: +27 -21 lines
Diff to previous 1.129 (colored)

Merge vmlocking2 to head.

Revision 1.128.2.5 / (download) - annotate - [select for diffs], Thu Dec 27 02:17:32 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.128.2.4: +4 -2 lines
Diff to previous 1.128.2.4 (colored) to branchpoint 1.128 (colored) next main 1.129 (colored)

Fix !lockdebug.

Revision 1.128.2.4 / (download) - annotate - [select for diffs], Thu Dec 27 01:41:29 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.128.2.3: +14 -2 lines
Diff to previous 1.128.2.3 (colored) to branchpoint 1.128 (colored)

Allocate but do not use a lockdebug record for 'struct lock' so that it's
easier to find leaks.

Revision 1.128.2.3 / (download) - annotate - [select for diffs], Mon Dec 10 19:28:05 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.128.2.2: +2 -10 lines
Diff to previous 1.128.2.2 (colored) to branchpoint 1.128 (colored)

- Don't drain the vnode lock in vclean(); reference counting and XLOCK
  should be enough.
- LK_SETRECURSE is gone.

Revision 1.118.4.8 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:17 2007 UTC (15 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.118.4.7: +16 -93 lines
Diff to previous 1.118.4.7 (colored) to branchpoint 1.118 (colored) next main 1.119 (colored)

Sync with HEAD.

Revision 1.110.6.1 / (download) - annotate - [select for diffs], Sun Dec 9 16:04:00 2007 UTC (15 years, 5 months ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.110: +16 -95 lines
Diff to previous 1.110 (colored) next main 1.111 (colored)

Pullup to HEAD

Revision 1.124.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:28 2007 UTC (15 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.124.2.1: +29 -103 lines
Diff to previous 1.124.2.1 (colored)

Sync with HEAD.

Revision 1.128.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:40 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.128.2.1: +16 -93 lines
Diff to previous 1.128.2.1 (colored) to branchpoint 1.128 (colored)

Sync with head.

Revision 1.88.2.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:43 2007 UTC (15 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.88.2.6: +29 -103 lines
Diff to previous 1.88.2.6 (colored)

sync with head

Revision 1.129 / (download) - annotate - [select for diffs], Thu Dec 6 17:05:08 2007 UTC (15 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, reinoud-bufcleanup-nbase, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.128: +16 -93 lines
Diff to previous 1.128 (colored)

Nothing uses shared -> exclusive upgrades any more, so remove the code.
This is good since they are effectively the same as ...

	lockmgr(&lock, LK_RELEASE);
	lockmgr(&lock, LK_EXCLUSIVE);

.. and therefore don't behave as expected.

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

Pull the vmlocking changes into a new branch.

Revision 1.118.4.7 / (download) - annotate - [select for diffs], Mon Dec 3 16:14:48 2007 UTC (15 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.118.4.6: +5 -4 lines
Diff to previous 1.118.4.6 (colored) to branchpoint 1.118 (colored)

Sync with HEAD.

Revision 1.128 / (download) - annotate - [select for diffs], Fri Nov 30 23:05:43 2007 UTC (15 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-base
Branch point for: vmlocking2
Changes since 1.127: +5 -4 lines
Diff to previous 1.127 (colored)

Use membar_*().

Revision 1.118.4.6 / (download) - annotate - [select for diffs], Wed Nov 21 21:55:58 2007 UTC (15 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.118.4.5: +12 -10 lines
Diff to previous 1.118.4.5 (colored) to branchpoint 1.118 (colored)

Sync with HEAD.

Revision 1.123.2.3 / (download) - annotate - [select for diffs], Wed Nov 21 21:19:45 2007 UTC (15 years, 6 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.123.2.2: +12 -10 lines
Diff to previous 1.123.2.2 (colored) to branchpoint 1.123 (colored) next main 1.124 (colored)

Sync with HEAD

Revision 1.127 / (download) - annotate - [select for diffs], Wed Nov 21 10:19:09 2007 UTC (15 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.126: +12 -10 lines
Diff to previous 1.126 (colored)

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

Revision 1.124.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:38 2007 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs
Changes since 1.124: +5 -26 lines
Diff to previous 1.124 (colored)

Sync with HEAD.

Revision 1.123.2.2 / (download) - annotate - [select for diffs], Sun Nov 18 19:35:48 2007 UTC (15 years, 6 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.123.2.1: +0 -22 lines
Diff to previous 1.123.2.1 (colored) to branchpoint 1.123 (colored)

Sync with HEAD

Revision 1.88.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:42 2007 UTC (15 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.88.2.5: +14 -26 lines
Diff to previous 1.88.2.5 (colored)

sync with head.

Revision 1.118.4.5 / (download) - annotate - [select for diffs], Wed Nov 14 19:04:40 2007 UTC (15 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.118.4.4: +2 -24 lines
Diff to previous 1.118.4.4 (colored) to branchpoint 1.118 (colored)

Sync with HEAD.

Revision 1.126 / (download) - annotate - [select for diffs], Tue Nov 13 22:14:35 2007 UTC (15 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.125: +2 -24 lines
Diff to previous 1.125 (colored)

Remove KERNEL_LOCK_ASSERT_LOCKED, KERNEL_LOCK_ASSERT_UNLOCKED since the
kernel_lock functions can be patched out at runtime now. Assertions are
provided by the existing functions and by LOCKDEBUG_BARRIER.

Revision 1.123.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:04 2007 UTC (15 years, 6 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.123: +14 -4 lines
Diff to previous 1.123 (colored)

Sync with HEAD

Revision 1.118.6.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:31:39 2007 UTC (15 years, 7 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.118: +133 -904 lines
Diff to previous 1.118 (colored)

sync with HEAD

Revision 1.118.4.4 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:28 2007 UTC (15 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.118.4.3: +5 -4 lines
Diff to previous 1.118.4.3 (colored) to branchpoint 1.118 (colored)

Sync with HEAD.

Revision 1.125 / (download) - annotate - [select for diffs], Tue Nov 6 00:42:41 2007 UTC (15 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Changes since 1.124: +5 -4 lines
Diff to previous 1.124 (colored)

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

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

Revision 1.110.2.20 / (download) - annotate - [select for diffs], Mon Nov 5 16:03:18 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.19: +3 -3 lines
Diff to previous 1.110.2.19 (colored) next main 1.111 (colored)

Cosmetic change for clarity.

Revision 1.110.2.19 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:18 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.18: +4 -3 lines
Diff to previous 1.110.2.18 (colored)

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

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

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

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

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

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

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

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

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

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

- newlwp -> lwp_create

Revision 1.118.4.3 / (download) - annotate - [select for diffs], Wed Oct 31 23:14:09 2007 UTC (15 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.118.4.2: +11 -2 lines
Diff to previous 1.118.4.2 (colored) to branchpoint 1.118 (colored)

Sync with HEAD.

Revision 1.124 / (download) - annotate - [select for diffs], Wed Oct 31 15:36:07 2007 UTC (15 years, 7 months ago) by pooka
Branch: MAIN
Branch point for: mjf-devfs
Changes since 1.123: +11 -2 lines
Diff to previous 1.123 (colored)

Wrap parts dealing with kernel_lock behind #ifndef _RUMPKERNEL.
I don't like doing this, but there's too much pain to get this file
to compile clean due to how SPINLOCK_{BACKOFF,SPIN}_HOOK and
mb_write() are spread out in weird weird places throughout MD code.

Revision 1.88.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:23 2007 UTC (15 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.88.2.4: +122 -903 lines
Diff to previous 1.88.2.4 (colored)

sync with head.

Revision 1.118.4.2 / (download) - annotate - [select for diffs], Fri Oct 26 15:48:31 2007 UTC (15 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.118.4.1: +117 -898 lines
Diff to previous 1.118.4.1 (colored) to branchpoint 1.118 (colored)

Sync with HEAD.

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

Revision 1.110.2.18 / (download) - annotate - [select for diffs], Tue Oct 23 20:17:10 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.17: +3 -3 lines
Diff to previous 1.110.2.17 (colored)

Sync with head.

Revision 1.110.2.17 / (download) - annotate - [select for diffs], Thu Oct 18 15:47:33 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.16: +3 -3 lines
Diff to previous 1.110.2.16 (colored)

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

Revision 1.120.2.2 / (download) - annotate - [select for diffs], Thu Oct 18 08:33:11 2007 UTC (15 years, 7 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.120.2.1: +3 -3 lines
Diff to previous 1.120.2.1 (colored) to branchpoint 1.120 (colored) next main 1.121 (colored)

sync with head.

Revision 1.123 / (download) - annotate - [select for diffs], Wed Oct 17 17:22:19 2007 UTC (15 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4
Branch point for: bouyer-xenamd64
Changes since 1.122: +3 -3 lines
Diff to previous 1.122 (colored)

Use __SIMPLELOCK_LOCKED_P().

Revision 1.120.2.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:40 2007 UTC (15 years, 7 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.120: +118 -899 lines
Diff to previous 1.120 (colored)

sync with head.

Revision 1.122 / (download) - annotate - [select for diffs], Thu Oct 11 19:45:24 2007 UTC (15 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base3, vmlocking-base
Changes since 1.121: +119 -880 lines
Diff to previous 1.121 (colored)

Merge from vmlocking:

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

Revision 1.110.2.16 / (download) - annotate - [select for diffs], Thu Oct 11 11:21:16 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.15: +15 -20 lines
Diff to previous 1.110.2.15 (colored)

'volatile' isn't needed here.

Revision 1.110.2.15 / (download) - annotate - [select for diffs], Thu Oct 11 11:08:17 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.14: +11 -76 lines
Diff to previous 1.110.2.14 (colored)

- Always include the kernel_lock functions, for LKMs.
- Fix uniprocessor builds.
- Tidy up a bit.

Revision 1.110.2.14 / (download) - annotate - [select for diffs], Wed Oct 10 23:43:24 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.13: +6 -16 lines
Diff to previous 1.110.2.13 (colored)

unbork

Revision 1.110.2.13 / (download) - annotate - [select for diffs], Wed Oct 10 21:21:21 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.12: +16 -35 lines
Diff to previous 1.110.2.12 (colored)

crackmgr(): don't keep track of line numbers/file names for LOCKDEBUG.
Instead, just stash a couple of text addresses into struct lock. Keep
these in struct lock even if compiled without LOCKDEBUG, so that the
size of struct lock is not changed by it.

Revision 1.121 / (download) - annotate - [select for diffs], Wed Oct 10 17:37:40 2007 UTC (15 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.120: +2 -22 lines
Diff to previous 1.120 (colored)

Kill transferlockers() now that it's unused.

Revision 1.110.2.12 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:26 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.11: +6 -6 lines
Diff to previous 1.110.2.11 (colored)

Sync with head.

Revision 1.110.2.11 / (download) - annotate - [select for diffs], Mon Oct 8 20:23:35 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.10: +12 -10 lines
Diff to previous 1.110.2.10 (colored)

_kernel_lock: cut back on spl calls.

Revision 1.118.4.1 / (download) - annotate - [select for diffs], Tue Oct 2 18:28:59 2007 UTC (15 years, 8 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.118: +15 -15 lines
Diff to previous 1.118 (colored)

Sync with HEAD.

Revision 1.120 / (download) - annotate - [select for diffs], Mon Sep 17 21:33:34 2007 UTC (15 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base
Branch point for: yamt-x86pmap
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

__FUNCTION__ -> __func__

Revision 1.119 / (download) - annotate - [select for diffs], Mon Sep 10 11:34:10 2007 UTC (15 years, 8 months ago) by skrll
Branch: MAIN
Changes since 1.118: +14 -14 lines
Diff to previous 1.118 (colored)

Merge nick-csl-alignment.

Revision 1.116.2.3 / (download) - annotate - [select for diffs], Mon Sep 10 10:40:09 2007 UTC (15 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.116.2.2: +6 -6 lines
Diff to previous 1.116.2.2 (colored) to branchpoint 1.116 (colored) next main 1.117 (colored)

Adapt some more code to the branch.

Revision 1.88.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:40:49 2007 UTC (15 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.88.2.3: +99 -70 lines
Diff to previous 1.88.2.3 (colored)

sync with head.

Revision 1.102.4.2 / (download) - annotate - [select for diffs], Mon Sep 3 07:05:03 2007 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.102.4.1: +5 -3 lines
Diff to previous 1.102.4.1 (colored) to branchpoint 1.102 (colored) next main 1.103 (colored)

Sync w/ NetBSD-4-RC_1

Revision 1.86.2.1 / (download) - annotate - [select for diffs], Sun Aug 26 18:45:17 2007 UTC (15 years, 9 months ago) by bouyer
Branch: netbsd-3
Changes since 1.86: +5 -3 lines
Diff to previous 1.86 (colored) next main 1.87 (colored)

Pull up following revision(s) (requested by pooka in ticket #1816):
	sys/sys/lock.h: revision 1.72
	sys/kern/kern_lock.c: revision 1.118 via patch
	sys/kern/vfs_subr.c: revision 1.295
Define a new lockmgr flag LK_RESURRECT which can be used in
conjunction with LK_DRAIN.  This has the same effect as LK_DRAIN
except it atomically does NOT mark the lock as drained.  This
guarantees that when we got the lock, we were the last one currently
waiting for the lock.
Use LK_DRAIN|LK_RESURRECT in vclean() to make sure there are no
waiters for the lock.  This should fix behaviour theoretized to be
caused by vfs_subr.c 1.289 which caused vclean() to run into
completion and free the vnode before all lock-waiters had been
processed.  Should therefore fix the "simple_lock: unitialized lock"
problems seen recently.
thanks to Juergen Hannken-Illjes for some analysis of the problem
and Erik Bertelsen for testing

Revision 1.110.2.10 / (download) - annotate - [select for diffs], Mon Aug 20 18:09:11 2007 UTC (15 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.9: +9 -5 lines
Diff to previous 1.110.2.9 (colored)

- Track where locks were initialized.
- Sync with HEAD.

Revision 1.116.2.2 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:08 2007 UTC (15 years, 9 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.116.2.1: +12 -6 lines
Diff to previous 1.116.2.1 (colored) to branchpoint 1.116 (colored)

Sync with HEAD.

Revision 1.75.2.1.2.1 / (download) - annotate - [select for diffs], Sat Aug 11 14:03:48 2007 UTC (15 years, 9 months ago) by bouyer
Branch: netbsd-2
Changes since 1.75.2.1: +5 -3 lines
Diff to previous 1.75.2.1 (colored) next main 1.76 (colored)

Pull up following revision(s) (requested by pooka in ticket #11349):
	sys/sys/lock.h: revision 1.72
	sys/kern/kern_lock.c: revision 1.118 via patch
	sys/kern/vfs_subr.c: revision 1.295
Define a new lockmgr flag LK_RESURRECT which can be used in
conjunction with LK_DRAIN.  This has the same effect as LK_DRAIN
except it atomically does NOT mark the lock as drained.  This
guarantees that when we got the lock, we were the last one currently
waiting for the lock.
Use LK_DRAIN|LK_RESURRECT in vclean() to make sure there are no
waiters for the lock.  This should fix behaviour theoretized to be
caused by vfs_subr.c 1.289 which caused vclean() to run into
completion and free the vnode before all lock-waiters had been
processed.  Should therefore fix the "simple_lock: unitialized lock"
problems seen recently.
thanks to Juergen Hannken-Illjes for some analysis of the problem
and Erik Bertelsen for testing

Revision 1.102.2.2 / (download) - annotate - [select for diffs], Wed Aug 1 14:45:46 2007 UTC (15 years, 10 months ago) by liamjfoy
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.102.2.1: +3 -1 lines
Diff to previous 1.102.2.1 (colored) to branchpoint 1.102 (colored) next main 1.103 (colored)

Pull up following revision(s) (requested by pooka in ticket #808):
	sys/sys/lock.h: revision 1.72
	sys/kern/kern_lock.c: revision 1.118
	sys/kern/vfs_subr.c: revision 1.295
Define a new lockmgr flag LK_RESURRECT which can be used in
conjunction with LK_DRAIN.  This has the same effect as LK_DRAIN
except it atomically does NOT mark the lock as drained.  This
guarantees that when we got the lock, we were the last one currently
waiting for the lock.
Use LK_DRAIN|LK_RESURRECT in vclean() to make sure there are no
waiters for the lock.  This should fix behaviour theoretized to be
caused by vfs_subr.c 1.289 which caused vclean() to run into
completion and free the vnode before all lock-waiters had been
processed.  Should therefore fix the "simple_lock: unitialized lock"
problems seen recently.
thanks to Juergen Hannken-Illjes for some analysis of the problem
and Erik Bertelsen for testing

Revision 1.118.8.2 / (download) - annotate - [select for diffs], Sun Jul 29 12:40:38 2007 UTC (15 years, 10 months ago) by pooka
Branch: matt-mips64
Changes since 1.118.8.1: +1683 -0 lines
Diff to previous 1.118.8.1 (colored) to branchpoint 1.118 (colored) next main 1.119 (colored)

Define a new lockmgr flag LK_RESURRECT which can be used in
conjunction with LK_DRAIN.  This has the same effect as LK_DRAIN
except it atomically does NOT mark the lock as drained.  This
guarantees that when we got the lock, we were the last one currently
waiting for the lock.

Use LK_DRAIN|LK_RESURRECT in vclean() to make sure there are no
waiters for the lock.  This should fix behaviour theoretized to be
caused by vfs_subr.c 1.289 which caused vclean() to run into
completion and free the vnode before all lock-waiters had been
processed.  Should therefore fix the "simple_lock: unitialized lock"
problems seen recently.

thanks to Juergen Hannken-Illjes for some analysis of the problem
and Erik Bertelsen for testing

Revision 1.118.8.1, Sun Jul 29 12:40:37 2007 UTC (15 years, 10 months ago) by pooka
Branch: matt-mips64
Changes since 1.118: +0 -1683 lines
FILE REMOVED

file kern_lock.c was added on branch matt-mips64 on 2007-07-29 12:40:38 +0000

Revision 1.118 / (download) - annotate - [select for diffs], Sun Jul 29 12:40:37 2007 UTC (15 years, 10 months ago) by pooka
Branch: MAIN
CVS Tags: nick-csl-alignment-base5, matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, matt-armv6, jmcneill-pm
Changes since 1.117: +5 -3 lines
Diff to previous 1.117 (colored)

Define a new lockmgr flag LK_RESURRECT which can be used in
conjunction with LK_DRAIN.  This has the same effect as LK_DRAIN
except it atomically does NOT mark the lock as drained.  This
guarantees that when we got the lock, we were the last one currently
waiting for the lock.

Use LK_DRAIN|LK_RESURRECT in vclean() to make sure there are no
waiters for the lock.  This should fix behaviour theoretized to be
caused by vfs_subr.c 1.289 which caused vclean() to run into
completion and free the vnode before all lock-waiters had been
processed.  Should therefore fix the "simple_lock: unitialized lock"
problems seen recently.

thanks to Juergen Hannken-Illjes for some analysis of the problem
and Erik Bertelsen for testing

Revision 1.117 / (download) - annotate - [select for diffs], Sun Jul 29 11:45:21 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.116: +9 -5 lines
Diff to previous 1.116 (colored)

Be more forgiving if panicstr != NULL.

Revision 1.110.2.9 / (download) - annotate - [select for diffs], Sun Jul 29 11:33:05 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.8: +9 -2 lines
Diff to previous 1.110.2.8 (colored)

Add lockdestroy() which tears down lk_interlock.

Revision 1.116.2.1 / (download) - annotate - [select for diffs], Wed Jul 18 13:36:18 2007 UTC (15 years, 10 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.116: +10 -10 lines
Diff to previous 1.116 (colored)

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.110.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:09:50 2007 UTC (15 years, 10 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.110: +29 -48 lines
Diff to previous 1.110 (colored) next main 1.111 (colored)

Sync with head.

Revision 1.110.2.8 / (download) - annotate - [select for diffs], Mon Jul 9 20:33:14 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.7: +3 -3 lines
Diff to previous 1.110.2.7 (colored)

KASSERT((l->l_flag & LW_INTR) == 0)
 ->
KASSERT((l->l_flag & LW_INTR) == 0 || panicstr != NULL)

Revision 1.116 / (download) - annotate - [select for diffs], Mon Jun 18 21:37:32 2007 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.115: +5 -7 lines
Diff to previous 1.115 (colored)

Re-apply rev 1.111:
Always include kernel_lock so that LOCKDEBUG checks can find the symbol.

Revision 1.110.2.7 / (download) - annotate - [select for diffs], Sun Jun 17 21:31:21 2007 UTC (15 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.6: +14 -7 lines
Diff to previous 1.110.2.6 (colored)

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

Revision 1.115 / (download) - annotate - [select for diffs], Fri Jun 15 20:59:38 2007 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.114: +6 -14 lines
Diff to previous 1.114 (colored)

Nuke __HAVE_SPLBIGLOCK.

Revision 1.114 / (download) - annotate - [select for diffs], Fri Jun 15 20:17:08 2007 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.113: +15 -26 lines
Diff to previous 1.113 (colored)

splstatclock, spllock -> splhigh

Revision 1.110.2.6 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:19 2007 UTC (16 years ago) by ad
Branch: vmlocking
Changes since 1.110.2.5: +9 -8 lines
Diff to previous 1.110.2.5 (colored)

Sync with head.

Revision 1.102.4.1 / (download) - annotate - [select for diffs], Mon Jun 4 01:54:22 2007 UTC (16 years ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.102: +4 -2 lines
Diff to previous 1.102 (colored)

Update to today's netbsd-4.

Revision 1.102.2.1 / (download) - annotate - [select for diffs], Wed May 23 17:07:36 2007 UTC (16 years ago) by riz
Branch: netbsd-4
Changes since 1.102: +2 -0 lines
Diff to previous 1.102 (colored)

Pull up following revision(s) (requested by tls in ticket #652):
	sys/kern/kern_lock.c: revision 1.103
in lockstatus(), report LK_EXCLOTHER if LK_WANT_EXCL or LK_WANT_UPGRADE
is set, since the thread that set either of those flags will be the next
one to get the lock.  fixes PR 35143.

Revision 1.113 / (download) - annotate - [select for diffs], Thu May 17 14:51:39 2007 UTC (16 years ago) by yamt
Branch: MAIN
Changes since 1.112: +5 -5 lines
Diff to previous 1.112 (colored)

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

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

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

Revision 1.105.2.5 / (download) - annotate - [select for diffs], Sun Apr 15 16:03:49 2007 UTC (16 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.105.2.4: +9 -7 lines
Diff to previous 1.105.2.4 (colored) to branchpoint 1.105 (colored) next main 1.106 (colored)

sync with head.

Revision 1.112 / (download) - annotate - [select for diffs], Sat Apr 14 06:59:25 2007 UTC (16 years, 1 month ago) by perseant
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.111: +7 -6 lines
Diff to previous 1.111 (colored)

Include the lwpid in the lock panic message, so we don't see silly messages
like
	lockmgr: pid 17, not exclusive lock holder 17 unlocking

Revision 1.110.2.5 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:39 2007 UTC (16 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.110.2.4: +4 -3 lines
Diff to previous 1.110.2.4 (colored)

Sync with head.

Revision 1.110.2.4 / (download) - annotate - [select for diffs], Mon Apr 9 21:27:57 2007 UTC (16 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.110.2.3: +3 -3 lines
Diff to previous 1.110.2.3 (colored)

Fix an assertion.

Revision 1.110.2.3 / (download) - annotate - [select for diffs], Thu Apr 5 22:14:04 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.2: +5 -2 lines
Diff to previous 1.110.2.2 (colored)

Make it compile.

Revision 1.111 / (download) - annotate - [select for diffs], Fri Mar 30 11:05:59 2007 UTC (16 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.110: +4 -3 lines
Diff to previous 1.110 (colored)

Always include kernel_lock so that LOCKDEBUG checks can find the symbol.

Revision 1.105.2.4 / (download) - annotate - [select for diffs], Sat Mar 24 00:43:06 2007 UTC (16 years, 2 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.105.2.3: +3 -3 lines
Diff to previous 1.105.2.3 (colored) to branchpoint 1.105 (colored)

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

Revision 1.110.2.2 / (download) - annotate - [select for diffs], Wed Mar 21 20:10:20 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking
Changes since 1.110.2.1: +3 -403 lines
Diff to previous 1.110.2.1 (colored)

GC the simplelock/spinlock debugging stuff.

Revision 1.110.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 17:50:52 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking
Changes since 1.110: +73 -393 lines
Diff to previous 1.110 (colored)

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

Revision 1.105.2.3 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:34 2007 UTC (16 years, 2 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.105.2.2: +63 -21 lines
Diff to previous 1.105.2.2 (colored) to branchpoint 1.105 (colored)

Sync with HEAD.

Revision 1.110 / (download) - annotate - [select for diffs], Sun Mar 4 06:20:25 2007 UTC (16 years, 3 months ago) by christos
Branch: MAIN
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.109: +63 -21 lines
Diff to previous 1.109 (colored)

add a lockpanic function that prints more detailed error messages.

Revision 1.105.2.2 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:21 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.105.2.1: +11 -6 lines
Diff to previous 1.105.2.1 (colored) to branchpoint 1.105 (colored)

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

Revision 1.109 / (download) - annotate - [select for diffs], Tue Feb 27 15:07:28 2007 UTC (16 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.108: +3 -3 lines
Diff to previous 1.108 (colored)

typedef pri_t and use it instead of int and u_char.

Revision 1.88.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:07 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.88.2.2: +176 -119 lines
Diff to previous 1.88.2.2 (colored)

sync with head.

Revision 1.108 / (download) - annotate - [select for diffs], Thu Feb 22 06:34:43 2007 UTC (16 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.107: +3 -3 lines
Diff to previous 1.107 (colored)

TRUE -> true, FALSE -> false

Revision 1.107 / (download) - annotate - [select for diffs], Tue Feb 20 16:10:10 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.106: +12 -9 lines
Diff to previous 1.106 (colored)

kernel_lock():

- Fix error in previous.
- Call LOCKDEBUG_WANTLOCK() so the "exclusive wanted" count isn't off.

Revision 1.106 / (download) - annotate - [select for diffs], Tue Feb 20 15:56:59 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.105: +7 -5 lines
Diff to previous 1.105 (colored)

_kernel_lock(): we can recurse here if we take an interrupt while spinning.
Don't double book the time spent with lockstat.

Revision 1.105.2.1 / (download) - annotate - [select for diffs], Sat Feb 17 10:30:56 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.105: +4 -4 lines
Diff to previous 1.105 (colored)

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

Revision 1.105 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:30 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Changes since 1.104: +170 -118 lines
Diff to previous 1.104 (colored)

Merge newlock2 to head.

Revision 1.99.2.13 / (download) - annotate - [select for diffs], Tue Feb 6 17:27:30 2007 UTC (16 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.99.2.12: +17 -8 lines
Diff to previous 1.99.2.12 (colored) to branchpoint 1.99 (colored) next main 1.100 (colored)

lockstat:

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

Revision 1.99.2.12 / (download) - annotate - [select for diffs], Fri Jan 26 23:22:44 2007 UTC (16 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.99.2.11: +11 -9 lines
Diff to previous 1.99.2.11 (colored) to branchpoint 1.99 (colored)

- Increase spinout timeout.
- Spin testing kernel_lock to reduce bus traffic.

Revision 1.99.2.11 / (download) - annotate - [select for diffs], Thu Jan 25 11:04:00 2007 UTC (16 years, 4 months ago) by yamt
Branch: newlock2
Changes since 1.99.2.10: +3 -4 lines
Diff to previous 1.99.2.10 (colored) to branchpoint 1.99 (colored)

_kernel_lock_assert_unlocked: don't panic when other cpu holds the lock.

Revision 1.99.2.10 / (download) - annotate - [select for diffs], Wed Jan 17 20:26:36 2007 UTC (16 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.99.2.9: +3 -3 lines
Diff to previous 1.99.2.9 (colored) to branchpoint 1.99 (colored)

Fix detection of deadlock against the big lock.

Revision 1.99.2.9 / (download) - annotate - [select for diffs], Fri Jan 12 14:23:34 2007 UTC (16 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.99.2.8: +6 -6 lines
Diff to previous 1.99.2.8 (colored) to branchpoint 1.99 (colored)

Make DEBUG kernels build again.

Revision 1.99.2.8 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:06 2007 UTC (16 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.99.2.7: +4 -2 lines
Diff to previous 1.99.2.7 (colored) to branchpoint 1.99 (colored)

Sync with head.

Revision 1.99.2.7 / (download) - annotate - [select for diffs], Thu Jan 11 22:22:59 2007 UTC (16 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.99.2.6: +32 -14 lines
Diff to previous 1.99.2.6 (colored) to branchpoint 1.99 (colored)

Checkpoint work in progress.

Revision 1.88.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:05 2006 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.88.2.1: +71 -15 lines
Diff to previous 1.88.2.1 (colored)

sync with head.

Revision 1.99.2.6 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:43 2006 UTC (16 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.99.2.5: +34 -42 lines
Diff to previous 1.99.2.5 (colored) to branchpoint 1.99 (colored)

Checkpoint work in progress.

Revision 1.104 / (download) - annotate - [select for diffs], Mon Dec 25 11:57:40 2006 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored)

lockstat: improve reporting slightly, and fix a bug where the command
could spin while resorting lists.

Revision 1.99.4.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:44 2006 UTC (16 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.99.4.1: +9 -7 lines
Diff to previous 1.99.4.1 (colored) to branchpoint 1.99 (colored) next main 1.100 (colored)

sync with head.

Revision 1.103 / (download) - annotate - [select for diffs], Sat Dec 9 15:59:25 2006 UTC (16 years, 5 months ago) by chs
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3
Changes since 1.102: +4 -2 lines
Diff to previous 1.102 (colored)

in lockstatus(), report LK_EXCLOTHER if LK_WANT_EXCL or LK_WANT_UPGRADE
is set, since the thread that set either of those flags will be the next
one to get the lock.  fixes PR 35143.

Revision 1.99.2.5 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:22 2006 UTC (16 years, 6 months ago) by ad
Branch: newlock2
Changes since 1.99.2.4: +11 -2 lines
Diff to previous 1.99.2.4 (colored) to branchpoint 1.99 (colored)

Sync with head.

Revision 1.99.2.4 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:36 2006 UTC (16 years, 6 months ago) by ad
Branch: newlock2
Changes since 1.99.2.3: +115 -65 lines
Diff to previous 1.99.2.3 (colored) to branchpoint 1.99 (colored)

Checkpoint work in progress.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (16 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.101: +7 -7 lines
Diff to previous 1.101 (colored)

remove some __unused from function parameters.

Revision 1.99.2.3 / (download) - annotate - [select for diffs], Tue Oct 24 19:21:40 2006 UTC (16 years, 7 months ago) by ad
Branch: newlock2
Changes since 1.99.2.2: +5 -3 lines
Diff to previous 1.99.2.2 (colored) to branchpoint 1.99 (colored)

_kernel_proc_lock: add a LOCKDEBUG_BARRIER() here.

Revision 1.99.4.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:10 2006 UTC (16 years, 7 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.99: +17 -7 lines
Diff to previous 1.99 (colored)

sync with head

Revision 1.99.2.2 / (download) - annotate - [select for diffs], Fri Oct 20 20:02:34 2006 UTC (16 years, 7 months ago) by ad
Branch: newlock2
Changes since 1.99.2.1: +7 -10 lines
Diff to previous 1.99.2.1 (colored) to branchpoint 1.99 (colored)

- sched_lock is no more
- Use mutex_setspl() for kernel_mutex

Revision 1.101 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:16 2006 UTC (16 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.100: +7 -7 lines
Diff to previous 1.100 (colored)

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

Revision 1.100 / (download) - annotate - [select for diffs], Sat Sep 30 11:59:37 2006 UTC (16 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.99: +12 -2 lines
Diff to previous 1.99 (colored)

- KERNEL_LOCK_ASSERT_LOCKED: check cpu_biglock_count as well.
- implement KERNEL_LOCK_ASSERT_UNLOCKED.

Revision 1.92.8.3 / (download) - annotate - [select for diffs], Thu Sep 14 12:31:48 2006 UTC (16 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.92.8.2: +48 -15 lines
Diff to previous 1.92.8.2 (colored) to branchpoint 1.92 (colored) next main 1.93 (colored)

sync with head.

Revision 1.99.2.1 / (download) - annotate - [select for diffs], Mon Sep 11 00:04:40 2006 UTC (16 years, 8 months ago) by ad
Branch: newlock2
Changes since 1.99: +29 -45 lines
Diff to previous 1.99 (colored)

Make the kernel_lock a mutex.

Revision 1.92.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:57:16 2006 UTC (16 years, 8 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.92: +106 -19 lines
Diff to previous 1.92 (colored) next main 1.93 (colored)

sync with head

Revision 1.99 / (download) - annotate - [select for diffs], Thu Sep 7 02:06:47 2006 UTC (16 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.98: +24 -6 lines
Diff to previous 1.98 (colored)

Add lock_owner_onproc().

Revision 1.98 / (download) - annotate - [select for diffs], Thu Sep 7 01:08:45 2006 UTC (16 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.97: +26 -11 lines
Diff to previous 1.97 (colored)

Track lockmgr() sleep events for lockstat.

Revision 1.92.8.2 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:46 2006 UTC (16 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.92.8.1: +13 -2 lines
Diff to previous 1.92.8.1 (colored) to branchpoint 1.92 (colored)

sync with head

Revision 1.97 / (download) - annotate - [select for diffs], Fri Jul 21 10:22:51 2006 UTC (16 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8, yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.96: +3 -0 lines
Diff to previous 1.96 (colored)

assert_sleepable: panic if curlwp == NULL.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Jul 21 10:07:29 2006 UTC (16 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.95: +10 -2 lines
Diff to previous 1.95 (colored)

add ASSERT_SLEEPABLE() macro to assert we can sleep.

Revision 1.88.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:37 2006 UTC (16 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.88: +74 -31 lines
Diff to previous 1.88 (colored)

sync with head.

Revision 1.92.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:58 2006 UTC (17 years, 1 month ago) by simonb
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.92: +49 -6 lines
Diff to previous 1.92 (colored) next main 1.93 (colored)

Sync with head.

Revision 1.92.10.1 / (download) - annotate - [select for diffs], Wed Apr 19 05:13:59 2006 UTC (17 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.92: +49 -6 lines
Diff to previous 1.92 (colored) next main 1.93 (colored)

sync with head.

Revision 1.92.8.1 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:39 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.92: +49 -6 lines
Diff to previous 1.92 (colored)

sync with head.

Revision 1.93.2.2 / (download) - annotate - [select for diffs], Fri Mar 31 09:45:27 2006 UTC (17 years, 2 months ago) by tron
Branch: peter-altq
Changes since 1.93.2.1: +3 -3 lines
Diff to previous 1.93.2.1 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored)

Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.

Revision 1.95 / (download) - annotate - [select for diffs], Fri Mar 31 06:01:07 2006 UTC (17 years, 2 months ago) by erh
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.94: +3 -3 lines
Diff to previous 1.94 (colored)

Fix call to simple_lock_assert_held() so builds with -DDEBUG work.

Revision 1.93.2.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:42:26 2006 UTC (17 years, 2 months ago) by tron
Branch: peter-altq
Changes since 1.93: +43 -4 lines
Diff to previous 1.93 (colored)

Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.

Revision 1.94 / (download) - annotate - [select for diffs], Sun Mar 26 20:19:52 2006 UTC (17 years, 2 months ago) by erh
Branch: MAIN
Changes since 1.93: +43 -4 lines
Diff to previous 1.93 (colored)

Add simple_lock_assert_locked/simple_lock_assert_unlocked to provide additional
useful information when panic'ing because the assertion fails.
Use these to define the SCHED_ASSERT_LOCKED/SCHED_ASSERT_UNLOCKED macros.

Revision 1.93 / (download) - annotate - [select for diffs], Thu Mar 16 00:52:32 2006 UTC (17 years, 2 months ago) by erh
Branch: MAIN
CVS Tags: peter-altq-base
Branch point for: peter-altq
Changes since 1.92: +8 -4 lines
Diff to previous 1.92 (colored)

Check db_onpanic before dropping into the debugger on lock errors.

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

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

as discussed on tech-kern some time back.

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

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

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

merge ktrace-lwp.

Revision 1.71.2.7 / (download) - annotate - [select for diffs], Thu Nov 10 14:09:44 2005 UTC (17 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.71.2.6: +73 -79 lines
Diff to previous 1.71.2.6 (colored) next main 1.72 (colored)

Sync with HEAD. Here we go again...

Revision 1.89 / (download) - annotate - [select for diffs], Sat Oct 8 03:18:25 2005 UTC (17 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.88: +3 -3 lines
Diff to previous 1.88 (colored)

default to simple_lock_debugger=1 with LOCKDEBUG.

Revision 1.88 / (download) - annotate - [select for diffs], Wed Jun 1 13:12:49 2005 UTC (18 years ago) by blymn
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.87: +51 -51 lines
Diff to previous 1.87 (colored)

Fix function variable names shadowing global declarations.

Revision 1.87 / (download) - annotate - [select for diffs], Sun May 29 21:16:14 2005 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.86: +23 -29 lines
Diff to previous 1.86 (colored)

Now we can fix the volatile cast-aways.
Rename some shadowed variables while here.

Revision 1.85.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:23 2005 UTC (18 years, 1 month ago) by kent
Branch: kent-audio2
Changes since 1.85: +14 -14 lines
Diff to previous 1.85 (colored) next main 1.86 (colored)

sync with -current

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

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

Revision 1.71.2.6 / (download) - annotate - [select for diffs], Fri Mar 4 16:51:58 2005 UTC (18 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.71.2.5: +14 -14 lines
Diff to previous 1.71.2.5 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.86 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:55 2005 UTC (18 years, 3 months ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, kent-audio2-base
Branch point for: netbsd-3
Changes since 1.85: +14 -14 lines
Diff to previous 1.85 (colored)

nuke trailing whitespace

Revision 1.71.2.5 / (download) - annotate - [select for diffs], Tue Nov 2 07:53:23 2004 UTC (18 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.71.2.4: +79 -14 lines
Diff to previous 1.71.2.4 (colored)

Sync with HEAD.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Oct 26 00:14:46 2004 UTC (18 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.84: +72 -15 lines
Diff to previous 1.84 (colored)

a relatively lightweight implementation of kernel_lock.

Revision 1.84 / (download) - annotate - [select for diffs], Sat Oct 23 21:27:34 2004 UTC (18 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.83: +10 -2 lines
Diff to previous 1.83 (colored)

don't reference kernel_lock directly.

Revision 1.71.2.4 / (download) - annotate - [select for diffs], Tue Sep 21 13:35:04 2004 UTC (18 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.71.2.3: +2 -2 lines
Diff to previous 1.71.2.3 (colored)

Fix the sync with head I botched.

Revision 1.71.2.3 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:02 2004 UTC (18 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.71.2.2: +2 -2 lines
Diff to previous 1.71.2.2 (colored)

Sync with HEAD.

Revision 1.75.2.1 / (download) - annotate - [select for diffs], Mon Aug 23 05:59:27 2004 UTC (18 years, 9 months ago) by tron
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2
Changes since 1.75: +10 -6 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

Pull up revision 1.81-1.83 via patch (requested by yamt in ticket #752):
when acquiring an exclusive lock,
ensure that no one else have the same lock.
a patch from Stephan Uphoff, FreeBSD PR/69934.
(http://www.freebsd.org/cgi/query-pr.cgi?pr=69934)
Upgrading a lock does not play well together with acquiring
an exclusive lock and can lead to two threads being
granted exclusive access.
Problematic sequence:
Thread A acquires a previous unlocked lock in shared mode.
Thread B tries to acquire the same lock in exclusive mode
and blocks.
Thread A upgrades its lock - waking up thread B.
Thread B wakes up and also acquires the same lock as it only checks
if the lock is not shared or if someone wants to upgrade the lock
and not if someone already upgraded the lock to an exclusive lock.
- revert a part of the previous which breaks LK_SPIN locks.
  (reported by Nicolas Joly on current-users@)
- propagate the previous to spinlock_acquire_count.
add missing wakeups in the cases of lock failure.
from Stephan Uphoff, FreeBSD PR/69964.

Revision 1.71.2.2 / (download) - annotate - [select for diffs], Thu Aug 12 11:42:19 2004 UTC (18 years, 9 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.71.2.1: +10 -6 lines
Diff to previous 1.71.2.1 (colored)

Sync with HEAD.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Aug 4 10:37:08 2004 UTC (18 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.82: +8 -4 lines
Diff to previous 1.82 (colored)

add missing wakeups in the cases of lock failure.
from Stephan Uphoff, FreeBSD PR/69964.

(http://www.freebsd.org/cgi/query-pr.cgi?pr=69964)
> The LK_WANT_EXCL and LK_WANT_UPGRADE bits act as mini-locks and can block
> other threads.
> Normally this is not a problem since the mini locks are upgraded to full loc
> and the release of the locks will unblock the other threads.
> However if a thread reset the bits without optaining a full lock
> other threads are not awoken.
> This can happens if obtaining the full lock fails because of a LK_SLEEPFAIL,
> or a signal (if lock priority includes PCATCH .. don't think this is used).

Revision 1.82 / (download) - annotate - [select for diffs], Wed Aug 4 01:16:06 2004 UTC (18 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.81: +5 -4 lines
Diff to previous 1.81 (colored)

- revert a part of the previous which breaks LK_SPIN locks.
  (reported by Nicolas Joly on current-users@)
- propagate the previous to spinlock_acquire_count.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Aug 3 12:08:51 2004 UTC (18 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.80: +4 -5 lines
Diff to previous 1.80 (colored)

when acquiring an exclusive lock,
ensure that no one else have the same lock.
a patch from Stephan Uphoff, FreeBSD PR/69934.

(http://www.freebsd.org/cgi/query-pr.cgi?pr=69934)
>	Upgrading a lock does not play well together with acquiring
>	an exclusive lock and can lead to two threads being
>	granted exclusive access.
>
>	Problematic sequence:
>	Thread A acquires a previous unlocked lock in shared mode.
>	Thread B tries to acquire the same lock in exclusive mode
>	and blocks.
>	Thread A upgrades its lock - waking up thread B.
>	Thread B wakes up and also acquires the same lock as it only checks
>	if the lock is not shared or if someone wants to upgrade the lock
>	and not if someone already upgraded the lock to an exclusive lock.

Revision 1.71.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:52:46 2004 UTC (18 years, 10 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.71: +180 -87 lines
Diff to previous 1.71 (colored)

Sync with HEAD

Revision 1.80 / (download) - annotate - [select for diffs], Mon May 31 09:05:10 2004 UTC (19 years ago) by yamt
Branch: MAIN
Changes since 1.79: +3 -2 lines
Diff to previous 1.79 (colored)

lockmgr: add a comment about LK_RETRY.

Revision 1.79 / (download) - annotate - [select for diffs], Sun May 30 20:49:04 2004 UTC (19 years ago) by yamt
Branch: MAIN
Changes since 1.78: +4 -2 lines
Diff to previous 1.78 (colored)

lockmgr: assert that LK_RETRY is not specified.

Revision 1.78 / (download) - annotate - [select for diffs], Tue May 25 14:54:57 2004 UTC (19 years ago) by hannken
Branch: MAIN
Changes since 1.77: +40 -11 lines
Diff to previous 1.77 (colored)

Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.

- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>

Revision 1.77 / (download) - annotate - [select for diffs], Tue May 18 11:59:11 2004 UTC (19 years ago) by yamt
Branch: MAIN
Changes since 1.76: +23 -4 lines
Diff to previous 1.76 (colored)

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

Revision 1.76 / (download) - annotate - [select for diffs], Tue May 18 11:55:59 2004 UTC (19 years ago) by yamt
Branch: MAIN
Changes since 1.75: +24 -6 lines
Diff to previous 1.75 (colored)

introduce LK_EXCLOTHER for lockstatus().
from FreeBSD, but a little differently.  instead of letting lockstatus()
take an additional thread argument, always use curlwp/curcpu.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Feb 13 11:36:22 2004 UTC (19 years, 3 months ago) by wiz
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored)

Uppercase CPU, plural is CPUs.

Revision 1.74 / (download) - annotate - [select for diffs], Mon Dec 8 14:21:25 2003 UTC (19 years, 6 months ago) by hannken
Branch: MAIN
Changes since 1.73: +16 -14 lines
Diff to previous 1.73 (colored)

Fix last commit. The current spl was an implicit argument to the ACQUIRE
macro.  With help and approval from YAMAMOTO Takashi <yamt@netbsd.org>

Revision 1.73 / (download) - annotate - [select for diffs], Sun Nov 23 08:57:17 2003 UTC (19 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.72: +101 -75 lines
Diff to previous 1.72 (colored)

turn ACQUIRE macro into a function by introducing new internal
flags, LK_SHARE_NONZERO and LK_WAIT_NONZERO.  from FreeBSD.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Aug 7 16:31:46 2003 UTC (19 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.71: +3 -7 lines
Diff to previous 1.71 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.71 / (download) - annotate - [select for diffs], Wed Feb 19 22:34:42 2003 UTC (20 years, 3 months ago) by pk
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.70: +7 -7 lines
Diff to previous 1.70 (colored)

Use lock_printf() in SPINLOCK_SPINCHECK() and SLOCK_TRACE().

Revision 1.70 / (download) - annotate - [select for diffs], Sun Jan 19 14:40:55 2003 UTC (20 years, 4 months ago) by pk
Branch: MAIN
Changes since 1.69: +4 -2 lines
Diff to previous 1.69 (colored)

_simple_lock(): revert to IPL at entry while spinning on the lock; raise
to spllock() again after we get it.

Revision 1.69 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:27 2003 UTC (20 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.68: +52 -45 lines
Diff to previous 1.68 (colored)

Merge the nathanw_sa branch.

Revision 1.51.2.16 / (download) - annotate - [select for diffs], Fri Jan 17 16:36:13 2003 UTC (20 years, 4 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.51.2.15: +7 -4 lines
Diff to previous 1.51.2.15 (colored) next main 1.52 (colored)

Sync with HEAD.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Jan 15 23:11:05 2003 UTC (20 years, 4 months ago) by pk
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base
Changes since 1.67: +7 -4 lines
Diff to previous 1.67 (colored)

lock_printf(): use vsnprintf/printf_nolog to avoid covertly using the system
log and thereby invoking scheduler code.

Revision 1.51.2.15 / (download) - annotate - [select for diffs], Wed Dec 11 06:43:04 2002 UTC (20 years, 5 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.51.2.14: +2 -2 lines
Diff to previous 1.51.2.14 (colored)

Sync with HEAD.

Revision 1.67 / (download) - annotate - [select for diffs], Sun Nov 24 11:37:55 2002 UTC (20 years, 6 months ago) by scw
Branch: MAIN
CVS Tags: gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored)

Quell uninitialised variable warnings.

Revision 1.51.2.14 / (download) - annotate - [select for diffs], Mon Nov 11 22:13:45 2002 UTC (20 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51.2.13: +6 -6 lines
Diff to previous 1.51.2.13 (colored)

Catch up to -current

Revision 1.66 / (download) - annotate - [select for diffs], Sat Nov 2 07:25:20 2002 UTC (20 years, 7 months ago) by perry
Branch: MAIN
Changes since 1.65: +5 -5 lines
Diff to previous 1.65 (colored)

/*CONTCOND*/ while (0)'ed macros

Revision 1.65 / (download) - annotate - [select for diffs], Fri Nov 1 01:13:32 2002 UTC (20 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

For INTERLOCK_ACQUIRE, s/splsched/spllock/.

Revision 1.51.2.13 / (download) - annotate - [select for diffs], Fri Oct 18 05:11:03 2002 UTC (20 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51.2.12: +4 -4 lines
Diff to previous 1.51.2.12 (colored)

P_BIGLOCK -> L_BIGLOCK

Revision 1.51.2.12 / (download) - annotate - [select for diffs], Fri Oct 18 02:44:52 2002 UTC (20 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51.2.11: +3 -3 lines
Diff to previous 1.51.2.11 (colored)

Catch up to -current.

Revision 1.56.2.3 / (download) - annotate - [select for diffs], Thu Oct 10 18:43:08 2002 UTC (20 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.56.2.2: +21 -20 lines
Diff to previous 1.56.2.2 (colored) to branchpoint 1.56 (colored) next main 1.57 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.64 / (download) - annotate - [select for diffs], Fri Sep 27 15:37:44 2002 UTC (20 years, 8 months ago) by provos
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge
Changes since 1.63: +5 -5 lines
Diff to previous 1.63 (colored)

remove trailing \n in panic().  approved perry.

Revision 1.51.2.11 / (download) - annotate - [select for diffs], Tue Sep 17 21:22:05 2002 UTC (20 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51.2.10: +18 -17 lines
Diff to previous 1.51.2.10 (colored)

Catch up to -current.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Sep 14 21:42:42 2002 UTC (20 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.62: +18 -17 lines
Diff to previous 1.62 (colored)

print a stack trace in the "spinout" case too.

Revision 1.51.2.10 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:16 2002 UTC (20 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51.2.9: +2 -3 lines
Diff to previous 1.51.2.9 (colored)

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

Revision 1.51.2.9 / (download) - annotate - [select for diffs], Mon Jun 24 22:10:45 2002 UTC (20 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51.2.8: +3 -3 lines
Diff to previous 1.51.2.8 (colored)

Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.56.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 17:49:28 2002 UTC (20 years, 11 months ago) by jdolecek
Branch: kqueue
Changes since 1.56.2.1: +58 -4 lines
Diff to previous 1.56.2.1 (colored) to branchpoint 1.56 (colored)

catch up with -current on kqueue branch

Revision 1.51.2.8 / (download) - annotate - [select for diffs], Thu Jun 20 03:47:14 2002 UTC (20 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51.2.7: +58 -4 lines
Diff to previous 1.51.2.7 (colored)

Catch up to -current.

Revision 1.61.2.1 / (download) - annotate - [select for diffs], Thu May 30 14:47:58 2002 UTC (21 years ago) by gehenna
Branch: gehenna-devsw
Changes since 1.61: +58 -2 lines
Diff to previous 1.61 (colored) next main 1.62 (colored)

Catch up with -current.

Revision 1.62 / (download) - annotate - [select for diffs], Tue May 21 01:38:27 2002 UTC (21 years ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, gehenna-devsw-base
Changes since 1.61: +58 -2 lines
Diff to previous 1.61 (colored)

Move kernel_lock manipulation info functions so that they will
show up in a profile.

Revision 1.61 / (download) - annotate - [select for diffs], Sat May 11 11:56:57 2002 UTC (21 years ago) by enami
Branch: MAIN
Branch point for: gehenna-devsw
Changes since 1.60: +2 -4 lines
Diff to previous 1.60 (colored)

Remove #ifdef DIAGNOSTIC around panic().  It is better than NULL pointer
dereference.

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Thu Jan 10 19:59:49 2002 UTC (21 years, 4 months ago) by thorpej
Branch: kqueue
Changes since 1.56: +18 -15 lines
Diff to previous 1.56 (colored)

Sync kqueue branch with -current.

Revision 1.51.2.7 / (download) - annotate - [select for diffs], Tue Nov 27 03:17:18 2001 UTC (21 years, 6 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.51.2.6: +47 -41 lines
Diff to previous 1.51.2.6 (colored)

Make lockmgr() lwp-aware:
- Locks are counted against LWPs, not procs.
- When we record the lockholder in the lock structure, we need to
  also record the lwpid.
- When we are checking who holds the lock, also consider lwpid.

Fixes a "locking against myself" panic reported by Allen Briggs that
could be easily triggered by redirecting the output of an LWP-using
program to a file.

Revision 1.51.2.6 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:36 2001 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51.2.5: +4 -1 lines
Diff to previous 1.51.2.5 (colored)

Catch up to -current.

Revision 1.59.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:18:48 2001 UTC (21 years, 6 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.59: +4 -1 lines
Diff to previous 1.59 (colored) next main 1.60 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:11 2001 UTC (21 years, 6 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, newlock-base, newlock, ifpoll-base, eeh-devprop-base, eeh-devprop
Changes since 1.59: +4 -1 lines
Diff to previous 1.59 (colored)

add RCSIDs

Revision 1.51.2.5 / (download) - annotate - [select for diffs], Mon Oct 8 20:11:43 2001 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51.2.4: +3 -3 lines
Diff to previous 1.51.2.4 (colored)

Catch up to -current.

Revision 1.56.4.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:46:50 2001 UTC (21 years, 8 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.56: +15 -15 lines
Diff to previous 1.56 (colored) next main 1.57 (colored)

Catch up with -current.

Revision 1.59 / (download) - annotate - [select for diffs], Sat Sep 29 21:27:49 2001 UTC (21 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored)

replace wakeup_one() with wakeup().  wakeup_one() can only be used if the
woken-up thread is guaranteed to pass the buck to the next guy before
going back to sleep, and the rest of the lockmgr() code doesn't do that.
from Bill Sommerfeld.  fixes PR 14097.

Revision 1.51.2.4 / (download) - annotate - [select for diffs], Wed Sep 26 19:55:04 2001 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51.2.3: +13 -13 lines
Diff to previous 1.51.2.3 (colored)

Catch up to -current.
Again.

Revision 1.58 / (download) - annotate - [select for diffs], Tue Sep 25 06:13:29 2001 UTC (21 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.57: +12 -12 lines
Diff to previous 1.57 (colored)

print a stack trace in more LOCKDEBUG cases.
add a blank line between complaints.
use TAILQ_FOREACH where appropriate.

Revision 1.57 / (download) - annotate - [select for diffs], Sat Sep 22 22:36:30 2001 UTC (21 years, 8 months ago) by sommerfeld
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

Correct comment to match code

Revision 1.51.2.3 / (download) - annotate - [select for diffs], Fri Aug 24 00:11:29 2001 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51.2.2: +2 -2 lines
Diff to previous 1.51.2.2 (colored)

Catch up with -current.

Revision 1.56 / (download) - annotate - [select for diffs], Sun Jul 8 17:41:14 2001 UTC (21 years, 11 months ago) by wiz
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp, kqueue
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

synchron*, not sychron*

Revision 1.51.2.2 / (download) - annotate - [select for diffs], Thu Jun 21 20:06:50 2001 UTC (21 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51.2.1: +46 -22 lines
Diff to previous 1.51.2.1 (colored)

Catch up to -current.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Jun 5 04:38:09 2001 UTC (22 years ago) by thorpej
Branch: MAIN
Changes since 1.54: +38 -16 lines
Diff to previous 1.54 (colored)

Add a simple_lock_only_held() LOCKDEBUG routine, which allows code
to assert that exactly zero or one (and a specific one) locks are
held.

From Bill Sommerfeld.

Revision 1.54 / (download) - annotate - [select for diffs], Tue May 1 04:30:04 2001 UTC (22 years, 1 month ago) by enami
Branch: MAIN
Changes since 1.53: +3 -1 lines
Diff to previous 1.53 (colored)

Define local variable cpu_id only when either MULTIPROCESSOR or DIAGNOSTIC
is defined since it isn't used otherwise.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Apr 27 00:05:13 2001 UTC (22 years, 1 month ago) by marcus
Branch: MAIN
Changes since 1.52: +3 -2 lines
Diff to previous 1.52 (colored)

STDC cleanup: volatile needs to be cast away for lk_flags as well.

Revision 1.25.2.5 / (download) - annotate - [select for diffs], Mon Apr 23 09:42:32 2001 UTC (22 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.25.2.4: +5 -6 lines
Diff to previous 1.25.2.4 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored)

Sync with HEAD.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Apr 20 22:58:39 2001 UTC (22 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.51: +5 -6 lines
Diff to previous 1.51 (colored)

SPINLOCK_INTERLOCK_RELEASE_HOOK should actually be
SPINLOCK_SPIN_HOOK, so that we actually check for
pending IPIs on the Alpha more than once.  Also,
when we call alpha_ipi_process(), make sure to go
to splipi().

Revision 1.51.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:49:40 2001 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.51: +4 -2 lines
Diff to previous 1.51 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.25.2.4 / (download) - annotate - [select for diffs], Fri Jan 5 17:36:38 2001 UTC (22 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.25.2.3: +1 -1 lines
Diff to previous 1.25.2.3 (colored) to branchpoint 1.25 (colored)

Sync with HEAD

Revision 1.51 / (download) - annotate - [select for diffs], Sun Dec 24 23:56:24 2000 UTC (22 years, 5 months ago) by jmc
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

Default lock_printf to syslog rather than printf. Some of the lock debug checks
are done inside of wakeup which is holding the sched lock. Printf can cause
wakeup to get called again (pty redirection of console message) which will
panic with sched lock already held.

This isn't a long term fix as not being able to printf vs. sched lock should
be cleaned up better but this avoids continual panics with lockdebug running
and an xterm -C.

Revision 1.25.2.3 / (download) - annotate - [select for diffs], Fri Dec 8 09:13:54 2000 UTC (22 years, 6 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.25.2.2: +81 -0 lines
Diff to previous 1.25.2.2 (colored) to branchpoint 1.25 (colored)

Sync with HEAD.

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:05:20 2000 UTC (22 years, 6 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.25.2.1: +8 -2 lines
Diff to previous 1.25.2.1 (colored) to branchpoint 1.25 (colored)

Sync with HEAD.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Nov 22 06:31:23 2000 UTC (22 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.49: +82 -1 lines
Diff to previous 1.49 (colored)

Add a LOCKDEBUG check for a r/w spinlock spinning out of control.
Partially from Bill Sommerfeld.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Nov 20 20:04:49 2000 UTC (22 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.48: +8 -2 lines
Diff to previous 1.48 (colored)

Allow machine dependent code to specify a hook to be run when a
spinlock's interlock is released.

Idea from Bill Sommerfeld.

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:09:01 2000 UTC (22 years, 6 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.25: +342 -91 lines
Diff to previous 1.25 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.32.2.3 / (download) - annotate - [select for diffs], Tue Sep 5 23:17:01 2000 UTC (22 years, 9 months ago) by gmcgarry
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA
Changes since 1.32.2.2: +4 -3 lines
Diff to previous 1.32.2.2 (colored) to branchpoint 1.32 (colored) next main 1.33 (colored)

Pull up revision 1.36 (approved by jhawk)

>revision 1.36
>date: 2000/08/08 19:55:26;  author: thorpej;  state: Exp;  lines: +4 -3
>Fix printf format error pointed out by Steve Woodford.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Aug 28 21:07:52 2000 UTC (22 years, 9 months ago) by sommerfeld
Branch: MAIN
Changes since 1.47: +2 -1 lines
Diff to previous 1.47 (colored)

Fix !LOCKDEBUG && !DIAGNOSTIC case

Revision 1.47 / (download) - annotate - [select for diffs], Sat Aug 26 19:26:43 2000 UTC (22 years, 9 months ago) by sommerfeld
Branch: MAIN
Changes since 1.46: +96 -15 lines
Diff to previous 1.46 (colored)

Since the spinlock count is per-cpu, we don't need atomic operations
to update it, so don't bother with <machine/atomic.h>

Flush kernel_lock_release_all() and kernel_lock_acquire_count() (which
didn't do spinlock accounting correctly), and replace them with
spinlock_release_all() and spinlock_acquire_count().

Revision 1.46 / (download) - annotate - [select for diffs], Sat Aug 26 17:02:16 2000 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.45: +3 -2 lines
Diff to previous 1.45 (colored)

Fix a printf format (for Alpha).

Revision 1.45 / (download) - annotate - [select for diffs], Wed Aug 23 15:17:47 2000 UTC (22 years, 9 months ago) by sommerfeld
Branch: MAIN
Changes since 1.44: +9 -3 lines
Diff to previous 1.44 (colored)

Default simple_lock_debugger to "on" on MULTIPROCESSOR.
Change uninitialized simple_lock check from KASSERT to use SLOCK_WHERE
(to show the "real" source line where the error was detected).

Revision 1.44 / (download) - annotate - [select for diffs], Tue Aug 22 19:47:26 2000 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.43: +40 -11 lines
Diff to previous 1.43 (colored)

Use spllock() rather than splhigh().

Revision 1.43 / (download) - annotate - [select for diffs], Tue Aug 22 17:31:32 2000 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.42: +13 -12 lines
Diff to previous 1.42 (colored)

Slight adjustment to INTERLOCK_*() macros to make it easier
for the compiler to optimize.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Aug 21 02:17:45 2000 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.41: +19 -10 lines
Diff to previous 1.41 (colored)

- Clean up _simple_lock_held()
- In simple_lock_switchcheck(), allow/enforce exactly one lock to be
  held: sched_lock.
- Per e-mail to tech-smp from Bill Sommerfeld, r/w spin locks have
  an interlock at splsched(), rather than splhigh().

Revision 1.41 / (download) - annotate - [select for diffs], Sat Aug 19 19:36:18 2000 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.40: +7 -2 lines
Diff to previous 1.40 (colored)

Lock debugging fix: Make sure a simplelock's lock_holder gets
initialized properly, and consistently tracks the owning CPU's
cpuid.  Add some diagnostic assertions to enforce this.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Aug 17 14:36:32 2000 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.39: +24 -9 lines
Diff to previous 1.39 (colored)

For spinlocks, block interrupts while holding the interlock.  Partially
from Bill Sommerfeld.

Revision 1.39 / (download) - annotate - [select for diffs], Thu Aug 17 04:18:21 2000 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.38: +5 -1 lines
Diff to previous 1.38 (colored)

Add a DIAGNOSTIC check for release of an unlocked lock.

From Bill Sommerfeld.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Aug 17 04:15:43 2000 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.37: +24 -1 lines
Diff to previous 1.37 (colored)

Some more lock debugging support:
- LOCK_ASSERT(), which expands to KASSERT() if LOCKDEBUG.
- new simple_lock_held(), which tests if the calling CPU holds
  the specified simple lock.

From Bill Sommerfeld, modified slightly by me.

Revision 1.32.2.2 / (download) - annotate - [select for diffs], Fri Aug 11 23:10:15 2000 UTC (22 years, 9 months ago) by thorpej
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-ALPHA2
Changes since 1.32.2.1: +26 -1 lines
Diff to previous 1.32.2.1 (colored) to branchpoint 1.32 (colored)

Pullup from trunk:
Add a DIAGNOSTIC or LOCKDEBUG check for held spin locks.

Revision 1.32.2.1 / (download) - annotate - [select for diffs], Fri Aug 11 23:07:39 2000 UTC (22 years, 9 months ago) by thorpej
Branch: netbsd-1-5
Changes since 1.32: +24 -1 lines
Diff to previous 1.32 (colored)

Pullup from trunk:
It doesn't make sense to charge simple locks to proc's, because
simple locks are held by CPUs.  Remove p_simple_locks (which was
unused anyway, really), and add a LOCKDEBUG check for held simple
locks in mi_switch().  Grow p_locks to an int to take up the space
previously used by p_simple_locks so that the proc structure doens't
change size.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Aug 10 04:37:59 2000 UTC (22 years, 9 months ago) by eeh
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Nother __kprintf_attribute__ to be removed.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Aug 8 19:55:26 2000 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.35: +4 -3 lines
Diff to previous 1.35 (colored)

Fix printf format error pointed out by Steve Woodford.

Revision 1.35 / (download) - annotate - [select for diffs], Mon Aug 7 22:10:53 2000 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.34: +26 -1 lines
Diff to previous 1.34 (colored)

Add a DIAGNOSTIC or LOCKDEBUG check for held spin locks.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Aug 7 21:55:23 2000 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.33: +24 -1 lines
Diff to previous 1.33 (colored)

It doesn't make sense to charge simple locks to proc's, because
simple locks are held by CPUs.  Remove p_simple_locks (which was
unused anyway, really), and add a LOCKDEBUG check for held simple
locks in mi_switch().  Grow p_locks to an int to take up the space
previously used by p_simple_locks so that the proc structure doens't
change size.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Jul 14 07:16:44 2000 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.32: +14 -40 lines
Diff to previous 1.32 (colored)

ANSI'ify.

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:09:08 2000 UTC (22 years, 11 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.30: +40 -9 lines
Diff to previous 1.30 (colored) next main 1.31 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Jun 10 18:44:43 2000 UTC (22 years, 11 months ago) by sommerfeld
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.31: +37 -5 lines
Diff to previous 1.31 (colored)

Fix assorted bugs around shutdown/reboot/panic time.
 - add a new global variable, doing_shutdown, which is nonzero if
vfs_shutdown() or panic() have been called.
- in panic, set RB_NOSYNC if doing_shutdown is already set on entry
so we don't reenter vfs_shutdown if we panic'ed there.
 - in vfs_shutdown, don't use proc0's process for sys_sync unless
curproc is NULL.
 - in lockmgr, attribute successful locks to proc0 if doing_shutdown
&& curproc==NULL, and  panic if we can't get the lock right away; avoids the
spurious lockmgr DIAGNOSTIC panic from the ddb reboot command.
 - in subr_pool, deal with curproc==NULL in the doing_shutdown case.
 - in mfs_strategy, bitbucket writes if doing_shutdown, so we don't
wedge waiting for the mfs process.
 - in ltsleep, treat ((curproc == NULL) && doing_shutdown) like the
panicstr case.

Appears to fix: kern/9239, kern/10187, kern/9367.
May also fix kern/10122.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Jun 8 05:50:59 2000 UTC (23 years ago) by thorpej
Branch: MAIN
Changes since 1.30: +4 -5 lines
Diff to previous 1.30 (colored)

Use ltsleep().

Revision 1.30 / (download) - annotate - [select for diffs], Tue May 23 05:17:11 2000 UTC (23 years ago) by thorpej
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.29: +8 -8 lines
Diff to previous 1.29 (colored)

Fix a typo, and add some lint comments.

Revision 1.29 / (download) - annotate - [select for diffs], Wed May 3 13:53:59 2000 UTC (23 years, 1 month ago) by sommerfeld
Branch: MAIN
Changes since 1.28: +5 -5 lines
Diff to previous 1.28 (colored)

Let MULTIPROCESSOR && LOCKDEBUG case compile again

Revision 1.28 / (download) - annotate - [select for diffs], Tue May 2 04:32:33 2000 UTC (23 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.27: +18 -6 lines
Diff to previous 1.27 (colored)

- If a platform defines __HAVE_ATOMIC_OPERATIONS, use them for counting
  in the MULTIPROCESSOR case.
- Move a misplaced #ifdef so that LK_REENABLE actually works.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Apr 29 03:31:46 2000 UTC (23 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.26: +18 -16 lines
Diff to previous 1.26 (colored)

Require that each each MACHINE/MACHINE_ARCH supply a lock.h.  This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED.  These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case).  Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Feb 9 16:46:09 2000 UTC (23 years, 3 months ago) by sommerfeld
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.25: +11 -3 lines
Diff to previous 1.25 (colored)

Three MULTIPROCESSOR + LOCKDEBUG fixes:
1) fix typo preventing compilation (missing comma).
2) in SLOCK_WHERE, display cpu number in the MP case.
3) the folowing race condition was observed in _simple_lock:
	cpu 1 releases lock,
	cpu 0 grabs lock
 	cpu 1 sees it's already locked.
	cpu 1 sees that lock_holder== "cpu 1"
	cpu 1 assumes that it already holds it and barfs.
	cpu 0 sets lock_holder == "cpu 0"
Fix: set lock_holder to LK_NOCPU in _simple_unlock().

Revision 1.25 / (download) - annotate - [select for diffs], Fri Aug 27 01:14:38 1999 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: thorpej_scsipi
Changes since 1.24: +47 -8 lines
Diff to previous 1.24 (colored)

Make it possible to direct LOCKDEBUG messages to syslog only.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Aug 10 21:10:20 1999 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.23: +5 -5 lines
Diff to previous 1.23 (colored)

Use cpuid_t and cpu_number().

Revision 1.16.2.1.2.3 / (download) - annotate - [select for diffs], Mon Aug 2 22:19:12 1999 UTC (23 years, 10 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.16.2.1.2.2: +425 -226 lines
Diff to previous 1.16.2.1.2.2 (colored) to branchpoint 1.16.2.1 (colored) next main 1.17 (colored)

Update from trunk.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jul 28 19:29:39 1999 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.22: +41 -43 lines
Diff to previous 1.22 (colored)

Fix a thinko in draining of spin locks: bump waitcount in the spin case,
too.  Remove some needless code duplication by adding a "drain" argument
to the ACQUIRE() macro (compiler can [and does] optimize the constant
conditional).

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jul 28 01:59:46 1999 UTC (23 years, 10 months ago) by mellon
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

- Correct the definition of the COUNT macro so that it takes the same
  number of arguments when compiled without DIAGNOSTIC as with.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jul 27 21:29:16 1999 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.20: +252 -91 lines
Diff to previous 1.20 (colored)

Improve the LOCKDEBUG code:
- Now compatible with MULTIPROCESSOR (requires other changes not yet
  committed, but which will be later today).
- In addition to tracking simple locks, track exclusive spin locks.
- Count spin locks like we do sleep locks (in the cpu_info for this
  CPU).
- Lock debug lists are now TAILQs, so as to make the locking order
  more obvious when dumping the list.

Also, some suggestions from Bill Sommerfeld:
- SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED constants, which may be
  defined in <machine/lock.h> (default to 1 and 0, respectively).  This
  makes it easier to support architectures which use test-and-clear
  rather than test-and-set.
- Add __attribute__((__aligned__)) to the `lock_data' member of the
  simplelock structure.  This makes it easier to support architectures
  which can only perform atomic operations on very-well-aligned memory
  locations.  NOTE: This changes the size of struct simplelock, and
  will cause a version bump.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jul 26 23:02:53 1999 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.19: +5 -5 lines
Diff to previous 1.19 (colored)

Use wakeup_one() for waking up sleep lock sleepers.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Jul 25 06:24:23 1999 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.18: +178 -54 lines
Diff to previous 1.18 (colored)

Add a spin lock mode to the lock manager.  Provides a read/write
spin lock facility.  Some code and ideas from Ross Harvey.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jul 19 03:21:11 1999 UTC (23 years, 10 months ago) by chs
Branch: MAIN
Changes since 1.17: +29 -87 lines
Diff to previous 1.17 (colored)

more cleanup:
remove simplelockrecurse, lockpausetime and PAUSE():
none of these serve any purpose anymore.
in the LOCKDEBUG functions, expand the splhigh() region to
cover the entire function.  without this there can still be races.

Revision 1.16.2.1.2.2 / (download) - annotate - [select for diffs], Sun Jul 4 01:35:32 1999 UTC (23 years, 11 months ago) by chs
Branch: chs-ubc2
Changes since 1.16.2.1.2.1: +24 -13 lines
Diff to previous 1.16.2.1.2.1 (colored) to branchpoint 1.16.2.1 (colored)

expand splhigh() to be around the entire body of the LOCKDEBUG functions.
things could still get out of sync and cause panics as they were.

Revision 1.16.2.1.2.1 / (download) - annotate - [select for diffs], Mon Jun 7 04:25:30 1999 UTC (24 years ago) by chs
Branch: chs-ubc2
Changes since 1.16.2.1: +47 -18 lines
Diff to previous 1.16.2.1 (colored)

merge everything from chs-ubc branch.

Revision 1.12.2.3 / (download) - annotate - [select for diffs], Sun May 30 14:56:33 1999 UTC (24 years ago) by chs
Branch: chs-ubc
Changes since 1.12.2.2: +11 -1 lines
Diff to previous 1.12.2.2 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

add a flag "simple_lock_debugger".  if this is set and we detect
a locking error, call Debugger().

Revision 1.16.2.1 / (download) - annotate - [select for diffs], Tue May 4 17:05:42 1999 UTC (24 years, 1 month ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored) next main 1.17 (colored)

pullup 1.16->1.17 (sommerfeld)

Revision 1.17 / (download) - annotate - [select for diffs], Tue May 4 15:58:53 1999 UTC (24 years, 1 month ago) by sommerfe
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

Count lockmgr locks held by process if LOCKDEBUG || DIAGNOSTIC.
(previously, it was just under LOCKDEBUG).

Revision 1.16 / (download) - annotate - [select for diffs], Thu Mar 25 00:20:35 1999 UTC (24 years, 2 months ago) by sommerfe
Branch: MAIN
CVS Tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Changes since 1.15: +8 -3 lines
Diff to previous 1.15 (colored)

Prevent deadlock cited in PR4629 from crashing the system.  (copyout
and system call now just return EFAULT).  A complete fix will
presumably have to wait for UBC and/or for vnode locking protocols to
be revamped to allow use of shared locks.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Feb 28 14:09:15 1999 UTC (24 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.14: +16 -2 lines
Diff to previous 1.14 (colored)

Recursive locks were previously only available with LK_CANRECURSE. This
could be done in one of 2 ways:

	* call lk_init with LK_CANRECURSE, resulting in a lock that
 	  always can be used recursively.
	* call lockmgr with LK_CANRECURSE, meaning that it's ok if this
	  lock is already held by us.

Sometimes we need a locking type that says: take this lock now, exclusively,
but while I am holding it, I may go through a code path which could attempt
to get the lock again, and which is unaware that the lock might already
be taken.  Implement LK_SETRECURSE for this purpose. Assume that locks and
unlocks come in matching pairs (they should), and check for this 'level'
using SETRECURSE locks.

Revision 1.12.2.2 / (download) - annotate - [select for diffs], Thu Feb 25 03:55:04 1999 UTC (24 years, 3 months ago) by chs
Branch: chs-ubc
Changes since 1.12.2.1: +22 -18 lines
Diff to previous 1.12.2.1 (colored) to branchpoint 1.12 (colored)

use SLOCK_{,UN}LOCKED for LOCKDEBUG code.
don't bother sleeping when the lock is in the wrong state,
it'll just panic anyway.
change _simple_lock_try() to return 0 if the lock is already held...
this should never happen on a uniprocessor so it's better to know
right away.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jan 22 07:55:17 1999 UTC (24 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored)

print a little more info in simple_lock_freecheck().

Revision 1.13 / (download) - annotate - [select for diffs], Wed Dec 2 10:41:01 1998 UTC (24 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Cosmectic change in a panic(), so that the panic string printed by savecore
has more meaning.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Mon Nov 9 06:06:31 1998 UTC (24 years, 7 months ago) by chs
Branch: chs-ubc
Changes since 1.12: +15 -1 lines
Diff to previous 1.12 (colored)

initial snapshot.  lots left to do.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Nov 4 06:19:56 1998 UTC (24 years, 7 months ago) by chs
Branch: MAIN
CVS Tags: chs-ubc-base
Branch point for: chs-ubc
Changes since 1.11: +63 -1 lines
Diff to previous 1.11 (colored)

LOCKDEBUG enhancements for non-MP:
keep a list of locked locks.
use this to print where the lock was locked
when we either go to sleep with a lock held
or try to free a locked lock.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Oct 14 09:41:21 1998 UTC (24 years, 7 months ago) by pk
Branch: MAIN
Changes since 1.10: +7 -3 lines
Diff to previous 1.10 (colored)

Disable the daft PAUSE() macro, which manages to skip all the relevant
code in lockmgr() most of the time. This a no doubt a case of Bad Coding Style.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Sep 29 07:29:53 1998 UTC (24 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored)

Initialize the CPU ID in the simplelock.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Sep 24 22:30:11 1998 UTC (24 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.8: +6 -6 lines
Diff to previous 1.8 (colored)

Key off MULTIPROCESSOR, not NCPUS > 1.  Pull in <machine/lock.h> if
MULTIPROCESSOR is defined, and rely on it to define the simple lock
operations.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:12 1998 UTC (24 years, 10 months ago) by perry
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
  bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)

Revision 1.7 / (download) - annotate - [select for diffs], Wed May 20 01:32:29 1998 UTC (25 years ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.6: +3 -1 lines
Diff to previous 1.6 (colored)

defopt LOCKDEBUG

Revision 1.6 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:29 1998 UTC (25 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Merge with Lite2 + local changes

Revision 1.5 / (download) - annotate - [select for diffs], Sat Feb 7 02:14:04 1998 UTC (25 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.4: +27 -9 lines
Diff to previous 1.4 (colored)

snazzier LOCKDEBUG code.

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Tue Oct 14 10:25:58 1997 UTC (25 years, 7 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored) next main 1.4 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Oct 9 12:49:44 1997 UTC (25 years, 8 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-base
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

Make wmesg arguments to various functions const.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jul 6 22:51:59 1997 UTC (25 years, 11 months ago) by fvdl
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp
Branch point for: marc-pcmcia
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored)

There appear to be spinlock bugs in the VM code. They are not a problem
now, as we're always one on CPU (they will be later, though). With DEBUG,
they cause a lot of output, so DEBUG -> LOCKDEBUG for now.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jul 6 12:35:33 1997 UTC (25 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.1: +10 -2 lines
Diff to previous 1.1 (colored)

Add NetBSD RCS Id, and a few minor changes to make it compile.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Jul 6 12:19:54 1997 UTC (25 years, 11 months ago) by fvdl
Branch: CSRG
CVS Tags: lite-2
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

Import Lite2 locking code

Revision 1.1 / (download) - annotate - [select for diffs], Sun Jul 6 12:19:54 1997 UTC (25 years, 11 months ago) by fvdl
Branch: MAIN

Initial revision

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




CVSweb <webmaster@jp.NetBSD.org>