The NetBSD Project

CVS log for src/sys/sys/sched.h

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.94 / (download) - annotate - [select for diffs], Wed Sep 6 12:29:14 2023 UTC (6 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.93: +1 -2 lines
Diff to previous 1.93 (colored) to selected 1.43.6.2 (colored)

heartbeat(9): Make heartbeat_suspend/resume nestable.

And make them bind to the CPU as a side effect, instead of requiring
the caller to have already done so.

This lets us eliminate the assertions so we can use them in ddb even
when things are going haywire and we just want to get diagnostics.

XXX kernel revbump -- struct cpu_info change

Revision 1.93 / (download) - annotate - [select for diffs], Sat Sep 2 17:43:37 2023 UTC (6 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.92: +2 -1 lines
Diff to previous 1.92 (colored) to selected 1.43.6.2 (colored)

heartbeat(9): New flag SPCF_HEARTBEATSUSPENDED.

This way we can suspend heartbeats on a single CPU while the console
is in polling mode, not just when the CPU is offlined.  This should
be rare, so it's not _convenient_, but it should enable us to fix
polling-mode console input when the hardclock timer is still running
on other CPUs.

Revision 1.91.2.1 / (download) - annotate - [select for diffs], Wed Aug 9 17:42:01 2023 UTC (7 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.91: +5 -4 lines
Diff to previous 1.91 (colored) next main 1.92 (colored) to selected 1.43.6.2 (colored)

Pull up following revision(s) (requested by maya in ticket #316):

	sys/arch/m68k/include/mutex.h: revision 1.13
	sys/arch/arm/include/cpu.h: revision 1.125
	sys/arch/sun68k/include/intr.h: revision 1.21
	sys/arch/arm/include/mutex.h: revision 1.28
	sys/sys/rwlock.h: revision 1.18
	sys/arch/powerpc/include/mutex.h: revision 1.7
	sys/arch/arm/include/mutex.h: revision 1.29
	sys/arch/powerpc/include/mutex.h: revision 1.8
	sys/uvm/uvm_param.h: revision 1.42
	sys/sys/ksem.h: revision 1.16
	sys/arch/x86/include/mutex.h: revision 1.10
	sys/sys/proc.h: revision 1.372
	sys/sys/ksem.h: revision 1.17
	sys/arch/ia64/include/mutex.h: revision 1.8
	sys/arch/evbarm/include/intr.h: revision 1.29
	sys/sys/lua.h: revision 1.9
	sys/arch/next68k/include/intr.h: revision 1.23
	sys/arch/ia64/include/mutex.h: revision 1.9
	sys/arch/hp300/include/intr.h: revision 1.35
	sys/arch/hp300/include/intr.h: revision 1.36
	sys/arch/sparc/include/cpu.h: revision 1.111
	sys/arch/hppa/include/mutex.h: revision 1.16
	sys/arch/vax/include/intr.h: revision 1.31
	sys/arch/hppa/include/mutex.h: revision 1.17
	sys/arch/news68k/include/intr.h: revision 1.28
	sys/arch/hppa/include/mutex.h: revision 1.18
	sys/arch/hppa/include/intr.h: revision 1.3
	sys/arch/hppa/include/mutex.h: revision 1.19
	sys/arch/hppa/include/intr.h: revision 1.4
	sys/sys/sched.h: revision 1.92
	sys/opencrypto/cryptodev.h: revision 1.51
	sys/arch/vax/include/mutex.h: revision 1.20
	sys/arch/sparc64/include/mutex.h: revision 1.10
	sys/arch/ia64/include/sapicvar.h: revision 1.2
	sys/arch/riscv/include/mutex.h: revision 1.5
	sys/arch/amiga/dev/grfabs_cc.c: revision 1.39
	sys/external/bsd/drm2/include/linux/idr.h: revision 1.11
	sys/arch/riscv/include/mutex.h: revision 1.6
	sys/ddb/files.ddb: revision 1.16
	sys/arch/mac68k/include/intr.h: revision 1.32
	share/man/man4/ddb.4: revision 1.203
	sys/ddb/db_command.c: revision 1.183
	sys/arch/mips/include/mutex.h: revision 1.10
	sys/ddb/db_command.c: revision 1.184
	sys/arch/x68k/include/intr.h: revision 1.22
	sys/arch/sparc/include/psl.h: revision 1.51
	sys/arch/or1k/include/mutex.h: revision 1.4
	sys/arch/mips/include/mutex.h: revision 1.11
	sys/arch/arm/xscale/pxa2x0_intr.h: revision 1.16
	sys/arch/sparc64/include/cpu.h: revision 1.134
	sys/arch/sparc/include/psl.h: revision 1.52
	sys/arch/or1k/include/mutex.h: revision 1.5
	sys/arch/mvme68k/include/intr.h: revision 1.22
	sys/arch/luna68k/include/intr.h: revision 1.16
	external/cddl/osnet/sys/sys/kcondvar.h: revision 1.6
	sys/arch/sparc/include/mutex.h: revision 1.12
	sys/arch/sparc/include/mutex.h: revision 1.13
	sys/arch/usermode/include/mutex.h: revision 1.5
	sys/arch/usermode/include/mutex.h: revision 1.6
	sys/kern/kern_core.c: revision 1.38
	usr.sbin/crash/Makefile: revision 1.49
	sys/arch/amiga/include/intr.h: revision 1.23
	sys/arch/alpha/include/mutex.h: revision 1.12
	sys/arch/alpha/include/mutex.h: revision 1.13
	sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.16
	sys/ddb/ddb.h: revision 1.6
	sys/arch/sparc64/include/mutex.h: revision 1.8
	sys/arch/sh3/include/mutex.h: revision 1.12
	sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.17
	sys/ddb/db_syncobj.c: revision 1.1
	sys/arch/vax/include/mutex.h: revision 1.18
	sys/arch/sparc64/include/psl.h: revision 1.63
	sys/arch/sparc64/include/mutex.h: revision 1.9
	sys/arch/sh3/include/mutex.h: revision 1.13
	sys/arch/evbarm/lubbock/obio.c: revision 1.13
	sys/arch/atari/include/intr.h: revision 1.23
	sys/ddb/db_syncobj.c: revision 1.2
	sys/arch/vax/include/mutex.h: revision 1.19
	sys/arch/evbarm/g42xxeb/obio.c: revision 1.14
	sys/arch/evbarm/g42xxeb/obio.c: revision 1.15
	sys/arch/cesfic/include/intr.h: revision 1.14
	sys/ddb/db_syncobj.h: revision 1.1
	sys/arch/x86/include/cpu.h: revision 1.134
	sys/arch/evbarm/g42xxeb/obio.c: revision 1.16
	sys/arch/cesfic/include/intr.h: revision 1.15
	sys/arch/arm/xscale/pxa2x0_intr.c: revision 1.26
	sys/sys/cpu_data.h: revision 1.54
	sys/arch/m68k/include/mutex.h: revision 1.12
	sys/arch/ia64/acpi/madt.c: revision 1.6

sys/rwlock.h: Make this more self-contained for bool.

machine/mutex.h: Sprinkle includes so this can be used by crash(8).

ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.

Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

hp300/intr.h: Fix missing includes.
linux/idr.h: Need <sys/mutex.h> for kmutex_t.
amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.

atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).

arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.

Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.

ddb: Cast pointer to uintptr_t first before db_expr_t.

hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

news68k/intr.h: Fix includes.  Put some definitions under _KERNEL.

next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

sys/ksem.h: Hack around fstat(8) abuse of _KERNEL.

sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

x68k/intr.h: Put functions under _KERNEL so crash(8) can use this.

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

Explicitly include <sys/mutex.h> for kmutex_t.

Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.

hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).

mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
Make inclusion of sys/intr.h explicit for spl*.

fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h.  avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h.  And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.

ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.

re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex.  Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT.  Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.

explicitly include no longer implicitly included sys/mutex.h.

arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.

complete the previous - there were two calls to find_first_bit() to fix.

arm/xscale: Missed a spot with previous find_first_bit commit.

evbarm/g42xxeb: Fix off-by-one in previous.

The original find_first_bit(x) was 31 - __builtin_clz((uint32_t)x),
which is equivalent to fls32(x) - 1, not to fls32(x).

Note that fls32 is 1-based and returns 0 for x=0.

Revision 1.92 / (download) - annotate - [select for diffs], Thu Jul 13 12:06:20 2023 UTC (8 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.91: +5 -4 lines
Diff to previous 1.91 (colored) to selected 1.43.6.2 (colored)

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.

sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex.  Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT.  Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

Revision 1.91 / (download) - annotate - [select for diffs], Wed Oct 26 23:24:09 2022 UTC (17 months ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base
Branch point for: netbsd-10
Changes since 1.90: +2 -1 lines
Diff to previous 1.90 (colored) to selected 1.43.6.2 (colored)

sys/sched.h: New home for extern sched_pstats_ticks in kernel.

Revision 1.90 / (download) - annotate - [select for diffs], Sat May 23 23:37:17 2020 UTC (3 years, 10 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, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.89: +2 -1 lines
Diff to previous 1.89 (colored) to selected 1.43.6.2 (colored)

Oops.  If a SCHED_RR thread is preempted and has exceeded its timeslice it
needs to go to the back of the run queue so round-robin actually happens,
otherwise it should go to the front.

Revision 1.89 / (download) - annotate - [select for diffs], Tue May 12 11:21:09 2020 UTC (3 years, 10 months ago) by kamil
Branch: MAIN
Changes since 1.88: +1 -2 lines
Diff to previous 1.88 (colored) to selected 1.43.6.2 (colored)

Remove the stub support of CLONE_PID in clone(2)

CLONE_PID causes the child clonee to share the same process id as cloner.

It was implemented for debugging purposes in the Linux kernel 2.0,
restricted to root only in 2.3.21 and removed from Linux 2.5.16.

The CLONE_PID bit was recycled for CLONE_PIDFD in Linux 5.2.

Revision 1.76.18.1 / (download) - annotate - [select for diffs], Wed Apr 8 14:09:03 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.76: +25 -10 lines
Diff to previous 1.76 (colored) next main 1.77 (colored) to selected 1.43.6.2 (colored)

Merge changes from current as of 20200406

Revision 1.88 / (download) - annotate - [select for diffs], Sat Mar 14 18:08:39 2020 UTC (4 years 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.87: +3 -1 lines
Diff to previous 1.87 (colored) to selected 1.43.6.2 (colored)

- Hide the details of SPCF_SHOULDYIELD and related behind a couple of small
  functions: preempt_point() and preempt_needed().

- preempt(): if the LWP has exceeded its timeslice in kernel, strip it of
  any priority boost gained earlier from blocking.

Revision 1.85.2.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:37 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.85: +10 -5 lines
Diff to previous 1.85 (colored) next main 1.86 (colored) to selected 1.43.6.2 (colored)

Sync with head.

Revision 1.87 / (download) - annotate - [select for diffs], Sun Jan 12 22:03:23 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1
Changes since 1.86: +4 -2 lines
Diff to previous 1.86 (colored) to selected 1.43.6.2 (colored)

A final set of scheduler tweaks:

- Try hard to keep vfork() parent and child on the same CPU until execve(),
  failing that on the same core, but in all other cases scatter new LWPs
  among the different CPU packages, round robin, to try and get the best out
  of the available cache and bus bandwidth.

- Remove attempts at balancing.  Replace with a rate-limited skim of other
  CPU's run queues in sched_idle(), starting in the current package and
  moving outwards.  Add a sysctl tunable to change the interval.

- Make the cacheht_time tuneable take a milliseconds value.

- It's possible to configure things such that there's no CPU allowed to run
  an LWP.  Defeat this by always having a default:

Reported-by: syzbot+46968944dd9359ab93bc@syzkaller.appspotmail.com
Reported-by: syzbot+7f750a4cc230d1e831f9@syzkaller.appspotmail.com
Reported-by: syzbot+88d7675158f5cb4684db@syzkaller.appspotmail.com
Reported-by: syzbot+d409c2338150e9a8ae1e@syzkaller.appspotmail.com
Reported-by: syzbot+e152dc5bff188f67358a@syzkaller.appspotmail.com

Revision 1.86 / (download) - annotate - [select for diffs], Thu Jan 9 16:35:03 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.85: +7 -4 lines
Diff to previous 1.85 (colored) to selected 1.43.6.2 (colored)

- Many small tweaks to the SMT awareness in the scheduler.  It does a much
  better job now at keeping all physical CPUs busy, while using the extra
  threads to help out.  In particular, during preempt() if we're using SMT,
  try to find a better CPU to run on and teleport curlwp there.

- Change the CPU topology stuff so it can work on asymmetric systems.  This
  mainly entails rearranging one of the CPU lists so it makes sense in all
  configurations.

- Add a parameter to cpu_topology_set() to note that a CPU is "slow", for
  where there are fast CPUs and slow CPUs, like with the Rockwell RK3399.
  Extend the SMT awareness to try and handle that situation too (keep fast
  CPUs busy, use slow CPUs as helpers).

Revision 1.85 / (download) - annotate - [select for diffs], Mon Jan 6 10:21:21 2020 UTC (4 years, 2 months ago) by martin
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored) to selected 1.43.6.2 (colored)

Move the <sys/queue.h> include into a kernel-only section.

Revision 1.84 / (download) - annotate - [select for diffs], Mon Jan 6 01:37:57 2020 UTC (4 years, 2 months ago) by oster
Branch: MAIN
Changes since 1.83: +2 -1 lines
Diff to previous 1.83 (colored) to selected 1.43.6.2 (colored)

Build fix.  Add back inclusion of <sys/queue.h>, which was previously
included via <sys/evnct.h>.

Revision 1.83 / (download) - annotate - [select for diffs], Sun Jan 5 20:26:56 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.82: +1 -6 lines
Diff to previous 1.82 (colored) to selected 1.43.6.2 (colored)

- Another tweak for SMT: if a new LWP is starting life, try to make it run
  on a different CPU in the same CPU core as the parent, because both parent
  and child share lots of state.  (I want to come back later and do
  something different for _lwp_create() and maybe execve().)

- Remove the runqueue evcnts, which are racy and impose a penalty for very
  little payoff.

- Break out of the loop in sched_takecpu() as soon as we have a CPU that can
  run the LWP.  There's no need to look at all CPUs.

- SPCF_IDLE in sched_enqueue() so we know the CPU is not idle sooner.

Revision 1.82 / (download) - annotate - [select for diffs], Sat Dec 21 11:54:04 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.81: +2 -1 lines
Diff to previous 1.81 (colored) to selected 1.43.6.2 (colored)

schedstate_percpu: add new flag SPCF_IDLE as a cheap and easy way to
determine that a CPU is currently idle.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Dec 20 21:05:34 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.80: +2 -1 lines
Diff to previous 1.80 (colored) to selected 1.43.6.2 (colored)

Some more CPU topology stuff:

- Use cegger@'s ACPI SRAT parsing code to figure out NUMA node ID for each
  CPU as it is attached.

- For scheduler experiments with SMT, flag CPUs with the lowest numbered SMT
  IDs as "primaries", link back to the primaries from secondaries, and build
  a circular list of CPUs in each package with identical SMT IDs.

- No need for package/core/smt/numa IDs to be anything other than a u_int.

Revision 1.80 / (download) - annotate - [select for diffs], Fri Dec 6 21:36:10 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored) to selected 1.43.6.2 (colored)

Make it possible to call mi_switch() and immediately switch to another CPU.
This seems to take about 3us on my Intel system.  Two changes required:

- Have the caller to mi_switch() be responsible for calling spc_lock().
- Avoid using l->l_cpu in mi_switch().

While here:

- Add a couple of calls to membar_enter()
- Have the idle LWP set itself to LSIDL, to match softint_thread().
- Remove unused return value from mi_switch().

Revision 1.79 / (download) - annotate - [select for diffs], Tue Dec 3 22:28:41 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.78: +14 -4 lines
Diff to previous 1.78 (colored) to selected 1.43.6.2 (colored)

- Add some more failsafes to the CPU topology stuff, and build a 3rd
  circular list of peer CPUs in other packages, so we might scroll through
  them in the scheduler when looking to distribute or steal jobs.

- Fold the run queue data structure into spc_schedstate.  Makes kern_runq.c
  a far more pleasant place to work.

- Remove the code in sched_nextlwp() that tries to steal jobs from other
  CPUs.  It's not needed, because we do the very same thing in the idle LWP
  anyway.  Outside the VM system this was one of the the main causes of L3
  cache misses I saw during builds.  On my machine, this change yields a
  60%-70% drop in time on the "hackbench" benchmark (there's clearly a bit
  more going on here, but basically being less aggressive helps).

Revision 1.78 / (download) - annotate - [select for diffs], Sat Nov 30 17:46:27 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.77: +2 -5 lines
Diff to previous 1.77 (colored) to selected 1.43.6.2 (colored)

Mark spc_curpriority volatile.

Revision 1.77 / (download) - annotate - [select for diffs], Sat Nov 23 19:42:52 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.76: +6 -3 lines
Diff to previous 1.76 (colored) to selected 1.43.6.2 (colored)

Minor scheduler cleanup:

- Adapt to cpu_need_resched() changes. Avoid lost & duplicate IPIs and ASTs.
  sched_resched_cpu() and sched_resched_lwp() contain the logic for this.
- Changes for LSIDL to make the locking scheme match the intended design.
- Reduce lock contention and false sharing further.
- Numerous small bugfixes, including some corrections for SCHED_FIFO/RT.
- Use setrunnable() in more places, and merge cut & pasted code.

Revision 1.75.8.1 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:21 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.75: +2 -1 lines
Diff to previous 1.75 (colored) next main 1.76 (colored) to selected 1.43.6.2 (colored)

update from HEAD

Revision 1.75.26.1 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:24 2016 UTC (7 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.75: +2 -1 lines
Diff to previous 1.75 (colored) next main 1.76 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD

Revision 1.76 / (download) - annotate - [select for diffs], Sun Jul 3 14:24:59 2016 UTC (7 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, 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, 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, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, isaki-audio2-base, isaki-audio2, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi
Changes since 1.75: +2 -1 lines
Diff to previous 1.75 (colored) to selected 1.43.6.2 (colored)

GSoC 2016 Charles Cui: Implement thread priority protection based on work
by Andy Doran. Also document the get/set pshared thread calls as not
implemented, and add a skeleton implementation that is disabled.
XXX: document _sched_protect(2).

Revision 1.73.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:52 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.73: +3 -2 lines
Diff to previous 1.73 (colored) next main 1.74 (colored) to selected 1.43.6.2 (colored)

sync with head

Revision 1.75 / (download) - annotate - [select for diffs], Mon Nov 21 04:36:05 2011 UTC (12 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, tls-maxphys-base, 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, 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, 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, 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, khorben-n900, 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, agc-symver-base, agc-symver
Branch point for: tls-maxphys, nick-nhusb
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored) to selected 1.43.6.2 (colored)

change printf gcc attribute to __printflike(), requested by joerg.

Revision 1.74 / (download) - annotate - [select for diffs], Sun Nov 20 23:37:00 2011 UTC (12 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.73: +3 -2 lines
Diff to previous 1.73 (colored) to selected 1.43.6.2 (colored)

add more missing printf attributes.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Aug 7 13:33:02 2011 UTC (12 years, 7 months ago) by rmind
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.72: +2 -19 lines
Diff to previous 1.72 (colored) to selected 1.43.6.2 (colored)

Add kcpuset(9) - a reworked dynamic CPU set implementation for kernel.
Suitable for use during the early boot.  MD and other implementations
should be replaced with this interface.

Discussed on: tech-kern@

Revision 1.52.2.4 / (download) - annotate - [select for diffs], Wed Aug 11 22:55:11 2010 UTC (13 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.52.2.3: +2 -2 lines
Diff to previous 1.52.2.3 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.71.4.1 / (download) - annotate - [select for diffs], Sun May 30 05:18:08 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.71: +2 -2 lines
Diff to previous 1.71 (colored) next main 1.72 (colored) to selected 1.43.6.2 (colored)

sync with head

Revision 1.71.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:33 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.71: +2 -2 lines
Diff to previous 1.71 (colored) next main 1.72 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.72 / (download) - annotate - [select for diffs], Fri Apr 16 03:21:49 2010 UTC (13 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base7, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, rmind-uvmplock-nbase, rmind-uvmplock-base, 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.71: +2 -2 lines
Diff to previous 1.71 (colored) to selected 1.43.6.2 (colored)

- Merge sched_pstats() and uvm_meter()/uvm_loadav().  Avoids double loop
  through all LWPs and duplicate locking overhead.

- Move sched_pstats() from soft-interrupt context to process 0 main loop.
  Avoids blocking effect on real-time threads.  Mostly fixes PR/38792.

Note: it might be worth to move the loop above PRI_PGDAEMON.  Also,
sched_pstats() might be cleaned-up slightly.

Revision 1.52.2.3 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:43 2010 UTC (14 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.52.2.2: +2 -1 lines
Diff to previous 1.52.2.2 (colored) to branchpoint 1.52 (colored) to selected 1.43.6.2 (colored)

sync with head

Revision 1.71 / (download) - annotate - [select for diffs], Sat Oct 3 22:32:56 2009 UTC (14 years, 5 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211, jym-xensuspend-nbase
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.70: +2 -1 lines
Diff to previous 1.70 (colored) to selected 1.43.6.2 (colored)

- Move sched_listener and co. from kern_synch.c to sys_sched.c, where it
  really belongs (suggested by rmind@),

- Rename sched_init() to synch_init(), and introduce a new sched_init()
  in sys_sched.c where we (a) initialize the sysctl node (no more
  link-set) and (b) listen on the process scope with sched_listener.

Reviewed by and okay rmind@.

Revision 1.65.8.1 / (download) - annotate - [select for diffs], Wed May 13 17:23:03 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.65: +10 -3 lines
Diff to previous 1.65 (colored) next main 1.66 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

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

Revision 1.52.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:14:36 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.52.2.1: +54 -29 lines
Diff to previous 1.52.2.1 (colored) to branchpoint 1.52 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.65.2.1 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:53 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.65: +10 -3 lines
Diff to previous 1.65 (colored) next main 1.66 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.70 / (download) - annotate - [select for diffs], Sat Apr 25 19:38:25 2009 UTC (14 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.69: +2 -1 lines
Diff to previous 1.69 (colored) to selected 1.43.6.2 (colored)

- Add kcpuset_iszero().
- Fix kcpuset_match().

Revision 1.69 / (download) - annotate - [select for diffs], Sun Apr 19 22:15:39 2009 UTC (14 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.68: +3 -1 lines
Diff to previous 1.68 (colored) to selected 1.43.6.2 (colored)

- Remove a bunch of unused declarations in proc.h header.
- Move yield() and suspendsched() to sched.h, where they should belong.

Revision 1.68 / (download) - annotate - [select for diffs], Sun Apr 19 08:45:09 2009 UTC (14 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.67: +2 -1 lines
Diff to previous 1.67 (colored) to selected 1.43.6.2 (colored)

Add SPCF_NOINTR to indicate that the CPU has been shielded from hardware
interrupts (as SPCF_OFFLINE is to unbound LWPs).

Revision 1.67 / (download) - annotate - [select for diffs], Sun Mar 15 22:52:39 2009 UTC (15 years ago) by rmind
Branch: MAIN
Changes since 1.66: +4 -1 lines
Diff to previous 1.66 (colored) to selected 1.43.6.2 (colored)

Add prototypes for recent kcpuset_*() functions, which I forgot to commit.

Revision 1.66 / (download) - annotate - [select for diffs], Sat Mar 7 21:59:25 2009 UTC (15 years ago) by ad
Branch: MAIN
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored) to selected 1.43.6.2 (colored)

Expose more stuff if _KMEMUSER is defined.

Revision 1.48.6.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:41 2009 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.48.6.4: +1 -2 lines
Diff to previous 1.48.6.4 (colored) to branchpoint 1.48 (colored) next main 1.49 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.63.2.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:18:09 2008 UTC (15 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.63: +4 -4 lines
Diff to previous 1.63 (colored) next main 1.64 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.55.2.3 / (download) - annotate - [select for diffs], Fri Oct 10 22:37:09 2008 UTC (15 years, 5 months ago) by skrll
Branch: wrstuden-revivesa
Changes since 1.55.2.2: +2 -3 lines
Diff to previous 1.55.2.2 (colored) to branchpoint 1.55 (colored) next main 1.56 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.65 / (download) - annotate - [select for diffs], Tue Oct 7 09:48:27 2008 UTC (15 years, 5 months ago) by rmind
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, nick-hppapmap-base2, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, 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, jym-xensuspend
Changes since 1.64: +2 -3 lines
Diff to previous 1.64 (colored) to selected 1.43.6.2 (colored)

- Replace lwp_t::l_sched_info with union: pointer and timeslice.
- Change minimal time-quantum to ~20 ms.
- Thus remove unneeded pool in M2, and unused sched_lwp_exit().
- Do not increase l_slptime twice for SCHED_4BSD (regression fix).

Revision 1.48.6.4 / (download) - annotate - [select for diffs], Sun Sep 28 10:41:04 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.48.6.3: +2 -2 lines
Diff to previous 1.48.6.3 (colored) to branchpoint 1.48 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.55.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:37:05 2008 UTC (15 years, 6 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.55.2.1: +3 -3 lines
Diff to previous 1.55.2.1 (colored) to branchpoint 1.55 (colored) to selected 1.43.6.2 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.64 / (download) - annotate - [select for diffs], Sun Aug 10 10:19:19 2008 UTC (15 years, 7 months ago) by martin
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Changes since 1.63: +3 -2 lines
Diff to previous 1.63 (colored) to selected 1.43.6.2 (colored)

Move __BEGIN_DECLS into the same ifdef as the __END_DECLS.
Reported by Arne H. Juul in PR lib/39331.

Revision 1.58.2.3 / (download) - annotate - [select for diffs], Thu Jul 3 18:38:24 2008 UTC (15 years, 8 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.58.2.2: +1 -2 lines
Diff to previous 1.58.2.2 (colored) to branchpoint 1.58 (colored) next main 1.59 (colored) to selected 1.43.6.2 (colored)

Sync with head.

Revision 1.63 / (download) - annotate - [select for diffs], Wed Jul 2 19:44:10 2008 UTC (15 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.62: +1 -2 lines
Diff to previous 1.62 (colored) to selected 1.43.6.2 (colored)

Remove outdated comments, and historical CCPU_SHIFT.  Make resched_cpu static,
const-ify ccpu.  Note: resched_cpu is not correct, should be revisited.

OK by <ad>.

Revision 1.48.6.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:20 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.48.6.2: +40 -24 lines
Diff to previous 1.48.6.2 (colored) to branchpoint 1.48 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.58.2.2 / (download) - annotate - [select for diffs], Fri Jun 27 15:11:55 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.58.2.1: +26 -13 lines
Diff to previous 1.58.2.1 (colored) to branchpoint 1.58 (colored) to selected 1.43.6.2 (colored)

Sync with head.

Revision 1.55.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:32:03 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.55: +45 -26 lines
Diff to previous 1.55 (colored) to selected 1.43.6.2 (colored)

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

Revision 1.62 / (download) - annotate - [select for diffs], Sun Jun 22 14:00:11 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-1, wrstuden-revivesa-base
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored) to selected 1.43.6.2 (colored)

Update a comment.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Jun 22 00:06:36 2008 UTC (15 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.60: +25 -12 lines
Diff to previous 1.60 (colored) to selected 1.43.6.2 (colored)

Adjust to separate kcpuset_t and cpuset_t.

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Wed Jun 18 16:33:51 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.58: +30 -27 lines
Diff to previous 1.58 (colored) to selected 1.43.6.2 (colored)

Sync with head.

Revision 1.51.2.3 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:17 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.51.2.2: +30 -27 lines
Diff to previous 1.51.2.2 (colored) to branchpoint 1.51 (colored) next main 1.52 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Jun 16 01:41:21 2008 UTC (15 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pf42-base4
Changes since 1.59: +21 -14 lines
Diff to previous 1.59 (colored) to selected 1.43.6.2 (colored)

- Add general cpuset macros.
- Use kcpuset name for kernel-only functions.
- Use cpuid_t to specify CPU ID.
- Unify all cpuset users.

API is expected to be stable now.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Jun 15 21:12:16 2008 UTC (15 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.58: +23 -27 lines
Diff to previous 1.58 (colored) to selected 1.43.6.2 (colored)

forgot to commit this as part of the scheduling changes. DoH!

Revision 1.51.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:49 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.51.2.1: +5 -2 lines
Diff to previous 1.51.2.1 (colored) to branchpoint 1.51 (colored) to selected 1.43.6.2 (colored)

sync with head

Revision 1.48.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:33 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.48.6.1: +11 -10 lines
Diff to previous 1.48.6.1 (colored) to branchpoint 1.48 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.58 / (download) - annotate - [select for diffs], Thu May 29 22:33:27 2008 UTC (15 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pf42-base3
Branch point for: simonb-wapbl
Changes since 1.57: +2 -1 lines
Diff to previous 1.57 (colored) to selected 1.43.6.2 (colored)

Simplifcation for running LWP migration.  Removes double-locking in
mi_switch(), migration for LSONPROC is now performed via idle loop.
Handles/fixes on-CPU case in lwp_migrate(), misc.

Closes PR/38169, idea of migration via idle loop by Andrew Doran.

Revision 1.57 / (download) - annotate - [select for diffs], Tue May 27 14:48:52 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.56: +2 -1 lines
Diff to previous 1.56 (colored) to selected 1.43.6.2 (colored)

PR kern/38707 scheduler related deadlock during build.sh

- Fix performance regression inroduced by the workaround by making job
  stealing a lot simpler: if the local run queue is empty, let the CPU enter
  the idle loop. In the idle loop, try to steal a job from another CPU's run
  queue if we are idle. If we succeed, re-enter mi_switch() immediatley to
  dispatch the job.

- When stealing jobs, consider a remote CPU to have one less job in its
  queue if it's currently in the idle loop. It will dispatch the job soon,
  so there's no point sloshing it about.

- Introduce a few event counters to monitor what's happening with the run
  queues.

- Revert the idle CPU bitmap change. It's pointless considering NUMA.

Revision 1.56 / (download) - annotate - [select for diffs], Mon May 19 12:48:54 2008 UTC (15 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: hpcarm-cleanup-nbase
Changes since 1.55: +3 -2 lines
Diff to previous 1.55 (colored) to selected 1.43.6.2 (colored)

- Make periodical balancing mandatory.
- Fix priority raising in M2 (broken after making runqueues mandatory).

Revision 1.51.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:50 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.51: +4 -8 lines
Diff to previous 1.51 (colored) to selected 1.43.6.2 (colored)

sync with head.

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

sync with head.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Apr 29 14:35:21 2008 UTC (15 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Changes since 1.54: +2 -1 lines
Diff to previous 1.54 (colored) to selected 1.43.6.2 (colored)

Split the runqueue management code into the separate file.
OK by <ad>.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:11 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.53: +1 -8 lines
Diff to previous 1.53 (colored) to selected 1.43.6.2 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.53 / (download) - annotate - [select for diffs], Mon Apr 28 15:36:01 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.52: +2 -1 lines
Diff to previous 1.52 (colored) to selected 1.43.6.2 (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.52 / (download) - annotate - [select for diffs], Thu Apr 24 13:56:30 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.51: +2 -1 lines
Diff to previous 1.51 (colored) to selected 1.43.6.2 (colored)

xc_broadcast: don't try to run cross calls on CPUs that are not yet running.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Apr 12 17:02:09 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.50: +5 -3 lines
Diff to previous 1.50 (colored) to selected 1.43.6.2 (colored)

Take the run queue management code from the M2 scheduler, and make it
mandatory. Remove the 4BSD run queue code. Effects:

- Pluggable scheduler is only responsible for co-ordinating timeshared jobs.
- All systems run with per-CPU run queues.
- 4BSD scheduler gets processor sets / affinity.
- 4BSD scheduler gets a significant peformance boost on some workloads.

Discussed on tech-kern@.

Revision 1.48.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:12 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.48: +4 -2 lines
Diff to previous 1.48 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.48.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:28 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.48: +4 -2 lines
Diff to previous 1.48 (colored) next main 1.49 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.36.2.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:11 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.36.2.3: +41 -7 lines
Diff to previous 1.36.2.3 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored) to selected 1.43.6.2 (colored)

sync with HEAD

Revision 1.21.2.11 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:47 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.21.2.10: +4 -2 lines
Diff to previous 1.21.2.10 (colored) next main 1.22 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.50 / (download) - annotate - [select for diffs], Mon Mar 17 08:20:05 2008 UTC (16 years 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.49: +1 -2 lines
Diff to previous 1.49 (colored) to selected 1.43.6.2 (colored)

move schedppq from sched.h to param.h because it's used by some of
PRI_ constants.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Feb 28 16:09:19 2008 UTC (16 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.48: +4 -1 lines
Diff to previous 1.48 (colored) to selected 1.43.6.2 (colored)

Factor out the guts of get/setparam so it can be used from the compat code.

Make the FreeBSD and Linux compat code convert the parameters to their
native representation and call the native routines.

Remove KAUTH_PROCESS_SCHEDULER_GET/SET.

Update documentation and examples.

XXX: For now, only the Linux compat code does the priority conversion
XXX: right.

Linux priority conversion code from yamt@, thanks!

Okay yamt@.

Revision 1.21.2.10 / (download) - annotate - [select for diffs], Wed Feb 27 08:37:05 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.21.2.9: +2 -2 lines
Diff to previous 1.21.2.9 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.40.2.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:23 2008 UTC (16 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.40.2.3: +38 -6 lines
Diff to previous 1.40.2.3 (colored) next main 1.41 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Feb 14 14:26:58 2008 UTC (16 years, 1 month 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.47: +2 -2 lines
Diff to previous 1.47 (colored) to selected 1.43.6.2 (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.21.2.9 / (download) - annotate - [select for diffs], Mon Feb 11 15:00:09 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.21.2.8: +3 -6 lines
Diff to previous 1.21.2.8 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Feb 9 16:58:01 2008 UTC (16 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.46: +3 -6 lines
Diff to previous 1.46 (colored) to selected 1.43.6.2 (colored)

from rmind@,
- revert struct sched_param changes to restore ABI.
- instead, add 'policy' arguments to _sched_{get,set}param syscalls.
  (this is an API/ABI change.)
- correct kauth_authorize_process arguments.

while i'm here,
- don't bother to kmem_alloc for 4-byte structure.

Revision 1.21.2.8 / (download) - annotate - [select for diffs], Mon Feb 4 09:25:00 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.21.2.7: +27 -1 lines
Diff to previous 1.21.2.7 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Jan 26 17:55:29 2008 UTC (16 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.45: +27 -1 lines
Diff to previous 1.45 (colored) to selected 1.43.6.2 (colored)

sched_setparam: fix the case when incorrect (according to the class)
in-kernel priority is used.  Reported by <drochner>.

Minor fixes for scheduling calls to conform the POSIX:
- If pid is equal to zero, use the calling process;
- In case of permission problem, return EPERM instead of EACESS;
- sched_setscheduler() should return previously used policy;
- pthread_* calls should return the error code or zero;

Should fix the namespace problems (and builds of some packages):
- Move cpuset_t defintion from pset.h to sched.h;
- Remove the #include of pset.h in pthread.h;

Revision 1.21.2.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:47:58 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.21.2.6: +15 -6 lines
Diff to previous 1.21.2.6 (colored) to selected 1.43.6.2 (colored)

sync with head

Revision 1.43.6.2 / (download) - annotate - [selected], Sat Jan 19 12:15:43 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.43.6.1: +13 -4 lines
Diff to previous 1.43.6.1 (colored) to branchpoint 1.43 (colored) next main 1.44 (colored)

Sync with HEAD

Revision 1.45 / (download) - annotate - [select for diffs], Tue Jan 15 03:37:12 2008 UTC (16 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.44: +14 -5 lines
Diff to previous 1.44 (colored) to selected 1.43.6.2 (colored)

Implementation of processor-sets, affinity and POSIX real-time extensions.
Add schedctl(8) - a program to control scheduling of processes and threads.

Notes:
- This is supported only by SCHED_M2;
- Migration of LWP mechanism will be revisited;

Proposed on: <tech-kern>. Reviewed by: <ad>.

Revision 1.36.2.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:58:16 2008 UTC (16 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.36.2.2: +2 -3 lines
Diff to previous 1.36.2.2 (colored) to branchpoint 1.36 (colored) to selected 1.43.6.2 (colored)

sync with HEAD

Revision 1.43.6.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:58:08 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD

Revision 1.40.2.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:42 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.40.2.2: +2 -2 lines
Diff to previous 1.40.2.2 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.43.2.1 / (download) - annotate - [select for diffs], Wed Dec 26 19:57:55 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored) next main 1.44 (colored) to selected 1.43.6.2 (colored)

Sync with head.

Revision 1.44 / (download) - annotate - [select for diffs], Sat Dec 22 01:14:53 2007 UTC (16 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored) to selected 1.43.6.2 (colored)

use binuptime for l_stime/l_rtime.

Revision 1.35.6.7 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:49 2007 UTC (16 years, 3 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.35.6.6: +1 -2 lines
Diff to previous 1.35.6.6 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.40.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:21:35 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.40.2.1: +1 -2 lines
Diff to previous 1.40.2.1 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.21.2.6 / (download) - annotate - [select for diffs], Fri Dec 7 17:34:58 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.21.2.5: +1 -2 lines
Diff to previous 1.21.2.5 (colored) to selected 1.43.6.2 (colored)

sync with head

Revision 1.43 / (download) - annotate - [select for diffs], Mon Dec 3 17:14:59 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.42: +1 -2 lines
Diff to previous 1.42 (colored) to selected 1.43.6.2 (colored)

For the slow path soft interrupts, arrange to have the priority of a
borrowed user LWP raised into the 'kernel RT' range if the LWP sleeps
(which is unlikely).

Revision 1.40.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:49:31 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.40: +5 -3 lines
Diff to previous 1.40 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.21.2.5 / (download) - annotate - [select for diffs], Thu Nov 15 11:45:33 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.21.2.4: +5 -4 lines
Diff to previous 1.21.2.4 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.39.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:03:25 2007 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.39: +5 -4 lines
Diff to previous 1.39 (colored) next main 1.40 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD

Revision 1.36.2.2 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:22 2007 UTC (16 years, 4 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.36.2.1: +1 -6 lines
Diff to previous 1.36.2.1 (colored) to branchpoint 1.36 (colored) to selected 1.43.6.2 (colored)

sync with -HEAD

Revision 1.36.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:34:54 2007 UTC (16 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.36: +52 -40 lines
Diff to previous 1.36 (colored) to selected 1.43.6.2 (colored)

sync with HEAD

Revision 1.35.6.6 / (download) - annotate - [select for diffs], Tue Nov 6 21:16:25 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.35.6.5: +1 -6 lines
Diff to previous 1.35.6.5 (colored) to branchpoint 1.35 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.35.6.5 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:39 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.35.6.4: +10 -3 lines
Diff to previous 1.35.6.4 (colored) to branchpoint 1.35 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.42 / (download) - annotate - [select for diffs], Tue Nov 6 17:59:02 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.41: +1 -6 lines
Diff to previous 1.41 (colored) to selected 1.43.6.2 (colored)

Back out chaff that should not have been merged. Spotted by rmind@.

Revision 1.41 / (download) - annotate - [select for diffs], Tue Nov 6 00:42:45 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Changes since 1.40: +10 -3 lines
Diff to previous 1.40 (colored) to selected 1.43.6.2 (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.33.2.12 / (download) - annotate - [select for diffs], Mon Nov 5 15:04:44 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.33.2.11: +3 -2 lines
Diff to previous 1.33.2.11 (colored) to branchpoint 1.33 (colored) next main 1.34 (colored) to selected 1.43.6.2 (colored)

- Locking tweaks for estcpu/nice. XXX The schedclock musn't run above
  IPL_SCHED.
- Hide most references to l_estcpu.
- l_policy was here first, but l_class is referenced in more places now.

Revision 1.33.2.11 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:27 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.33.2.10: +2 -2 lines
Diff to previous 1.33.2.10 (colored) to branchpoint 1.33 (colored) to selected 1.43.6.2 (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.35.6.4 / (download) - annotate - [select for diffs], Wed Oct 31 23:14:19 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.35.6.3: +1 -2 lines
Diff to previous 1.35.6.3 (colored) to branchpoint 1.35 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Oct 29 12:16:54 2007 UTC (16 years, 5 months ago) by yamt
Branch: MAIN
Branch point for: mjf-devfs
Changes since 1.39: +1 -2 lines
Diff to previous 1.39 (colored) to selected 1.43.6.2 (colored)

reduce dependencies on opt_sched.h.

Revision 1.21.2.4 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:33 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.21.2.3: +46 -40 lines
Diff to previous 1.21.2.3 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.35.6.3 / (download) - annotate - [select for diffs], Fri Oct 26 15:49:21 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.35.6.2: +16 -8 lines
Diff to previous 1.35.6.2 (colored) to branchpoint 1.35 (colored) to selected 1.43.6.2 (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.37.2.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:49:10 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.37: +16 -8 lines
Diff to previous 1.37 (colored) next main 1.38 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.33.2.10 / (download) - annotate - [select for diffs], Wed Oct 10 23:03:26 2007 UTC (16 years, 5 months ago) by rmind
Branch: vmlocking
Changes since 1.33.2.9: +8 -3 lines
Diff to previous 1.33.2.9 (colored) to branchpoint 1.33 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Oct 9 19:00:16 2007 UTC (16 years, 5 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Changes since 1.38: +8 -3 lines
Diff to previous 1.38 (colored) to selected 1.43.6.2 (colored)

Import of SCHED_M2 - the implementation of new scheduler, which is based
on the original approach of SVR4 with some inspirations about balancing
and migration from Solaris.  It implements per-CPU runqueues, provides a
real-time (RT) and time-sharing (TS) queues, ready to support a POSIX
real-time extensions, and also prepared for the support of CPU affinity.

The following lines in the kernel config enables the SCHED_M2:

no options SCHED_4BSD
options SCHED_M2

The scheduler seems to be stable.  Further work will come soon.

http://mail-index.netbsd.org/tech-kern/2007/10/04/0001.html
http://www.netbsd.org/~rmind/m2/mysql_bench_ro_4x_local.png
Thanks <ad> for the benchmarks!

Revision 1.33.2.9 / (download) - annotate - [select for diffs], Tue Oct 9 13:45:11 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.33.2.8: +34 -35 lines
Diff to previous 1.33.2.8 (colored) to branchpoint 1.33 (colored) to selected 1.43.6.2 (colored)

Sync with head.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Oct 8 20:06:20 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.37: +9 -6 lines
Diff to previous 1.37 (colored) to selected 1.43.6.2 (colored)

Merge run time accounting changes from the vmlocking branch. These make
the LWP "start time" per-thread instead of per-CPU.

Revision 1.35.6.2 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:29 2007 UTC (16 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.35.6.1: +33 -35 lines
Diff to previous 1.35.6.1 (colored) to branchpoint 1.35 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.37 / (download) - annotate - [select for diffs], Fri Sep 21 01:50:36 2007 UTC (16 years, 6 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base
Branch point for: yamt-x86pmap
Changes since 1.36: +33 -35 lines
Diff to previous 1.36 (colored) to selected 1.43.6.2 (colored)

- Style; remove the comments, most of them are obvious, and csf(9)
  manual page is written for that.
- Remove unused schedppq variable.

No functional changes.
OK by <dsieger>.

Revision 1.21.2.3 / (download) - annotate - [select for diffs], Mon Sep 3 14:46:34 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.21.2.2: +69 -57 lines
Diff to previous 1.21.2.2 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.33.2.8 / (download) - annotate - [select for diffs], Fri Aug 31 15:15:16 2007 UTC (16 years, 7 months ago) by yamt
Branch: vmlocking
Changes since 1.33.2.7: +2 -2 lines
Diff to previous 1.33.2.7 (colored) to branchpoint 1.33 (colored) to selected 1.43.6.2 (colored)

updatertime: constify.

Revision 1.33.2.7 / (download) - annotate - [select for diffs], Sun Aug 26 12:04:48 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.33.2.6: +8 -5 lines
Diff to previous 1.33.2.6 (colored) to branchpoint 1.33 (colored) to selected 1.43.6.2 (colored)

- Add a generic cross-call facility. Right now this only does threaded cross
  calls but that should be extended to do IPIs. These are deliberately set
  up as bound kthreads (and not soft interrupts or something else) so that
  the called functions can use the spl framework or disable preemption in
  order to guarantee exclusive access to CPU-local data.

- Use cross calls to take CPUs online or offline. Ok to do since bound LWPs
  still execute on offline CPUs. As a result schedstate_percpu's::spc_flags
  is CPU-local again and doesn't need locking.

Revision 1.33.2.6 / (download) - annotate - [select for diffs], Mon Aug 20 21:28:20 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.33.2.5: +5 -2 lines
Diff to previous 1.33.2.5 (colored) to branchpoint 1.33 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:51:00 2007 UTC (16 years, 7 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.35: +5 -2 lines
Diff to previous 1.35 (colored) next main 1.36 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.35.6.1 / (download) - annotate - [select for diffs], Sat Aug 4 12:33:17 2007 UTC (16 years, 7 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.35: +5 -2 lines
Diff to previous 1.35 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.36.4.2 / (download) - annotate - [select for diffs], Sat Aug 4 11:03:03 2007 UTC (16 years, 7 months ago) by ad
Branch: matt-mips64
Changes since 1.36.4.1: +219 -0 lines
Diff to previous 1.36.4.1 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored) to selected 1.43.6.2 (colored)

Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.

Revision 1.36.4.1, Sat Aug 4 11:03:02 2007 UTC (16 years, 7 months ago) by ad
Branch: matt-mips64
Changes since 1.36: +0 -219 lines
FILE REMOVED

file sched.h was added on branch matt-mips64 on 2007-08-04 11:03:03 +0000

Revision 1.36 / (download) - annotate - [select for diffs], Sat Aug 4 11:03:02 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base5, matt-mips64-base
Branch point for: matt-mips64, matt-armv6
Changes since 1.35: +5 -2 lines
Diff to previous 1.35 (colored) to selected 1.43.6.2 (colored)

Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.

Revision 1.33.2.5 / (download) - annotate - [select for diffs], Sun Jul 15 13:28:12 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.33.2.4: +1 -1 lines
Diff to previous 1.33.2.4 (colored) to branchpoint 1.33 (colored) to selected 1.43.6.2 (colored)

Sync with head.

Revision 1.33.2.4 / (download) - annotate - [select for diffs], Sat Jul 14 22:09:49 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.33.2.3: +2 -2 lines
Diff to previous 1.33.2.3 (colored) to branchpoint 1.33 (colored) to selected 1.43.6.2 (colored)

Make it possible to track time spent by soft interrupts as is done for
normal LWPs, and provide a sysctl to switch it on/off. Not enabled by
default because microtime() is not free. XXX Not happy with this but
I want it get it out of my local tree for the time being.

Revision 1.33.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:12:35 2007 UTC (16 years, 8 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.33: +60 -40 lines
Diff to previous 1.33 (colored) next main 1.34 (colored) to selected 1.43.6.2 (colored)

Sync with head.

Revision 1.35 / (download) - annotate - [select for diffs], Mon Jul 9 21:11:33 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.34: +3 -1 lines
Diff to previous 1.34 (colored) to selected 1.43.6.2 (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.33.2.3 / (download) - annotate - [select for diffs], Sat Jul 7 11:56:12 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.33.2.2: +2 -1 lines
Diff to previous 1.33.2.2 (colored) to branchpoint 1.33 (colored) to selected 1.43.6.2 (colored)

- Remove the interrupt priority range and use 'kernel RT' instead,
  since only soft interrupts are threaded.
- Rename l->l_pinned to l->l_switchto. It might be useful for (re-)
  implementing SA or doors.
- Simplify soft interrupt dispatch so MD code is doing as little as
  possible that is new.

Revision 1.33.2.2 / (download) - annotate - [select for diffs], Sun Jul 1 21:51:00 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.33.2.1: +2 -1 lines
Diff to previous 1.33.2.1 (colored) to branchpoint 1.33 (colored) to selected 1.43.6.2 (colored)

Adapt to callout API change.

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Fri Jun 8 14:18:12 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.33: +58 -40 lines
Diff to previous 1.33 (colored) to selected 1.43.6.2 (colored)

Sync with head.

Revision 1.34 / (download) - annotate - [select for diffs], Thu May 17 14:51:43 2007 UTC (16 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.33: +58 -40 lines
Diff to previous 1.33 (colored) to selected 1.43.6.2 (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.30.2.19 / (download) - annotate - [select for diffs], Sun May 13 17:02:58 2007 UTC (16 years, 10 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.30.2.18: +17 -12 lines
Diff to previous 1.30.2.18 (colored) next main 1.31 (colored) to selected 1.43.6.2 (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.30.2.18 / (download) - annotate - [select for diffs], Mon Apr 30 16:38:37 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.30.2.17: +1 -2 lines
Diff to previous 1.30.2.17 (colored) to selected 1.43.6.2 (colored)

- Remove KERN_SCHED, do not break KERN_MAXID and use dynamic node creation,
  since we are moving to dynamic sysctl anyway - note by <mrg>.
- Remove sched_slept() hook - we are not going to use it.

Revision 1.30.2.17 / (download) - annotate - [select for diffs], Sun Apr 22 08:26:59 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.30.2.16: +1 -1 lines
Diff to previous 1.30.2.16 (colored) to selected 1.43.6.2 (colored)

remove inline from sched_pstats_hook.

Revision 1.30.2.16 / (download) - annotate - [select for diffs], Thu Apr 5 14:17:01 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.30.2.15: +1 -2 lines
Diff to previous 1.30.2.15 (colored) to selected 1.43.6.2 (colored)

remove sched_wakeup.

Revision 1.30.2.15 / (download) - annotate - [select for diffs], Mon Apr 2 23:45:27 2007 UTC (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.30.2.14: +2 -2 lines
Diff to previous 1.30.2.14 (colored) to selected 1.43.6.2 (colored)

sched_curcpu_runnable_p: Remove somehow missed inline, since this function
cannot be inlined. Pointed out by matt@

Revision 1.30.2.14 / (download) - annotate - [select for diffs], Mon Apr 2 00:28:09 2007 UTC (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.30.2.13: +3 -1 lines
Diff to previous 1.30.2.13 (colored) to selected 1.43.6.2 (colored)

- Move the ccpu sysctl back to the scheduler-independent part.
- Move the scheduler-independent parts of 4BSD's schedcpu() to
  kern_synch.c.
- Add scheduler-specific hook to satisfy individual scheduler's
  needs.
- Remove autonice, which is archaic and not useful.

Patch provided by Daniel Sieger.

Revision 1.30.2.13 / (download) - annotate - [select for diffs], Sat Mar 24 16:50:26 2007 UTC (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.30.2.12: +2 -2 lines
Diff to previous 1.30.2.12 (colored) to selected 1.43.6.2 (colored)

sched_nextlwp: Remove struct lwp * argument, it is no longer needed.
Note by yamt@

Revision 1.30.2.12 / (download) - annotate - [select for diffs], Sat Mar 24 11:36:03 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.30.2.11: +2 -1 lines
Diff to previous 1.30.2.11 (colored) to selected 1.43.6.2 (colored)

initialize ci->ci_schedstate.spc_mutex of APs.
(sched_rqinit is called before APs are attached.)

Revision 1.30.2.11 / (download) - annotate - [select for diffs], Sat Mar 24 00:43:09 2007 UTC (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.30.2.10: +3 -1 lines
Diff to previous 1.30.2.10 (colored) to selected 1.43.6.2 (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.30.2.10 / (download) - annotate - [select for diffs], Tue Mar 20 11:26:51 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.30.2.9: +4 -2 lines
Diff to previous 1.30.2.9 (colored) to selected 1.43.6.2 (colored)

- revive schedclock and rename sched_clock to sched_schedclock.
  (yes, a poor name...)
  make schedclock check if curlwp is idle.
- statclock: in the case of schedhz==0, call schedclock periodically,
  regardless of idleness.
- fix a comment.  (don't assume schedhz==0.)

Revision 1.30.2.9 / (download) - annotate - [select for diffs], Sat Mar 17 16:54:38 2007 UTC (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.30.2.8: +3 -3 lines
Diff to previous 1.30.2.8 (colored) to selected 1.43.6.2 (colored)

Do not do an implicit enqueue in sched_switch(), move enqueueing back to
the dispatcher. Rename sched_switch() back to sched_nextlwp(). Add for
sched_enqueue() new argument, which indicates the calling from mi_switch().

Requested by yamt@

Revision 1.30.2.8 / (download) - annotate - [select for diffs], Fri Mar 9 15:16:26 2007 UTC (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.30.2.7: +9 -5 lines
Diff to previous 1.30.2.7 (colored) to selected 1.43.6.2 (colored)

Checkpoint:

- Addition of scheduler-specific pointers in the struct proc, lwp and
  schedstate_percpu.
- Addition of sched_lwp_fork(), sched_lwp_exit() and sched_slept() hooks.
- mi_switch() now has only one argument.
- sched_nextlwp(void) becomes sched_switch(struct lwp *) and does an
  enqueueing of LWP.
- Addition of general kern.sched sysctl node.
- Remove twice called uvmexp.swtch++, other cleanups.

Discussed on tech-kern@

Revision 1.30.2.7 / (download) - annotate - [select for diffs], Tue Feb 27 17:20:53 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.30.2.6: +2 -2 lines
Diff to previous 1.30.2.6 (colored) to selected 1.43.6.2 (colored)

fix a merge botch.

Revision 1.30.2.6 / (download) - annotate - [select for diffs], Tue Feb 27 16:55:17 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.30.2.5: +9 -21 lines
Diff to previous 1.30.2.5 (colored) to selected 1.43.6.2 (colored)

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

Revision 1.33 / (download) - annotate - [select for diffs], Tue Feb 27 15:07:28 2007 UTC (17 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.32: +18 -14 lines
Diff to previous 1.32 (colored) to selected 1.43.6.2 (colored)

typedef pri_t and use it instead of int and u_char.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Feb 26 10:50:30 2007 UTC (17 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.31: +0 -20 lines
Diff to previous 1.31 (colored) to selected 1.43.6.2 (colored)

move wchan_t and syncobj_t to a dedicated header to simplify dependencies.
fix "XXX wchan_t".

Revision 1.31 / (download) - annotate - [select for diffs], Mon Feb 26 09:20:52 2007 UTC (17 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.30: +7 -2 lines
Diff to previous 1.30 (colored) to selected 1.43.6.2 (colored)

implement priority inheritance.

Revision 1.21.2.2 / (download) - annotate - [select for diffs], Mon Feb 26 09:12:14 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.21.2.1: +16 -43 lines
Diff to previous 1.21.2.1 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.30.2.5 / (download) - annotate - [select for diffs], Sun Feb 25 13:57:14 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.30.2.4: +0 -1 lines
Diff to previous 1.30.2.4 (colored) to selected 1.43.6.2 (colored)

move cpu_switchto to sys/cpu.h from sys/sched.h.

Revision 1.30.2.4 / (download) - annotate - [select for diffs], Fri Feb 23 12:12:34 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.30.2.3: +0 -8 lines
Diff to previous 1.30.2.3 (colored) to selected 1.43.6.2 (colored)

remove now empty sched_4bsd.h.

Revision 1.30.2.3 / (download) - annotate - [select for diffs], Fri Feb 23 12:00:29 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.30.2.2: +4 -1 lines
Diff to previous 1.30.2.2 (colored) to selected 1.43.6.2 (colored)

remove an SCHED_4BSD #ifdef (schedclock).  from Daniel Sieger.
discussed on tech-kern@.

Revision 1.30.2.2 / (download) - annotate - [select for diffs], Tue Feb 20 21:48:47 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.30.2.1: +47 -28 lines
Diff to previous 1.30.2.1 (colored) to selected 1.43.6.2 (colored)

General Common Scheduler Framework (CSF) patch import. Huge thanks for
Daniel Sieger <dsieger at TechFak.Uni-Bielefeld de> for this work.

Short abstract: Split the dispatcher from the scheduler in order to
make the scheduler more modular. Introduce initial API for other
schedulers' implementations.

Discussed in tech-kern@
OK: yamt@, ad@

Note: further work will go soon.

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Sat Feb 17 10:31:06 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.30: +4 -12 lines
Diff to previous 1.30 (colored) to selected 1.43.6.2 (colored)

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

Revision 1.30 / (download) - annotate - [select for diffs], Thu Feb 15 15:09:16 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.29: +4 -16 lines
Diff to previous 1.29 (colored) to selected 1.43.6.2 (colored)

Remove now unused defs. Noted by Daniel Sieger.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:37 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.28: +17 -32 lines
Diff to previous 1.28 (colored) to selected 1.43.6.2 (colored)

Merge newlock2 to head.

Revision 1.28.8.7 / (download) - annotate - [select for diffs], Wed Jan 31 11:36:02 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.28.8.6: +2 -1 lines
Diff to previous 1.28.8.6 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored) to selected 1.43.6.2 (colored)

ktrace: don't record context switches when blocking on a turnstile.

Revision 1.28.8.6 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:24 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.28.8.5: +3 -44 lines
Diff to previous 1.28.8.5 (colored) to branchpoint 1.28 (colored) to selected 1.43.6.2 (colored)

Sync with head.

Revision 1.28.8.5 / (download) - annotate - [select for diffs], Thu Jan 11 22:23:00 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.28.8.4: +4 -1 lines
Diff to previous 1.28.8.4 (colored) to branchpoint 1.28 (colored) to selected 1.43.6.2 (colored)

Checkpoint work in progress.

Revision 1.28.8.4 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:40 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.28.8.3: +55 -3 lines
Diff to previous 1.28.8.3 (colored) to branchpoint 1.28 (colored) to selected 1.43.6.2 (colored)

Checkpoint work in progress.

Revision 1.28.8.3 / (download) - annotate - [select for diffs], Tue Oct 24 21:10:21 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.28.8.2: +3 -34 lines
Diff to previous 1.28.8.2 (colored) to branchpoint 1.28 (colored) to selected 1.43.6.2 (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.28.8.2 / (download) - annotate - [select for diffs], Fri Oct 20 19:46:01 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.28.8.1: +1 -3 lines
Diff to previous 1.28.8.1 (colored) to branchpoint 1.28 (colored) to selected 1.43.6.2 (colored)

Nuke PNOEXITERR and awaken().

Revision 1.28.8.1 / (download) - annotate - [select for diffs], Mon Sep 11 16:19:01 2006 UTC (17 years, 6 months ago) by ad
Branch: newlock2
Changes since 1.28: +4 -1 lines
Diff to previous 1.28 (colored) to selected 1.43.6.2 (colored)

Add updated locking primatives.

Revision 1.26.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:59:42 2006 UTC (17 years, 6 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored) next main 1.27 (colored) to selected 1.43.6.2 (colored)

sync with head

Revision 1.21.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:12:03 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.21: +10 -41 lines
Diff to previous 1.21 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.28 / (download) - annotate - [select for diffs], Sun May 14 21:38:18 2006 UTC (17 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, simonb-timecounters-base, rpaulo-netinet-merge-pcb-base, newlock2-nbase, newlock2-base, netbsd-4-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, netbsd-4, matt-nb4-arm-base, matt-nb4-arm, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: newlock2
Changes since 1.27: +1 -1 lines
Diff to previous 1.27 (colored) to selected 1.43.6.2 (colored)

integrate kauth.

Revision 1.26.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:19 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored) next main 1.27 (colored) to selected 1.43.6.2 (colored)

Sync with head.

Revision 1.26.10.1 / (download) - annotate - [select for diffs], Wed Apr 19 04:36:02 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored) next main 1.27 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.26.8.1 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:51 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored) next main 1.27 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.26.12.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:42:29 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored) next main 1.27 (colored) to selected 1.43.6.2 (colored)

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

Revision 1.27 / (download) - annotate - [select for diffs], Sun Mar 26 20:19:52 2006 UTC (18 years ago) by erh
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, elad-kernelauth-base
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored) to selected 1.43.6.2 (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.26 / (download) - annotate - [select for diffs], Mon Dec 26 18:41:36 2005 UTC (18 years, 3 months ago) by perry
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored) to selected 1.43.6.2 (colored)

u_intN_t -> uintN_t

Revision 1.25 / (download) - annotate - [select for diffs], Sat Dec 24 19:01:28 2005 UTC (18 years, 3 months ago) by perry
Branch: MAIN
Changes since 1.24: +4 -4 lines
Diff to previous 1.24 (colored) to selected 1.43.6.2 (colored)

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

Revision 1.24 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:21 2005 UTC (18 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.23: +1 -1 lines
Diff to previous 1.23 (colored) to selected 1.43.6.2 (colored)

merge ktrace-lwp.

Revision 1.17.2.5 / (download) - annotate - [select for diffs], Thu Nov 10 14:12:12 2005 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.17.2.4: +4 -36 lines
Diff to previous 1.17.2.4 (colored) next main 1.18 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD. Here we go again...

Revision 1.22.2.1 / (download) - annotate - [select for diffs], Wed Nov 2 11:58:11 2005 UTC (18 years, 5 months ago) by yamt
Branch: yamt-vop
Changes since 1.22: +1 -14 lines
Diff to previous 1.22 (colored) next main 1.23 (colored) to selected 1.43.6.2 (colored)

sync with head.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Oct 30 20:28:56 2005 UTC (18 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, ktrace-lwp-base
Changes since 1.22: +1 -14 lines
Diff to previous 1.22 (colored) to selected 1.43.6.2 (colored)

- localize some definitions.
- use PPQ macro where appropriate.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Oct 6 07:02:13 2005 UTC (18 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base2, yamt-vop-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-vop
Changes since 1.21: +3 -22 lines
Diff to previous 1.21 (colored) to selected 1.43.6.2 (colored)

uninline scheduler hooks.

Revision 1.21 / (download) - annotate - [select for diffs], Sun May 29 21:19:12 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored) to selected 1.43.6.2 (colored)

Another volatile wakeup.

Revision 1.19.8.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:38 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored) next main 1.20 (colored) to selected 1.43.6.2 (colored)

sync with -current

Revision 1.19.10.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:52 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored) next main 1.20 (colored) to selected 1.43.6.2 (colored)

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

Revision 1.17.2.4 / (download) - annotate - [select for diffs], Fri Mar 4 16:54:23 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.17.2.3: +3 -3 lines
Diff to previous 1.17.2.3 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.20 / (download) - annotate - [select for diffs], Sat Feb 26 22:25:34 2005 UTC (19 years, 1 month 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, netbsd-3, kent-audio2-base
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored) to selected 1.43.6.2 (colored)

nuke trailing whitespace

Revision 1.17.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:38:49 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.17.2.2: +1 -1 lines
Diff to previous 1.17.2.2 (colored) to selected 1.43.6.2 (colored)

Fix the sync with head I botched.

Revision 1.17.2.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:56:30 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.17.2.1: +0 -0 lines
Diff to previous 1.17.2.1 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD.

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:56:30 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.17: +3 -7 lines
Diff to previous 1.17 (colored) to selected 1.43.6.2 (colored)

Sync with HEAD

Revision 1.19 / (download) - annotate - [select for diffs], Thu Aug 7 16:34:12 2003 UTC (20 years, 7 months ago) by agc
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, 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-base, 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, netbsd-2-0, netbsd-2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.18: +2 -6 lines
Diff to previous 1.18 (colored) to selected 1.43.6.2 (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.18 / (download) - annotate - [select for diffs], Tue Jul 8 06:49:22 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored) to selected 1.43.6.2 (colored)

prototype must not carry variable name

Revision 1.17 / (download) - annotate - [select for diffs], Mon Apr 28 23:16:29 2003 UTC (20 years, 11 months ago) by bjh21
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.16: +4 -3 lines
Diff to previous 1.16 (colored) to selected 1.43.6.2 (colored)

Add a new feature-test macro, _NETBSD_SOURCE.  If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Feb 4 13:41:49 2003 UTC (21 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored) to selected 1.43.6.2 (colored)

constify wait channels of ltsleep/wakeup.  they are never dereferenced.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Jan 18 09:53:20 2003 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.14: +18 -9 lines
Diff to previous 1.14 (colored) to selected 1.43.6.2 (colored)

Merge the nathanw_sa branch.

Revision 1.10.2.4 / (download) - annotate - [select for diffs], Wed Dec 18 19:44:37 2002 UTC (21 years, 3 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.10.2.3: +13 -4 lines
Diff to previous 1.10.2.3 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored) to selected 1.43.6.2 (colored)

Move sched_param and policies into sys/sched.h, and give SCHED_OTHER
the value 0.

Revision 1.14.10.5 / (download) - annotate - [select for diffs], Sat Mar 16 20:57:41 2002 UTC (22 years ago) by thorpej
Branch: newlock
Changes since 1.14.10.4: +2 -2 lines
Diff to previous 1.14.10.4 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored) to selected 1.43.6.2 (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.14.10.4 / (download) - annotate - [select for diffs], Sat Mar 16 03:46:38 2002 UTC (22 years ago) by thorpej
Branch: newlock
Changes since 1.14.10.3: +9 -3 lines
Diff to previous 1.14.10.3 (colored) to branchpoint 1.14 (colored) to selected 1.43.6.2 (colored)

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

Revision 1.14.10.3 / (download) - annotate - [select for diffs], Sun Mar 10 21:33:09 2002 UTC (22 years ago) by thorpej
Branch: newlock
Changes since 1.14.10.2: +2 -2 lines
Diff to previous 1.14.10.2 (colored) to branchpoint 1.14 (colored) to selected 1.43.6.2 (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.14.10.2 / (download) - annotate - [select for diffs], Sun Mar 10 21:05:11 2002 UTC (22 years ago) by thorpej
Branch: newlock
Changes since 1.14.10.1: +2 -2 lines
Diff to previous 1.14.10.1 (colored) to branchpoint 1.14 (colored) to selected 1.43.6.2 (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.14.10.1 / (download) - annotate - [select for diffs], Sun Mar 10 19:08:26 2002 UTC (22 years ago) by thorpej
Branch: newlock
Changes since 1.14: +45 -15 lines
Diff to previous 1.14 (colored) to selected 1.43.6.2 (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.10.2.3 / (download) - annotate - [select for diffs], Fri Aug 24 00:13:08 2001 UTC (22 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.10.2.2: +17 -3 lines
Diff to previous 1.10.2.2 (colored) to branchpoint 1.10 (colored) to selected 1.43.6.2 (colored)

Catch up with -current.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jul 1 18:06:12 2001 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf, newlock-base, 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, nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, kqueue, ifpoll-base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, gehenna-devsw, fvdl_fs64_base, eeh-devprop-base, eeh-devprop
Branch point for: newlock
Changes since 1.13: +17 -3 lines
Diff to previous 1.13 (colored) to selected 1.43.6.2 (colored)

Linux-compatible clone(2) system call, lifted from the Linux
compatibility module.  Based on patches from Bang Jun-Young <bjy@mogua.org>.

Revision 1.10.2.2 / (download) - annotate - [select for diffs], Thu Jun 21 20:09:52 2001 UTC (22 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.10.2.1: +8 -8 lines
Diff to previous 1.10.2.1 (colored) to branchpoint 1.10 (colored) to selected 1.43.6.2 (colored)

Catch up to -current.

Revision 1.13 / (download) - annotate - [select for diffs], Wed May 30 12:07:05 2001 UTC (22 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored) to selected 1.43.6.2 (colored)

use _KERNEL_OPT

Revision 1.12 / (download) - annotate - [select for diffs], Sun May 6 13:47:14 2001 UTC (22 years, 10 months ago) by simonb
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored) to selected 1.43.6.2 (colored)

Declare schedhz and rrticks as 'externs'.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Apr 30 01:13:21 2001 UTC (22 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.10: +5 -5 lines
Diff to previous 1.10 (colored) to selected 1.43.6.2 (colored)

remove some lint

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:50:03 2001 UTC (23 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.10: +6 -6 lines
Diff to previous 1.10 (colored) to selected 1.43.6.2 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.2.8.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:11:34 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.2: +154 -31 lines
Diff to previous 1.2 (colored) next main 1.3 (colored) to selected 1.43.6.2 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.10 / (download) - annotate - [select for diffs], Sat Aug 26 04:17:44 2000 UTC (23 years, 7 months ago) by sommerfeld
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored) to selected 1.43.6.2 (colored)

Forward-declare struct cpu_info

Revision 1.9 / (download) - annotate - [select for diffs], Sat Aug 26 04:01:18 2000 UTC (23 years, 7 months ago) by sommerfeld
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored) to selected 1.43.6.2 (colored)

On second thought.. pass cpu_info * to roundrobin() explicitly.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Aug 26 03:34:36 2000 UTC (23 years, 7 months ago) by sommerfeld
Branch: MAIN
Changes since 1.7: +6 -1 lines
Diff to previous 1.7 (colored) to selected 1.43.6.2 (colored)

More MP clock/scheduler changes:
 - Periodically invoke roundrobin() from hardclock() on all cpu's rather
than from a timer callout; this allows time-slicing on non-primary cpu's.
 - Make pscnt per-cpu.
 - Notice psdiv changes on each cpu, and adjust pscnt at that point.
Also, invoke setstatclockrate() from the clock interrupt when each cpu
notices the divisor change, rather than when starting/stopping the
profiling clock.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Aug 21 02:07:18 2000 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored) to selected 1.43.6.2 (colored)

splhigh() -> splsched().

Revision 1.6 / (download) - annotate - [select for diffs], Sun Aug 20 21:50:12 2000 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.5: +42 -2 lines
Diff to previous 1.5 (colored) to selected 1.43.6.2 (colored)

Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it).  Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:10:27 2000 UTC (23 years, 9 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.4: +15 -1 lines
Diff to previous 1.4 (colored) next main 1.5 (colored) to selected 1.43.6.2 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Jun 3 20:42:44 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5
Changes since 1.4: +15 -1 lines
Diff to previous 1.4 (colored) to selected 1.43.6.2 (colored)

Move schedticks and cp_time into schedstate_percpu.  Also, allow
non-primary CPUs to call hardclock(), but make them bail about
before updating global timekeeping state (that's the job of the
primary CPU).

Revision 1.4 / (download) - annotate - [select for diffs], Sat May 27 13:51:38 2000 UTC (23 years, 10 months ago) by sommerfeld
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.3: +4 -1 lines
Diff to previous 1.3 (colored) to selected 1.43.6.2 (colored)

Add include of <sys/time.h> for now..

Revision 1.3 / (download) - annotate - [select for diffs], Fri May 26 21:20:33 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.2: +90 -30 lines
Diff to previous 1.2 (colored) to selected 1.43.6.2 (colored)

First sweep at scheduler state cleanup.  Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Feb 28 18:14:58 1999 UTC (25 years, 1 month ago) by ross
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase, chs-ubc2-base, chs-ubc2
Branch point for: thorpej_scsipi
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored) to selected 1.43.6.2 (colored)

schedclk() -> schedclock(), for consistency with hardclock(), statclock(), ...
update comments for recent scheduler mods

Revision 1.1 / (download) - annotate - [select for diffs], Tue Feb 23 02:56:04 1999 UTC (25 years, 1 month ago) by ross
Branch: MAIN
Diff to selected 1.43.6.2 (colored)

Scheduler bug fixes and reorganization
* fix the ancient nice(1) bug, where nice +20 processes incorrectly
  steal 10 - 20% of the CPU, (or even more depending on load average)
* provide a new schedclk() mechanism at a new clock at schedhz, so high
  platform hz values don't cause nice +0 processes to look like they are
  niced
* change the algorithm slightly, and reorganize the code a lot
* fix percent-CPU calculation bugs, and eliminate some no-op code

=== nice bug === Correctly divide the scheduler queues between niced and
compute-bound processes. The current nice weight of two (sort of, see
`algorithm change' below) neatly divides the USRPRI queues in half; this
should have been used to clip p_estcpu, instead of UCHAR_MAX.  Besides
being the wrong amount, clipping an unsigned char to UCHAR_MAX is a no-op,
and it was done after decay_cpu() which can only _reduce_ the value.  It
has to be kept <= NICE_WEIGHT * PRIO_MAX - PPQ or processes can
scheduler-penalize themselves onto the same queue as nice +20 processes.
(Or even a higher one.)

=== New schedclk() mechansism === Some platforms should be cutting down
stathz before hitting the scheduler, since the scheduler algorithm only
works right in the vicinity of 64 Hz. Rather than prescale hz, then scale
back and forth by 4 every time p_estcpu is touched (each occurance an
abstraction violation), use p_estcpu without scaling and require schedhz
to be generated directly at the right frequency. Use a default stathz (well,
actually, profhz) / 4, so nothing changes unless a platform defines schedhz
and a new clock.  Define these for alpha, where hz==1024, and nice was
totally broke.

=== Algorithm change === The nice value used to be added to the
exponentially-decayed scheduler history value p_estcpu, in _addition_ to
be incorporated directly (with greater wieght) into the priority calculation.
At first glance, it appears to be a pointless increase of 1/8 the nice
effect (pri = p_estcpu/4 + nice*2), but it's actually at least 3x that
because it will ramp up linearly but be decayed only exponentially, thus
converging to an additional .75 nice for a loadaverage of one. I killed
this, it makes the behavior hard to control, almost impossible to analyze,
and the effect (~~nothing at for the first second, then somewhat increased
niceness after three seconds or more, depending on load average) pointless.

=== Other bugs === hz -> profhz in the p_pctcpu = f(p_cpticks) calcuation.
Collect scheduler functionality. Try to put each abstraction in just one
place.

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>