The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.45 / (download) - annotate - [select for diffs], Wed Oct 26 23:27:16 2022 UTC (3 months ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored)

kern/kern_turnstile.c: Get turnstile0 from sys/sleeptab.h.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Jun 29 22:27:01 2022 UTC (7 months ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

sleepq(9): Pass syncobj through to sleepq_block.

Previously the usage pattern was:

sleepq_enter(sq, l, lock);              // locks l
...
sleepq_enqueue(sq, ..., sobj, ...);     // assumes l locked, sets l_syncobj
... (*)
sleepq_block(...);			// unlocks l

As long as l remains locked from sleepq_enter to sleepq_block,
l_syncobj is stable, and sleepq_block uses it via ktrcsw to determine
whether the sleep is on a mutex in order to avoid creating ktrace
context-switch records (which involves allocation which is forbidden
in softint context, while taking and even sleeping for a mutex is
allowed).

However, in turnstile_block, the logic at (*) also involves
turnstile_lendpri, which sometimes unlocks and relocks l.  At that
point, another thread can swoop in and sleepq_remove l, which sets
l_syncobj to sched_syncobj.  If that happens, ktrcsw does what is
forbidden -- tries to allocate a ktrace record for the context
switch.

As an optimization, sleepq_block or turnstile_block could stop early
if it detects that l_syncobj doesn't match -- we've already been
requested to wake up at this point so there's no need to mi_switch.
(And then it would be unnecessary to pass the syncobj through
sleepq_block, because l_syncobj would remain stable.)  But I'll leave
that to another change.

Reported-by: syzbot+8b9d7b066c32dbcdc63b@syzkaller.appspotmail.com

Revision 1.43 / (download) - annotate - [select for diffs], Sat May 28 22:08:46 2022 UTC (8 months ago) by andvar
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

s/grabing/grabbing/ in comments.

Revision 1.42 / (download) - annotate - [select for diffs], Sat Apr 9 23:45:36 2022 UTC (9 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.41: +6 -5 lines
Diff to previous 1.41 (colored)

kern: Handle l_mutex with atomic_store_release, atomic_load_consume.

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

Nix membar_exit.

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

Revision 1.41 / (download) - annotate - [select for diffs], Wed Feb 23 21:54:41 2022 UTC (11 months ago) by andvar
Branch: MAIN
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

fix various typos in comments, mainly immediatly/immediately/,
as well shared and recently fixed typos in OpenBSD code by Jonathan Grey.

Revision 1.40 / (download) - annotate - [select for diffs], Sat May 23 20:45:10 2020 UTC (2 years, 8 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-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.39: +8 -13 lines
Diff to previous 1.39 (colored)

- Replace pid_table_lock with a lockless lookup covered by pserialize, with
  the "writer" side being pid_table expansion.  The basic idea is that when
  doing an LWP lookup there is usually already a lock held (p->p_lock), or a
  spin mutex that needs to be taken (l->l_mutex), and either can be used to
  get the found LWP stable and confidently determine that all is correct.

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

Revision 1.32.40.2 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:42 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.32.40.1: +1 -1 lines
Diff to previous 1.32.40.1 (colored) to branchpoint 1.32 (colored) next main 1.33 (colored)

Sync with HEAD

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:10 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

Sync with HEAD

Revision 1.39 / (download) - annotate - [select for diffs], Sun Apr 19 20:35:29 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

Set LW_SINTR earlier so it doesn't pose a problem for doing interruptable
waits with turnstiles (not currently done).

Revision 1.32.40.1 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:51 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.32: +60 -46 lines
Diff to previous 1.32 (colored)

Merge changes from current as of 20200406

Revision 1.38 / (download) - annotate - [select for diffs], Thu Mar 26 22:43:19 2020 UTC (2 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored)

TAILQ -> LIST

Revision 1.37 / (download) - annotate - [select for diffs], Thu Mar 26 19:46:42 2020 UTC (2 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.36: +10 -9 lines
Diff to previous 1.36 (colored)

Change sleepq_t from a TAILQ to a LIST and remove SOBJ_SLEEPQ_FIFO.  Only
select/poll used the FIFO method and that was for collisions which rarely
occur.  Shrinks sleep_t and condvar_t.

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Sat Jan 25 22:38:51 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.35: +4 -8 lines
Diff to previous 1.35 (colored) next main 1.36 (colored)

Sync with head.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jan 21 20:31:57 2020 UTC (3 years ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3, ad-namecache-base2
Changes since 1.35: +4 -8 lines
Diff to previous 1.35 (colored)

ddb's "show all locks":

- Make the output easier to scan quickly.

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

Revision 1.35 / (download) - annotate - [select for diffs], Mon Dec 16 19:22:15 2019 UTC (3 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.34: +13 -10 lines
Diff to previous 1.34 (colored)

Just make the turnstile locks statics and avoid the indirect reference
since COHERENCY_UNIT does the right thing in !MP.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Nov 24 13:14:23 2019 UTC (3 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

Put section attribute for turnstile0 in the correct place.  For LLVM.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Nov 21 18:56:55 2019 UTC (3 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.32: +49 -35 lines
Diff to previous 1.32 (colored)

Sleep queues & turnstiles:

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

Revision 1.30.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:32 2012 UTC (10 years, 3 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.30.2.1: +34 -14 lines
Diff to previous 1.30.2.1 (colored) to branchpoint 1.30 (colored) next main 1.31 (colored)

sync with head

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

comments and assertions.
no functional changes.

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:27 2012 UTC (10 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.30: +142 -118 lines
Diff to previous 1.30 (colored)

sync with head

Revision 1.31 / (download) - annotate - [select for diffs], Fri Dec 2 12:31:53 2011 UTC (11 years, 2 months ago) by yamt
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.30: +142 -118 lines
Diff to previous 1.30 (colored)

move priority inheritance code to separate functions

Revision 1.30 / (download) - annotate - [select for diffs], Wed Jul 27 14:35:34 2011 UTC (11 years, 6 months ago) by uebayasi
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.29: +2 -4 lines
Diff to previous 1.29 (colored)

These don't need uvm/uvm_extern.h.

Revision 1.28.6.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:33 2011 UTC (11 years, 7 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.28: +7 -7 lines
Diff to previous 1.28 (colored) next main 1.29 (colored)

Sync with HEAD.

Revision 1.28.4.1 / (download) - annotate - [select for diffs], Tue May 31 03:05:02 2011 UTC (11 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.28: +7 -7 lines
Diff to previous 1.28 (colored) next main 1.29 (colored)

sync with head

Revision 1.29 / (download) - annotate - [select for diffs], Fri May 13 22:19:41 2011 UTC (11 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.28: +7 -7 lines
Diff to previous 1.28 (colored)

Sprinkle __cacheline_aligned and __read_mostly, make some functions static.

Revision 1.23.12.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:28:17 2010 UTC (12 years, 9 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.23: +25 -4 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

sync to netbsd-5

Revision 1.18.2.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:18 2010 UTC (12 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18.2.3: +7 -17 lines
Diff to previous 1.18.2.3 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored)

sync with head

Revision 1.28 / (download) - annotate - [select for diffs], Wed Nov 18 12:26:22 2009 UTC (13 years, 2 months ago) by yamt
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, matt-premerge-20091211, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: rmind-uvmplock, jruoho-x86intr
Changes since 1.27: +3 -13 lines
Diff to previous 1.27 (colored)

turnstile_block: reduce code duplication.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Nov 18 12:25:15 2009 UTC (13 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

turnstile_block: turn a comment into KASSERTs.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Oct 21 21:12:06 2009 UTC (13 years, 3 months ago) by rmind
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.25: +4 -4 lines
Diff to previous 1.25 (colored)

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.

Revision 1.23.4.1 / (download) - annotate - [select for diffs], Mon Sep 28 01:38:24 2009 UTC (13 years, 4 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.23: +25 -4 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1028):
	sys/kern/kern_turnstile.c: revision 1.25 via patch
PR kern/41923: assertion "cur != owner" failed
In the for(;;) loop of turnstile_block(), the lock owner can change while
cur's lock is released (cur's lock is also the tschain_t's mutex).
Remove the KASSERT about owner being invariant and try to deal with the
fact that the owner can change instead.
http://mail-index.netbsd.org/tech-kern/2009/08/24/msg005957.html
and followups.

Revision 1.18.2.3 / (download) - annotate - [select for diffs], Wed Sep 16 13:38:01 2009 UTC (13 years, 4 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18.2.2: +25 -4 lines
Diff to previous 1.18.2.2 (colored) to branchpoint 1.18 (colored)

sync with head

Revision 1.25 / (download) - annotate - [select for diffs], Sun Sep 13 14:38:20 2009 UTC (13 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.24: +25 -4 lines
Diff to previous 1.24 (colored)

PR kern/41923: assertion "cur != owner" failed
In the for(;;) loop of turnstile_block(), the lock owner can change while
cur's lock is released (cur's lock is also the tschain_t's mutex).
Remove the KASSERT about owner being invariant and try to deal with the
fact that the owner can change instead.
http://mail-index.netbsd.org/tech-kern/2009/08/24/msg005957.html
and followups.

Revision 1.23.8.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:57 2009 UTC (13 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.23: +11 -11 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

Sync with HEAD.

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

Revision 1.18.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:47 2009 UTC (13 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18.2.1: +35 -30 lines
Diff to previous 1.18.2.1 (colored) to branchpoint 1.18 (colored)

sync with head.

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:00 2009 UTC (13 years, 9 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.23: +11 -11 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

Sync with HEAD.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Mar 21 13:11:14 2009 UTC (13 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.23: +11 -11 lines
Diff to previous 1.23 (colored)

Allocate sleep queue locks with mutex_obj_alloc. Reduces memory usage
on !MP kernels, and reduces false sharing on MP ones.

Revision 1.22.4.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:28 2008 UTC (14 years, 3 months ago) by haad
Branch: haad-dm
Changes since 1.22: +3 -2 lines
Diff to previous 1.22 (colored) next main 1.23 (colored)

Sync with HEAD.

Revision 1.15.6.3 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:53 2008 UTC (14 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.15.6.2: +1 -0 lines
Diff to previous 1.15.6.2 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored)

Sync with HEAD.

Revision 1.20.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:43 2008 UTC (14 years, 4 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.20.2.1: +3 -2 lines
Diff to previous 1.20.2.1 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Aug 12 14:13:34 2008 UTC (14 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, nick-hppapmap-base2, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, mjf-devfs2-base, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, matt-nb5-mips64, jym-xensuspend
Changes since 1.22: +3 -2 lines
Diff to previous 1.22 (colored)

turnstile_block(): When an LWP puts its turnstile onto a sync object's
turnstile chain, assert that its turnstile's free list pointer is NULL.

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

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

Revision 1.17.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:39 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.17.2.1: +27 -23 lines
Diff to previous 1.17.2.1 (colored) to branchpoint 1.17 (colored) next main 1.18 (colored)

sync with head

Revision 1.15.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:10 2008 UTC (14 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.15.6.1: +39 -30 lines
Diff to previous 1.15.6.1 (colored) to branchpoint 1.15 (colored)

Sync with HEAD.

Revision 1.22 / (download) - annotate - [select for diffs], Sat May 31 12:03:15 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl
Branch point for: haad-dm
Changes since 1.21: +7 -3 lines
Diff to previous 1.21 (colored)

Add a comment to turnstile_block:

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

Revision 1.21 / (download) - annotate - [select for diffs], Mon May 26 12:08:38 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.20: +22 -22 lines
Diff to previous 1.20 (colored)

Take the mutex pointer and waiters count out of sleepq_t: the values can
be or are maintained elsewhere. Now a sleepq_t is just a TAILQ_HEAD.

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:09 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.17: +11 -10 lines
Diff to previous 1.17 (colored)

sync with head.

Revision 1.18.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:26 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18: +10 -9 lines
Diff to previous 1.18 (colored)

sync with head.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:04 2008 UTC (14 years, 9 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.19: +2 -9 lines
Diff to previous 1.19 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.19 / (download) - annotate - [select for diffs], Mon Apr 28 15:36:01 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.18: +10 -2 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Thu Apr 24 23:26:00 2008 UTC (14 years, 9 months ago) by alc
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

fix typo in comment

Revision 1.17 / (download) - annotate - [select for diffs], Fri Apr 4 19:16:24 2008 UTC (14 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.16: +7 -3 lines
Diff to previous 1.16 (colored)

When a timeshared LWP blocks on a turnstile, elevate its priority into the
PRI_KTHREAD range. This is kind of ugly, but needed because of direct handoff
with rwlocks, and because threads that block holding a mutex regularly hold
other locks/resources.

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

Revision 1.15.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:03 2008 UTC (14 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

Sync with HEAD.

Revision 1.1.18.7 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:02 2008 UTC (14 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.6: +4 -4 lines
Diff to previous 1.1.18.6 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

sync with head.

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:14 2008 UTC (14 years, 10 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored) next main 1.16 (colored)

sync with head.

Revision 1.10.8.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:00 2008 UTC (14 years, 10 months ago) by matt
Branch: matt-armv6
Changes since 1.10.8.3: +5 -5 lines
Diff to previous 1.10.8.3 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored)

sync with HEAD

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 17 16:54:51 2008 UTC (14 years, 10 months ago) by ad
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.15: +4 -4 lines
Diff to previous 1.15 (colored)

Add a boolean parameter to syncobj_t::sobj_unsleep. If true we want the
existing behaviour: the unsleep method unlocks and wakes the swapper if
needs be. If false, the caller is doing a batch operation and will take
care of that later. This is kind of ugly, but it's difficult for the caller
to know which lock to release in some situations.

Revision 1.1.18.6 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:55 2008 UTC (14 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.5: +3 -3 lines
Diff to previous 1.1.18.5 (colored) to branchpoint 1.1 (colored)

sync with head.

Revision 1.10.14.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:46 2008 UTC (14 years, 11 months ago) by mjf
Branch: mjf-devfs
Changes since 1.10.14.2: +3 -4 lines
Diff to previous 1.10.14.2 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored)

Sync with HEAD.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Feb 14 14:26:57 2008 UTC (14 years, 11 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.14: +3 -3 lines
Diff to previous 1.14 (colored)

Make schedstate_percpu::spc_lwplock an exernally allocated item. Remove
the hacks in sparc/cpu.c to reinitialize it. This should be in its own
cache line but that's another change.

Revision 1.1.18.5 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:15 2008 UTC (15 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.4: +2 -3 lines
Diff to previous 1.1.18.4 (colored) to branchpoint 1.1 (colored)

sync with head

Revision 1.10.8.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:12 2008 UTC (15 years ago) by matt
Branch: matt-armv6
Changes since 1.10.8.2: +3 -4 lines
Diff to previous 1.10.8.2 (colored) to branchpoint 1.10 (colored)

sync with HEAD

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

Sync with HEAD

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jan 4 21:18:11 2008 UTC (15 years ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.13: +2 -3 lines
Diff to previous 1.13 (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.10.6.3 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:22 2007 UTC (15 years, 1 month ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.10.6.2: +3 -3 lines
Diff to previous 1.10.6.2 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored)

Sync with HEAD.

Revision 1.10.14.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:34 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.10.14.1: +3 -3 lines
Diff to previous 1.10.14.1 (colored) to branchpoint 1.10 (colored)

Sync with HEAD.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:44 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

Sync with head.

Revision 1.1.18.4 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:54 2007 UTC (15 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.3: +3 -3 lines
Diff to previous 1.1.18.3 (colored) to branchpoint 1.1 (colored)

sync with head

Revision 1.13 / (download) - annotate - [select for diffs], Wed Dec 5 07:06:54 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written
for Solaris.

Revision 1.10.14.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:45 2007 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.10: +14 -18 lines
Diff to previous 1.10 (colored)

Sync with HEAD.

Revision 1.1.18.3 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:46 2007 UTC (15 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.2: +14 -18 lines
Diff to previous 1.1.18.2 (colored) to branchpoint 1.1 (colored)

sync with head.

Revision 1.10.12.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:14 2007 UTC (15 years, 2 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.10: +14 -18 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

Sync with HEAD

Revision 1.10.6.2 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:05 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.10.6.1: +6 -9 lines
Diff to previous 1.10.6.1 (colored) to branchpoint 1.10 (colored)

Sync with HEAD.

Revision 1.10.8.2 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:04 2007 UTC (15 years, 2 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.10.8.1: +6 -9 lines
Diff to previous 1.10.8.1 (colored) to branchpoint 1.10 (colored)

sync with -HEAD

Revision 1.12 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:22 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2
Changes since 1.11: +6 -9 lines
Diff to previous 1.11 (colored)

Merge from vmlocking:

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

Revision 1.10.8.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:32:06 2007 UTC (15 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.10: +10 -11 lines
Diff to previous 1.10 (colored)

sync with HEAD

Revision 1.10.6.1 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:32 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.10: +10 -11 lines
Diff to previous 1.10 (colored)

Sync with HEAD.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Nov 6 00:42:43 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Changes since 1.10: +10 -11 lines
Diff to previous 1.10 (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.6.2.8 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:21 2007 UTC (15 years, 3 months ago) by ad
Branch: vmlocking
Changes since 1.6.2.7: +5 -6 lines
Diff to previous 1.6.2.7 (colored) next main 1.7 (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.1.18.2 / (download) - annotate - [select for diffs], Mon Sep 3 14:40:58 2007 UTC (15 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.1: +153 -61 lines
Diff to previous 1.1.18.1 (colored) to branchpoint 1.1 (colored)

sync with head.

Revision 1.6.2.7 / (download) - annotate - [select for diffs], Sat Sep 1 12:56:48 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.6.2.6: +6 -9 lines
Diff to previous 1.6.2.6 (colored)

Update for pool_cache API changes.

Revision 1.7.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:09:59 2007 UTC (15 years, 6 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.7: +37 -47 lines
Diff to previous 1.7 (colored) next main 1.8 (colored)

Sync with head.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:54 2007 UTC (15 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: mjf-devfs, matt-armv6, jmcneill-pm, bouyer-xenamd64
Changes since 1.9: +11 -11 lines
Diff to previous 1.9 (colored)

Merge some of the less invasive changes from the vmlocking branch:

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

Revision 1.6.2.6 / (download) - annotate - [select for diffs], Sun Jul 1 21:27:59 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.6.2.5: +13 -13 lines
Diff to previous 1.6.2.5 (colored)

Repair priority inheritance (broken by the changes to priority levels).

Revision 1.6.2.5 / (download) - annotate - [select for diffs], Sun Jun 17 21:31:29 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.6.2.4: +5 -5 lines
Diff to previous 1.6.2.4 (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.6.2.4 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:23 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.6.2.3: +23 -33 lines
Diff to previous 1.6.2.3 (colored)

Sync with head.

Revision 1.9 / (download) - annotate - [select for diffs], Thu May 17 14:51:41 2007 UTC (15 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.8: +24 -40 lines
Diff to previous 1.8 (colored)

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

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

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

Revision 1.3.2.9 / (download) - annotate - [select for diffs], Sun May 13 17:02:59 2007 UTC (15 years, 8 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.3.2.8: +3 -3 lines
Diff to previous 1.3.2.8 (colored) next main 1.4 (colored)

Assign a per-CPU lock to LWPs as they transition into the ONPROC state.

http://mail-index.netbsd.org/tech-kern/2007/05/06/0003.html

Revision 1.3.2.8 / (download) - annotate - [select for diffs], Thu Apr 19 04:19:44 2007 UTC (15 years, 9 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.3.2.7: +8 -16 lines
Diff to previous 1.3.2.7 (colored)

Pull up a change from the vmlocking branch:

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

Revision 1.3.2.7 / (download) - annotate - [select for diffs], Mon Apr 16 23:31:21 2007 UTC (15 years, 9 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.3.2.6: +14 -24 lines
Diff to previous 1.3.2.6 (colored)

- Nuke the seperate scheduler locking scheme for UP kernels - it has been
  at the root of too many bugs.
- Add a LW_BOUND flag that indicates an LWP is bound to a specific CPU.

Revision 1.3.2.6 / (download) - annotate - [select for diffs], Sun Apr 15 16:38:49 2007 UTC (15 years, 9 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.3.2.5: +6 -4 lines
Diff to previous 1.3.2.5 (colored)

sched_mutex -> spc_mutex.

Revision 1.3.2.5 / (download) - annotate - [select for diffs], Sun Apr 15 16:03:50 2007 UTC (15 years, 9 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.3.2.4: +10 -4 lines
Diff to previous 1.3.2.4 (colored)

sync with head.

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Tue Apr 10 18:34:05 2007 UTC (15 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.6.2.2: +13 -19 lines
Diff to previous 1.6.2.2 (colored)

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

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

Sync with head.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Apr 10 13:11:08 2007 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Changes since 1.7: +10 -4 lines
Diff to previous 1.7 (colored)

turnstile_wakeup: when restoring inherited priority, only lock curlwp
if its lock is sched_mutex. We can arrive here while on a sleep queue
(from eg cv_wait) and so curlwp will already be locked.

Revision 1.3.2.4 / (download) - annotate - [select for diffs], Sat Mar 24 17:10:48 2007 UTC (15 years, 10 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.3.2.3: +3 -3 lines
Diff to previous 1.3.2.3 (colored)

Fix UP kernels. Having the different locking scheme for UP/MP is turning
out to be more hassle than it's worth...

Revision 1.3.2.3 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:04 2007 UTC (15 years, 10 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.3.2.2: +3 -3 lines
Diff to previous 1.3.2.2 (colored)

sync with head.

Revision 1.3.2.2 / (download) - annotate - [select for diffs], Sat Mar 24 00:43:08 2007 UTC (15 years, 10 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.3.2.1: +3 -3 lines
Diff to previous 1.3.2.1 (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.6.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:51:56 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

Sync with head.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:34 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:26 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.3: +124 -22 lines
Diff to previous 1.3 (colored)

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

Revision 1.6 / (download) - annotate - [select for diffs], Tue Feb 27 15:07:29 2007 UTC (15 years, 11 months ago) by yamt
Branch: MAIN
Branch point for: vmlocking
Changes since 1.5: +5 -5 lines
Diff to previous 1.5 (colored)

typedef pri_t and use it instead of int and u_char.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Feb 27 12:17:55 2007 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

turnstile_wakeup(): on a !MULTIPROCESSOR kernel the LWP is already locked.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Feb 26 09:20:53 2007 UTC (15 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.3: +123 -21 lines
Diff to previous 1.3 (colored)

implement priority inheritance.

Revision 1.1.18.1 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:13 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1: +407 -0 lines
Diff to previous 1.1 (colored)

sync with head.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Feb 15 20:21:13 2007 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.2: +5 -3 lines
Diff to previous 1.2 (colored)

Add uvm_kick_scheduler() (MP safe) to replace wakeup(&proc0).

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

Merge newlock2 to head.

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

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

Revision 1.1.36.8 / (download) - annotate - [select for diffs], Mon Feb 5 17:58:13 2007 UTC (15 years, 11 months ago) by ad
Branch: newlock2
Changes since 1.1.36.7: +4 -7 lines
Diff to previous 1.1.36.7 (colored) to branchpoint 1.1 (colored)

Try to reduce cache line ping-ponging.

Revision 1.1.36.7 / (download) - annotate - [select for diffs], Mon Feb 5 13:00:56 2007 UTC (15 years, 11 months ago) by ad
Branch: newlock2
Changes since 1.1.36.6: +60 -17 lines
Diff to previous 1.1.36.6 (colored) to branchpoint 1.1 (colored)

- Dump the contents of a lock's turnstile when an error is detected.
- Add a 'show lock' command to DDB.

Revision 1.1.36.6 / (download) - annotate - [select for diffs], Sat Jan 27 14:00:02 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.1.36.5: +5 -5 lines
Diff to previous 1.1.36.5 (colored) to branchpoint 1.1 (colored)

Rename some functions to better describe what they do.

Revision 1.1.36.5 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:44 2006 UTC (16 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.1.36.4: +8 -8 lines
Diff to previous 1.1.36.4 (colored) to branchpoint 1.1 (colored)

Checkpoint work in progress.

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

Checkpoint work in progress.

Revision 1.1.36.3 / (download) - annotate - [select for diffs], Tue Oct 24 21:10:21 2006 UTC (16 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.1.36.2: +6 -5 lines
Diff to previous 1.1.36.2 (colored) to branchpoint 1.1 (colored)

- Redo LWP locking slightly and fix some races.
- Fix some locking botches.
- Make signal mask / stack per-proc for SA processes.
- Add _lwp_kill().

Revision 1.1.36.2 / (download) - annotate - [select for diffs], Fri Oct 20 19:38:44 2006 UTC (16 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.1.36.1: +107 -256 lines
Diff to previous 1.1.36.1 (colored) to branchpoint 1.1 (colored)

Add a sleep queue implementation.

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

Add updated locking primatives.

Revision 1.1.2.8 / (download) - annotate - [select for diffs], Fri Mar 22 03:51:42 2002 UTC (20 years, 10 months ago) by thorpej
Branch: newlock
Changes since 1.1.2.7: +8 -8 lines
Diff to previous 1.1.2.7 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Use a regular simplelock_t for the turnstile chain lock.

Revision 1.1.2.7 / (download) - annotate - [select for diffs], Sat Mar 16 20:57:42 2002 UTC (20 years, 10 months ago) by thorpej
Branch: newlock
Changes since 1.1.2.6: +36 -10 lines
Diff to previous 1.1.2.6 (colored) to branchpoint 1.1 (colored)

Add a "nextproc" argument to turnstile_wakeup() to selectively
wake up a single thread.  This will allow us to implement direct
handoff of rwlocks.

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Sat Mar 16 03:46:38 2002 UTC (20 years, 10 months ago) by thorpej
Branch: newlock
Changes since 1.1.2.5: +35 -18 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored)

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

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Mon Mar 11 00:44:31 2002 UTC (20 years, 10 months ago) by thorpej
Branch: newlock
Changes since 1.1.2.4: +3 -3 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored)

Use <sys/simplelock.h> rather than <sys/lock.h>.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Sun Mar 10 21:33:10 2002 UTC (20 years, 10 months ago) by thorpej
Branch: newlock
Changes since 1.1.2.3: +4 -4 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored)

Pass a "pri" argument to turnstile_block(), like we do to ltsleep().
This allows the caller of turnstile_block() to decide what to do about
priority and PCATCH (though we still don't handle PCATCH in turnstiles).

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Sun Mar 10 21:05:11 2002 UTC (20 years, 10 months ago) by thorpej
Branch: newlock
Changes since 1.1.2.2: +31 -8 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored)

Some suggestions from Bill Sommerfeld:
* Use a pool cache for turnstiles, so you can save the memset().  Add
  some asserts to make sure that inactive turnstiles end up in their
  freshly-constructed state.
* Invalidate p->p_ts before returning p to the proc pool (only done if
  DIAGNOSTIC).
* Fix up some comments in kern_turnstile.c
* Bugfix in turnstile_remque(): typo ("==" should have been "=").

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Sun Mar 10 20:05:31 2002 UTC (20 years, 10 months ago) by thorpej
Branch: newlock
Changes since 1.1.2.1: +4 -3 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

TURNSTILE_CHAIN_UNLOCK(): Don't reference tc_oldspl after releasing
tc_lock.  From Bill Sommerfeld.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Sun Mar 10 19:08:24 2002 UTC (20 years, 10 months ago) by thorpej
Branch: newlock
Changes since 1.1: +372 -0 lines
Diff to previous 1.1 (colored)

First cut implementation of turnstiles, a specialized sleep queue used for
kernel synchronization objects.  A detailed description of turnstiles
can be found in:

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

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

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

file kern_turnstile.c was initially added on branch newlock.

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>