The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.97 / (download) - annotate - [select for diffs], Sat Sep 2 17:44:59 2023 UTC (6 months ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.96: +2 -6 lines
Diff to previous 1.96 (colored)

heartbeat(9): Move #ifdef HEARTBEAT to sys/heartbeat.h.

Less error-prone this way, and the callers are less cluttered.

Revision 1.96 / (download) - annotate - [select for diffs], Sat Sep 2 17:43:28 2023 UTC (6 months ago) by riastradh
Branch: MAIN
Changes since 1.95: +6 -6 lines
Diff to previous 1.95 (colored)

cpu_setstate: Fix call to heartbeat_suspend.

Do this on successful offlining, not on failed offlining.

No functional change right now because heartbeat_suspend is
implemented as a noop -- heartbeat(9) will just check the
SPCF_OFFLINE flag.  But if we change it to not be a noop, well, then
we need to call it in the right place.

Revision 1.95 / (download) - annotate - [select for diffs], Fri Jul 7 12:34:50 2023 UTC (7 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.94: +12 -2 lines
Diff to previous 1.94 (colored)

heartbeat(9): New mechanism to check progress of kernel.

This uses hard interrupts to check progress of low-priority soft
interrupts, and one CPU to check progress of another CPU.

If no progress has been made after a configurable number of seconds
(kern.heartbeat.max_period, default 15), then the system panics --
preferably on the CPU that is stuck so we get a stack trace in dmesg
of where it was stuck, but if the stuckness was detected by another
CPU and the stuck CPU doesn't acknowledge the request to panic within
one second, the detecting CPU panics instead.

This doesn't supplant hardware watchdog timers.  It is possible for
hard interrupts to be stuck on all CPUs for some reason too; in that
case heartbeat(9) has no opportunity to complete.

Downside: heartbeat(9) relies on hardclock to run at a reasonably
consistent rate, which might cause trouble for the glorious tickless
future.  However, it could be adapted to take a parameter for an
approximate number of units that have elapsed since the last call on
the current CPU, rather than treating that as a constant 1.

XXX kernel revbump -- changes struct cpu_info layout

Revision 1.94 / (download) - annotate - [select for diffs], Sun Feb 26 07:13:55 2023 UTC (12 months ago) by skrll
Branch: MAIN
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored)

ci_data.cpu_kcpuset -> ci_kcpuset

NFCI.

Revision 1.93 / (download) - annotate - [select for diffs], Thu Oct 8 09:16:13 2020 UTC (3 years, 4 months ago) by rin
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, netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, 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.92: +4 -6 lines
Diff to previous 1.92 (colored)

PR kern/45117

Work around regression introduced in rev 1.92:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_cpu.c#rev1.92

by which ``cpuctl offline n'' became broken on architectures without
__HAVE_INTR_CONTROL (i.e., everything other than alpha and x86);
cpu_setintr() always fails on these archs, and we had neglected
return value from that function until rev 1.91.

XXX
As martin pointed out in the PR, I'm not sure whether fix in rev 1.92
itself is correct or not. Insert XXX comment referring the PR there....

Revision 1.92 / (download) - annotate - [select for diffs], Mon Jul 13 13:16:07 2020 UTC (3 years, 7 months ago) by jruoho
Branch: MAIN
Changes since 1.91: +7 -3 lines
Diff to previous 1.91 (colored)

Do not allow disabling interrupts on the primary CPU. Fixes PR kern/45117.

Revision 1.91 / (download) - annotate - [select for diffs], Thu May 28 20:29:18 2020 UTC (3 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.90: +4 -3 lines
Diff to previous 1.90 (colored)

At least panic with a useful message if there are too many CPUs.

Revision 1.90 / (download) - annotate - [select for diffs], Sat May 23 23:42:43 2020 UTC (3 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.89: +5 -5 lines
Diff to previous 1.89 (colored)

Move proc_lock into the data segment.  It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.

Revision 1.73.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:03 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.73.2.1: +23 -70 lines
Diff to previous 1.73.2.1 (colored) to branchpoint 1.73 (colored) next main 1.74 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.89 / (download) - annotate - [select for diffs], Sat Dec 21 11:35:25 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.88: +4 -2 lines
Diff to previous 1.88 (colored)

Fix build failure.

Revision 1.88 / (download) - annotate - [select for diffs], Fri Dec 20 21:20:09 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.87: +7 -381 lines
Diff to previous 1.87 (colored)

Split subr_cpu.c out of kern_cpu.c, to contain routines shared with rump.

Revision 1.87 / (download) - annotate - [select for diffs], Fri Dec 20 21:05:34 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.86: +78 -39 lines
Diff to previous 1.86 (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.86 / (download) - annotate - [select for diffs], Wed Dec 18 19:40:34 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.85: +3 -3 lines
Diff to previous 1.85 (colored)

Passify rump build.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Dec 17 00:59:14 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.84: +3 -3 lines
Diff to previous 1.84 (colored)

More rump-ing.  I will split this into two files during the week.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Dec 17 00:51:28 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored)

Rump is living up to its name

Revision 1.83 / (download) - annotate - [select for diffs], Tue Dec 17 00:33:47 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.82: +6 -4 lines
Diff to previous 1.82 (colored)

Hopefully unbreak the build - now that this is included in rump.

Revision 1.82 / (download) - annotate - [select for diffs], Mon Dec 16 22:47:54 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.81: +90 -2 lines
Diff to previous 1.81 (colored)

- Extend the per-CPU counters matt@ did to include all of the hot counters
  in UVM, excluding uvmexp.free, which needs special treatment and will be
  done with a separate commit.  Cuts system time for a build by 20-25% on
  a 48 CPU machine w/DIAGNOSTIC.

- Avoid 64-bit integer divide on every fault (for rnd_add_uint32).

Revision 1.81 / (download) - annotate - [select for diffs], Wed Dec 4 09:34:13 2019 UTC (4 years, 2 months ago) by wiz
Branch: MAIN
Changes since 1.80: +4 -4 lines
Diff to previous 1.80 (colored)

Fix typo in comment (typlogy)

Revision 1.80 / (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.79: +129 -47 lines
Diff to previous 1.79 (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.79 / (download) - annotate - [select for diffs], Mon Dec 2 23:22:43 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.78: +115 -3 lines
Diff to previous 1.78 (colored)

Take the basic CPU topology information we already collect, and use it
to make circular lists of CPU siblings in the same core, and in the
same package.  Nothing fancy, just enough to have a bit of fun in the
scheduler trying out different tactics.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Dec 1 15:34:46 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.77: +4 -4 lines
Diff to previous 1.77 (colored)

Fix false sharing problems with cpu_info.  Identified with tprof(8).
This was a very nice win in my tests on a 48 CPU box.

- Reorganise cpu_data slightly according to usage.
- Put cpu_onproc into struct cpu_info alongside ci_curlwp (now is ci_onproc).
- On x86, put some items in their own cache lines according to usage, like
  the IPI bitmask and ci_want_resched.

Revision 1.77 / (download) - annotate - [select for diffs], Wed Nov 13 01:31:47 2019 UTC (4 years, 3 months ago) by mrg
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.76: +5 -3 lines
Diff to previous 1.76 (colored)

put the ucode not found message under #ifdef DEBUG.  use printf()
instead of aprint_error().

there's an error returned to userland and displayed by cpuctl.

Revision 1.76 / (download) - annotate - [select for diffs], Sun Oct 6 02:04:26 2019 UTC (4 years, 4 months ago) by uwe
Branch: MAIN
Changes since 1.75: +8 -8 lines
Diff to previous 1.75 (colored)

Define cpu_xc_* functions with unused second argument to make them
conform to xcfunc_t callback typedef (-Wcast-function-type).
Same object code is generated.

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

Sync with HEAD

Revision 1.71.16.11 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:50 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.71.16.10: +8 -3 lines
Diff to previous 1.71.16.10 (colored) to branchpoint 1.71 (colored) next main 1.72 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.75 / (download) - annotate - [select for diffs], Tue Nov 13 11:06:19 2018 UTC (5 years, 3 months ago) by skrll
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, 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, isaki-audio2-base, isaki-audio2
Changes since 1.74: +8 -3 lines
Diff to previous 1.74 (colored)

Fix/add KASSERTS to work with a system of MAXCPUS.  Add some comments to
explain things.

Discussed with rmind

Revision 1.71.16.10 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:08 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.71.16.9: +7 -2 lines
Diff to previous 1.71.16.9 (colored) to branchpoint 1.71 (colored)

Sync with HEAD

Revision 1.71.10.1 / (download) - annotate - [select for diffs], Thu Jul 26 21:02:29 2018 UTC (5 years, 7 months ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.71: +7 -2 lines
Diff to previous 1.71 (colored) next main 1.72 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #929):
	sys/arch/x86/x86/cpu_ucode_intel.c: 1.14
	sys/kern/kern_cpu.c: 1.74
Add cpu_ucode_intel_verify() to verify microcode image. Currently, we don't
verify extended signatures'checksum. I have no any image which has extended
signature. If an extended signature found, the function shows
"This image has extended signature table." and continue.
--
Don't allocate memory and return EFTYPE if sc->sc_blobsize==0 to prevent
panic in firmware_malloc().

Revision 1.74 / (download) - annotate - [select for diffs], Wed Jul 4 07:25:47 2018 UTC (5 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.73: +7 -2 lines
Diff to previous 1.73 (colored)

 Don't allocate memory and return EFTYPE if sc->sc_blobsize==0 to prevent
panic in firmware_malloc().

Revision 1.71.16.9 / (download) - annotate - [select for diffs], Thu Mar 22 01:44:50 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.71.16.8: +2 -2 lines
Diff to previous 1.71.16.8 (colored) to branchpoint 1.71 (colored)

Synch with HEAD, resolve conflicts

Revision 1.71.16.8 / (download) - annotate - [select for diffs], Sun Mar 18 01:17:29 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.71.16.7: +4 -4 lines
Diff to previous 1.71.16.7 (colored) to branchpoint 1.71 (colored)

Import from -current the MD glue code for compat cpu_ucode

Revision 1.73 / (download) - annotate - [select for diffs], Sun Mar 18 00:51:46 2018 UTC (5 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322
Branch point for: phil-wifi
Changes since 1.72: +4 -4 lines
Diff to previous 1.72 (colored)

finish MD glue for compat ucode module.

Revision 1.71.16.7 / (download) - annotate - [select for diffs], Sat Mar 17 21:37:53 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.71.16.6: +4 -21 lines
Diff to previous 1.71.16.6 (colored) to branchpoint 1.71 (colored)

Import christos's changes for the compat_60 cpu_ucode stuff

Revision 1.72 / (download) - annotate - [select for diffs], Sat Mar 17 19:03:25 2018 UTC (5 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.71: +4 -21 lines
Diff to previous 1.71 (colored)

move the compat code in compat.

Revision 1.71.16.6 / (download) - annotate - [select for diffs], Sat Mar 17 06:49:57 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.71.16.5: +8 -27 lines
Diff to previous 1.71.16.5 (colored) to branchpoint 1.71 (colored)

Back out changes on the branch related to kernel microcode compat.

Christos didn't like the way it was done, so waiting for a better
approach/implementation.

Revision 1.71.16.5 / (download) - annotate - [select for diffs], Sat Mar 17 02:56:36 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.71.16.4: +11 -5 lines
Diff to previous 1.71.16.4 (colored) to branchpoint 1.71 (colored)

Use two different compat stubs since they have different prototypes.

Revision 1.71.16.4 / (download) - annotate - [select for diffs], Sat Mar 17 00:58:01 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.71.16.3: +3 -3 lines
Diff to previous 1.71.16.3 (colored) to branchpoint 1.71 (colored)

Typo - add missing (

Revision 1.71.16.3 / (download) - annotate - [select for diffs], Sat Mar 17 00:42:31 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.71.16.2: +4 -4 lines
Diff to previous 1.71.16.2 (colored) to branchpoint 1.71 (colored)

Typos - add missing )'s

Revision 1.71.16.2 / (download) - annotate - [select for diffs], Fri Mar 16 08:10:27 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.71.16.1: +4 -2 lines
Diff to previous 1.71.16.1 (colored) to branchpoint 1.71 (colored)

Move closer to getting a compat_60 module - still needs more work

Revision 1.71.16.1 / (download) - annotate - [select for diffs], Fri Mar 16 01:16:29 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.71: +19 -8 lines
Diff to previous 1.71 (colored)

Initial pass at setting up the compat_60 module.

XXX needs some work to properly handle cpu_ucode stuff.

While here, move details of compat_70 init/fini routines into the
module itself.

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

update from HEAD

Revision 1.66.2.1 / (download) - annotate - [select for diffs], Wed Nov 4 18:00:34 2015 UTC (8 years, 4 months ago) by riz
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Changes since 1.66: +9 -7 lines
Diff to previous 1.66 (colored) next main 1.67 (colored)

Pull up following revision(s) (requested by maxv in ticket #965):
	sys/kern/kern_cpu.c: revision 1.71
Don't decrement the number of offline cpus if we fail to shut down one.
ok christos@, via tech-kern@

Revision 1.66.4.2 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:07 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.66.4.1: +12 -10 lines
Diff to previous 1.66.4.1 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored)

Sync with HEAD

Revision 1.71 / (download) - annotate - [select for diffs], Sat Aug 29 12:24:00 2015 UTC (8 years, 6 months ago) by maxv
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, 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-base, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: pgoyette-compat, netbsd-8
Changes since 1.70: +9 -7 lines
Diff to previous 1.70 (colored)

Don't decrement the number of offline cpus if we fail to shut down one.

ok christos@, via tech-kern@

Revision 1.70 / (download) - annotate - [select for diffs], Thu Aug 20 09:45:45 2015 UTC (8 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored)

include ioconf.h instead of locally declaring the prototype of the attach
function

Revision 1.69 / (download) - annotate - [select for diffs], Thu Aug 20 08:27:09 2015 UTC (8 years, 6 months ago) by uebayasi
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)

Mark pseudo attach unused arg with __unused.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Aug 18 13:46:20 2015 UTC (8 years, 6 months ago) by uebayasi
Branch: MAIN
Changes since 1.67: +4 -4 lines
Diff to previous 1.67 (colored)

Convert pseudo attach functions to take no arguments, as some functions
(pppattach(), putterattach(), etc.) already do.  This means that pseudo
attach function will be able to become a constructor.

Revision 1.66.4.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:20 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored)

Sync with HEAD

Revision 1.67 / (download) - annotate - [select for diffs], Wed Jan 7 07:05:48 2015 UTC (9 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored)

Pass a correct firmware size (instead of 0) to firmware_free

firmware_free now uses kmem_free(9) instead of free(9),
so we need to pass a correct size to it.

Revision 1.58.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:28 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.58.2.1: +43 -11 lines
Diff to previous 1.58.2.1 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.65.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:55:58 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.65: +3 -2 lines
Diff to previous 1.65 (colored) next main 1.66 (colored)

Rebase.

Revision 1.66 / (download) - annotate - [select for diffs], Fri Jul 25 08:10:40 2014 UTC (9 years, 7 months ago) by dholland
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, nick-nhusb-base, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Branch point for: nick-nhusb, netbsd-7
Changes since 1.65: +3 -2 lines
Diff to previous 1.65 (colored)

Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.

Revision 1.52.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.52.2.2: +42 -11 lines
Diff to previous 1.52.2.2 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored)

sync with head.

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

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

Revision 1.59.2.2 / (download) - annotate - [select for diffs], Sun May 18 17:46:07 2014 UTC (9 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.59.2.1: +37 -11 lines
Diff to previous 1.59.2.1 (colored) to branchpoint 1.59 (colored) next main 1.60 (colored)

sync with head

Revision 1.65 / (download) - annotate - [select for diffs], Tue Mar 25 12:50:53 2014 UTC (9 years, 11 months ago) by macallan
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Branch point for: tls-earlyentropy
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

snprintf -> vsnprintf in cpu_setmodel()
now this can actually work
hi christos

Revision 1.64 / (download) - annotate - [select for diffs], Mon Mar 24 20:07:41 2014 UTC (9 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.63: +23 -2 lines
Diff to previous 1.63 (colored)

- create  cpu_{g,s}etmodel() and hide cpu_model from direct access.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Mar 16 05:20:30 2014 UTC (9 years, 11 months ago) by dholland
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.62: +13 -5 lines
Diff to previous 1.62 (colored)

Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.

Revision 1.36.4.2.4.1 / (download) - annotate - [select for diffs], Sat Feb 15 10:12:47 2014 UTC (10 years ago) by matt
Branch: matt-nb5-mips64
Changes since 1.36.4.2: +13 -2 lines
Diff to previous 1.36.4.2 (colored) next main 1.37 (colored)

Add cpu_softintr_p()
Add cpu_name to cpu_data

Revision 1.62 / (download) - annotate - [select for diffs], Thu Dec 19 23:36:07 2013 UTC (10 years, 2 months ago) by mlelstv
Branch: MAIN
Changes since 1.61: +4 -4 lines
Diff to previous 1.61 (colored)

cpu_infos is a NULL terminated array, not an array followed by a 0 byte.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Nov 24 21:58:38 2013 UTC (10 years, 3 months ago) by rmind
Branch: MAIN
Changes since 1.60: +7 -10 lines
Diff to previous 1.60 (colored)

Remove cpu_queue (and thus eleminate another use of CIRCLEQ) by replacing
its uses with cpu_infos array.  Extra testing by christos@.

Revision 1.59.2.1 / (download) - annotate - [select for diffs], Wed Aug 28 23:59:35 2013 UTC (10 years, 6 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.59: +7 -2 lines
Diff to previous 1.59 (colored)

sync with head

Revision 1.60 / (download) - annotate - [select for diffs], Thu Aug 22 19:50:55 2013 UTC (10 years, 6 months ago) by drochner
Branch: MAIN
Changes since 1.59: +7 -2 lines
Diff to previous 1.59 (colored)

-extend the pcu(9) API by a function which saves all context on the
 current CPU, and use it if a CPU is taken offline
-add a bool argument to pcu_discard which tells whether the internal
 "LWP has used the coprocessor" flag should be set or reset. The flag
 is reported by pcu_used_p(). If set, future accesses should use the
 state stored in the PCB. If reset, it should be reset to default.
 The former case is useful for setmcontext().
 With that, it should not be necessary anymore to manage the "FPU used"
 state by an additional MD variable.

approved by matt

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:42 2012 UTC (11 years, 3 months ago) by tls
Branch: tls-maxphys
Changes since 1.58: +6 -4 lines
Diff to previous 1.58 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.52.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:28 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.52.2.1: +32 -10 lines
Diff to previous 1.52.2.1 (colored) to branchpoint 1.52 (colored)

sync with head

Revision 1.59 / (download) - annotate - [select for diffs], Wed Oct 17 20:19:55 2012 UTC (11 years, 4 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.58: +6 -4 lines
Diff to previous 1.58 (colored)

put binary compatibility support for the old AMD-only CPU microcode
update API inside COMPAT_60

Revision 1.58 / (download) - annotate - [select for diffs], Sat Sep 1 00:24:43 2012 UTC (11 years, 6 months ago) by matt
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.57: +8 -2 lines
Diff to previous 1.57 (colored)

Add a kcpuset_t which just includes ourself.
Add a ci_cpuname for convenience

Revision 1.57 / (download) - annotate - [select for diffs], Wed Aug 29 17:13:21 2012 UTC (11 years, 6 months ago) by drochner
Branch: MAIN
Changes since 1.56: +21 -5 lines
Diff to previous 1.56 (colored)

Extend the CPU microcode update framework to support Intel x86 CPUs.
Contrary to the AMD implementation, it doesn't use xcalls to distribute
the update to all CPUs but relies on cpuctl(8) to bind itself to the
right CPU -- to keep it simple and avoid possible problems with
hyperthreading.
Also, it doesn't parse the vendor supplied file to pick the right
part for the present CPU model but relies on userland to prepare
files with specific filenames. I'll commit a pkg for this in a minute
(pkgsrc/sysutils/intel-microcode).
The ioctl interface changed; compatibility is provided (should be
limited to COMPAT_NETBSD6 as soon as this is available).

Revision 1.56 / (download) - annotate - [select for diffs], Wed Jun 13 23:00:05 2012 UTC (11 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.55: +5 -7 lines
Diff to previous 1.55 (colored)

Kill conditionals that are always true. Drop a dead assignment.

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:22 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.52: +84 -6 lines
Diff to previous 1.52 (colored)

sync with head

Revision 1.52.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:27 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.52: +84 -6 lines
Diff to previous 1.52 (colored) next main 1.53 (colored)

merge to -current.

Revision 1.55 / (download) - annotate - [select for diffs], Sun Jan 29 22:55:40 2012 UTC (12 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-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
Changes since 1.54: +23 -5 lines
Diff to previous 1.54 (colored)

- Add mi_cpu_init() and initialise cpu_lock and kcpuset_attached/running there.
- Add kcpuset_running which gets set in idle_loop().
- Use kcpuset_running in pserialize_perform().

Revision 1.54 / (download) - annotate - [select for diffs], Tue Jan 17 10:47:27 2012 UTC (12 years, 1 month ago) by cegger
Branch: MAIN
Changes since 1.53: +2 -7 lines
Diff to previous 1.53 (colored)

fix secmodel implementation of CPU_UCODE.
ok wiz@ for the manpages
ok elad@

Revision 1.53 / (download) - annotate - [select for diffs], Fri Jan 13 16:05:15 2012 UTC (12 years, 1 month ago) by cegger
Branch: MAIN
Changes since 1.52: +68 -3 lines
Diff to previous 1.52 (colored)

Support CPU microcode loading via cpuctl(8).
Implemented and enabled via CPU_UCODE kernel config option
for x86 and Xen Dom0.
Tested on different AMD machines with different
CPU families.

ok wiz@ for the manpages
ok releng@
ok core@ via releng@

Revision 1.52 / (download) - annotate - [select for diffs], Sat Oct 29 11:41:32 2011 UTC (12 years, 4 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.51: +4 -4 lines
Diff to previous 1.51 (colored)

Fix comment.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Sep 11 14:54:49 2011 UTC (12 years, 5 months ago) by jdc
Branch: MAIN
Changes since 1.50: +3 -2 lines
Diff to previous 1.50 (colored)

Add a cs_hwid field to cpustate and use this to store the ci_cpuid (hardware
ID).  Report this as the HwID in cpuctl.
OK jruoho@.

Revision 1.50 / (download) - annotate - [select for diffs], Sun Aug 7 21:38:32 2011 UTC (12 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.49: +3 -4 lines
Diff to previous 1.49 (colored)

- Add an argument to kcpuset_create() for zeroing.
- Add kcpuset_atomic_set(), kcpuset_atomic_clear() and kcpuset_merge().

Revision 1.49 / (download) - annotate - [select for diffs], Sun Aug 7 21:13:05 2011 UTC (12 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.48: +5 -6 lines
Diff to previous 1.48 (colored)

Remove LW_AFFINITY flag and fix some bugs affinity mask handling.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Aug 7 13:33:01 2011 UTC (12 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.47: +9 -3 lines
Diff to previous 1.47 (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.47 / (download) - annotate - [select for diffs], Wed Jun 29 06:22:21 2011 UTC (12 years, 8 months ago) by matt
Branch: MAIN
Changes since 1.46: +8 -8 lines
Diff to previous 1.46 (colored)

Add the new ci to cpu_infos *before* calling routines which may want to
cpu_lookup.

Revision 1.45.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:27 2011 UTC (12 years, 9 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.45: +9 -8 lines
Diff to previous 1.45 (colored) next main 1.46 (colored)

Sync with HEAD.

Revision 1.43.4.3 / (download) - annotate - [select for diffs], Tue May 31 03:05:00 2011 UTC (12 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.43.4.2: +7 -6 lines
Diff to previous 1.43.4.2 (colored) to branchpoint 1.43 (colored) next main 1.44 (colored)

sync with head

Revision 1.46 / (download) - annotate - [select for diffs], Fri May 13 22:16:43 2011 UTC (12 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.45: +9 -8 lines
Diff to previous 1.45 (colored)

Sprinkle __cacheline_aligned and __read_mostly.

Revision 1.43.4.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:13 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.43.4.1: +13 -2 lines
Diff to previous 1.43.4.1 (colored) to branchpoint 1.43 (colored)

sync with head

Revision 1.45 / (download) - annotate - [select for diffs], Wed Dec 22 02:43:23 2010 UTC (13 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.44: +13 -2 lines
Diff to previous 1.44 (colored)

Add CTASSERT to verify __HAVE_CPU_DATA_FIRST is correct defined or undefined.

Revision 1.28.2.4 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:38 2010 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.28.2.3: +25 -10 lines
Diff to previous 1.28.2.3 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored)

sync with head.

Revision 1.43.4.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:56 2010 UTC (13 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.43: +25 -10 lines
Diff to previous 1.43 (colored)

sync with head

Revision 1.43.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:08 2010 UTC (13 years, 10 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.43: +25 -10 lines
Diff to previous 1.43 (colored) next main 1.44 (colored)

Sync with HEAD.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Apr 25 15:57:59 2010 UTC (13 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1
Changes since 1.43: +25 -10 lines
Diff to previous 1.43 (colored)

Allocate the cpu_infos array dynamically.

Revision 1.28.2.3 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:16 2010 UTC (13 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.28.2.2: +6 -2 lines
Diff to previous 1.28.2.2 (colored) to branchpoint 1.28 (colored)

sync with head

Revision 1.43 / (download) - annotate - [select for diffs], Wed Jan 13 01:57:17 2010 UTC (14 years, 1 month ago) by mrg
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.42: +6 -2 lines
Diff to previous 1.42 (colored)

introduce a new function that returns a unique string for each cpu:

	char *cpu_name(struct cpu_info *);

and use it when setting up the runq event counters, avoiding an 8 byte
kmem(4) allocation for each cpu.  there are more places the cpuname is
used that can be converted to using this new interface, but that can
and will be done as future work.

as discussed with rmind.

Revision 1.41.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:56 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.41: +108 -45 lines
Diff to previous 1.41 (colored) next main 1.42 (colored)

Sync with HEAD.

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

Revision 1.28.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:46 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.28.2.1: +176 -73 lines
Diff to previous 1.28.2.1 (colored) to branchpoint 1.28 (colored)

sync with head.

Revision 1.36.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:59 2009 UTC (14 years, 10 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.36.2.2: +108 -44 lines
Diff to previous 1.36.2.2 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored)

Sync with HEAD.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Apr 19 14:11:37 2009 UTC (14 years, 10 months ago) by ad
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, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.41: +108 -45 lines
Diff to previous 1.41 (colored)

cpuctl:

- Add interrupt shielding (direct hardware interrupts away from the
  specified CPUs). Not documented just yet but will be soon.

- Redo /dev/cpu time_t compat so no kernel changes are needed.

x86:

- Make intr_establish, intr_disestablish safe to use when !cold.

- Distribute hardware interrupts among the CPUs, instead of directing
  everything to the boot CPU.

- Add MD code for interrupt sheilding. This works in most cases but there is
  a bug where delivery is not accepted by an LAPIC after redistribution. It
  also needs re-balancing to make things fair after interrupts are turned
  back on for a CPU.

Revision 1.36.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:32:55 2009 UTC (15 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.36.2.1: +38 -4 lines
Diff to previous 1.36.2.1 (colored) to branchpoint 1.36 (colored)

Sync with HEAD.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Jan 19 23:04:26 2009 UTC (15 years, 1 month ago) by njoly
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.40: +3 -2 lines
Diff to previous 1.40 (colored)

Clear error value on exit for IOC_CPU_OGETSTATE ioctl command.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Jan 19 17:39:02 2009 UTC (15 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.39: +38 -4 lines
Diff to previous 1.39 (colored)

provide compat_50

Revision 1.36.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:38 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.36: +55 -21 lines
Diff to previous 1.36 (colored)

Sync with HEAD.

Revision 1.21.6.7 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:18 2009 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.21.6.6: +59 -37 lines
Diff to previous 1.21.6.6 (colored) to branchpoint 1.21 (colored) next main 1.22 (colored)

Sync with HEAD.

Revision 1.33.2.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:07 2008 UTC (15 years, 2 months ago) by haad
Branch: haad-dm
Changes since 1.33.2.1: +55 -21 lines
Diff to previous 1.33.2.1 (colored) to branchpoint 1.33 (colored) next main 1.34 (colored)

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

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Sun Dec 7 12:57:46 2008 UTC (15 years, 2 months ago) by ad
Branch: ad-audiomp2
Changes since 1.38: +9 -2 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

Pull cpu_softintr_p() from trunk.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Dec 7 11:40:53 2008 UTC (15 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base
Changes since 1.38: +9 -2 lines
Diff to previous 1.38 (colored)

Add cpu_softintr_p() for assertions

Revision 1.36.4.2 / (download) - annotate - [select for diffs], Thu Nov 13 00:04:07 2008 UTC (15 years, 3 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, 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, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.36.4.1: +47 -20 lines
Diff to previous 1.36.4.1 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored)

Pull up following revision(s) (requested by rmind in ticket #48):
	sys/kern/kern_cpu.c: revision 1.37
	sys/arch/x86/x86/cpu.c: revision 1.58
	sys/arch/xen/x86/cpu.c: revision 1.29
	sys/sys/cpu.h: revision 1.24
	sys/kern/sys_sched.c: revision 1.31
- Avoid the race with CPU online/offline state changes, when setting the
  affinity (cpu_lock protects these operations now).
- Disallow setting of state of CPU to to offline, if there are bound LWPs,
  which have no CPU to migrate.
- Disallow setting of affinity for the LWP(s), if all CPUs in the dynamic
  CPU-set are offline.
- sched_setaffinity: fix invalid check of kcpuset_isset().
- Rename cpu_setonline() to cpu_setstate().
Should fix PR/39349.

Revision 1.36.4.1 / (download) - annotate - [select for diffs], Fri Nov 7 23:04:37 2008 UTC (15 years, 3 months ago) by snj
Branch: netbsd-5
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

Pull up following revision(s) (requested by cegger in ticket #21):
	sys/kern/kern_cpu.c: revision 1.38
cpuctl_ioctl: use cpu_index(), instead of cpuid.
Fixes cpuctl(8) on some processors.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Nov 6 16:48:51 2008 UTC (15 years, 3 months ago) by rmind
Branch: MAIN
CVS Tags: ad-audiomp2-base
Branch point for: ad-audiomp2
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

cpuctl_ioctl: use cpu_index(), instead of cpuid.
Fixes cpuctl(8) on some processors.

Revision 1.37 / (download) - annotate - [select for diffs], Fri Oct 31 00:36:22 2008 UTC (15 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.36: +47 -20 lines
Diff to previous 1.36 (colored)

- Avoid the race with CPU online/offline state changes, when setting the
  affinity (cpu_lock protects these operations now).
- Disallow setting of state of CPU to to offline, if there are bound LWPs,
  which have no CPU to migrate.
- Disallow setting of affinity for the LWP(s), if all CPUs in the dynamic
  CPU-set are offline.
- sched_setaffinity: fix invalid check of kcpuset_isset().
- Rename cpu_setonline() to cpu_setstate().

Should fix PR/39349.

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:27 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.33: +11 -33 lines
Diff to previous 1.33 (colored)

Sync with HEAD.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Oct 15 08:13:17 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: netbsd-5-base, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.35: +8 -20 lines
Diff to previous 1.35 (colored)

- Rename cpu_lookup_byindex() to cpu_lookup(). The hardware ID isn't of
  interest to MI code. No functional change.
- Change /dev/cpu to operate on cpu index, not hardware ID. Now cpuctl
  shouldn't print confused output.

Revision 1.21.6.6 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:52 2008 UTC (15 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.21.6.5: +3 -13 lines
Diff to previous 1.21.6.5 (colored) to branchpoint 1.21 (colored)

Sync with HEAD.

Revision 1.30.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:41 2008 UTC (15 years, 5 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.30.2.1: +5 -15 lines
Diff to previous 1.30.2.1 (colored) to branchpoint 1.30 (colored) next main 1.31 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Aug 28 06:18:26 2008 UTC (15 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Changes since 1.34: +6 -21 lines
Diff to previous 1.34 (colored)

cpu_xc_offline: fix races with eg. sleepq_remove.

Revision 1.32.2.2 / (download) - annotate - [select for diffs], Fri Jul 18 16:37:49 2008 UTC (15 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.32.2.1: +14 -9 lines
Diff to previous 1.32.2.1 (colored) to branchpoint 1.32 (colored) next main 1.33 (colored)

Sync with head.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Jul 14 01:27:15 2008 UTC (15 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: simonb-wapbl-nbase, simonb-wapbl-base
Changes since 1.33: +14 -9 lines
Diff to previous 1.33 (colored)

Fix the locking against oneself, migrate LWPs only from runqueue.
Part of the fix for PR/38882.

Revision 1.21.6.5 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:13 2008 UTC (15 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.21.6.4: +9 -2 lines
Diff to previous 1.21.6.4 (colored) to branchpoint 1.21 (colored)

Sync with HEAD.

Revision 1.32.2.1 / (download) - annotate - [select for diffs], Fri Jun 27 15:11:38 2008 UTC (15 years, 8 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.32: +11 -4 lines
Diff to previous 1.32 (colored)

Sync with head.

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:50 2008 UTC (15 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.30: +21 -28 lines
Diff to previous 1.30 (colored)

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

Revision 1.33 / (download) - annotate - [select for diffs], Sun Jun 22 13:59:06 2008 UTC (15 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: haad-dm
Changes since 1.32: +11 -4 lines
Diff to previous 1.32 (colored)

When offlining a CPU, ensure that at least one other CPU within the same
processor set remains online, otherwise the system can deadlock.

Revision 1.26.2.3 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:02 2008 UTC (15 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.26.2.2: +2 -3 lines
Diff to previous 1.26.2.2 (colored) to branchpoint 1.26 (colored) next main 1.27 (colored)

sync with head.

Revision 1.21.6.4 / (download) - annotate - [select for diffs], Thu Jun 5 19:14:36 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.21.6.3: +0 -1 lines
Diff to previous 1.21.6.3 (colored) to branchpoint 1.21 (colored)

Sync with HEAD.

Also fix build.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 4 12:45:28 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4
Branch point for: simonb-wapbl
Changes since 1.31: +2 -3 lines
Diff to previous 1.31 (colored)

- vm_page: put listq, pageq into a union alongside a LIST_ENTRY, so we can
  use both types of list.

- Make page coloring and idle zero state per-CPU.

- Maintain per-CPU page freelists. When freeing, put pages onto the local
  CPU's lists and the global lists. When allocating, prefer to take pages
  from the local CPU. If none are available take from the global list as
  done now. Proposed on tech-kern@.

Revision 1.26.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:39 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.26.2.1: +12 -25 lines
Diff to previous 1.26.2.1 (colored) to branchpoint 1.26 (colored)

sync with head

Revision 1.21.6.3 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:07 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.21.6.2: +23 -39 lines
Diff to previous 1.21.6.2 (colored) to branchpoint 1.21 (colored)

Sync with HEAD.

Revision 1.31 / (download) - annotate - [select for diffs], Thu May 29 22:33:27 2008 UTC (15 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pf42-base3
Changes since 1.30: +12 -25 lines
Diff to previous 1.30 (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.26.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:07 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.26: +8 -11 lines
Diff to previous 1.26 (colored)

sync with head.

Revision 1.28.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:24 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.28: +4 -9 lines
Diff to previous 1.28 (colored)

sync with head.

Revision 1.30 / (download) - annotate - [select for diffs], Tue May 6 18:40:57 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.29: +4 -2 lines
Diff to previous 1.29 (colored)

LOCKDEBUG: try to speed it up a bit by not using so much global state.

This will break the build briefly but will be followed by another commit
to fix that..

Revision 1.29 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:02 2008 UTC (15 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.28: +2 -9 lines
Diff to previous 1.28 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.28 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:29 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.27: +4 -4 lines
Diff to previous 1.27 (colored)

Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Apr 22 11:45:28 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.26: +4 -2 lines
Diff to previous 1.26 (colored)

Implement MP callouts as discussed on tech-kern. The CPU binding code is
disabled for the moment until we figure out what we want to do with CPUs
being offlined.

Revision 1.21.6.2 / (download) - annotate - [select for diffs], Mon Apr 14 16:23:56 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.21.6.1: +4 -3 lines
Diff to previous 1.21.6.1 (colored) to branchpoint 1.21 (colored)

- remove comments that are no longer true
- add support to devfsd(8) and devfsctl(4) to handle wedges
- add cpuctl device registration
- extract the alloc part out of device_register_name() into a common function
  that can be used by the new device_register_sync(), which is used to
  synchronously create device files

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

Move the LW_BOUND flag into the thread-private flag word. It can be tested
by other threads/CPUs but that is only done when the LWP is known to be in a
quiescent state (for example, on a run queue).

Revision 1.25 / (download) - annotate - [select for diffs], Sat Apr 12 17:02:08 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.24: +0 -4 lines
Diff to previous 1.24 (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.24 / (download) - annotate - [select for diffs], Fri Apr 11 15:31:34 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.23: +5 -3 lines
Diff to previous 1.23 (colored)

Maintain a circular queue of cpu_info's.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Apr 11 15:25:24 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.22: +4 -2 lines
Diff to previous 1.22 (colored)

Restructure the name cache code to eliminate most lock contention
resulting from forward lookups. Discussed on tech-kern@.

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

Sync with HEAD.

Revision 1.6.4.9 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:01 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.4.8: +4 -2 lines
Diff to previous 1.6.4.8 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

sync with head.

Revision 1.6.2.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:58 2008 UTC (15 years, 11 months ago) by matt
Branch: matt-armv6
Changes since 1.6.2.3: +21 -27 lines
Diff to previous 1.6.2.3 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

sync with HEAD

Revision 1.22 / (download) - annotate - [select for diffs], Sat Mar 22 18:04:42 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Changes since 1.21: +4 -2 lines
Diff to previous 1.21 (colored)

Commit the "per-CPU" select patch. This is the result of much work and
testing by rmind@ and myself.

Which approach to use is still being discussed, but I would like to get
this out of my working tree. If we decide to use a different approach
there is no problem with revisiting this.

Revision 1.6.4.8 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:55 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.4.7: +7 -4 lines
Diff to previous 1.6.4.7 (colored) to branchpoint 1.6 (colored)

sync with head.

Revision 1.12.2.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:45 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs
Changes since 1.12.2.3: +21 -27 lines
Diff to previous 1.12.2.3 (colored) next main 1.13 (colored)

Sync with HEAD.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Feb 14 14:26:57 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base
Branch point for: mjf-devfs2
Changes since 1.20: +7 -4 lines
Diff to previous 1.20 (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.6.4.7 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:09 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.4.6: +6 -5 lines
Diff to previous 1.6.4.6 (colored) to branchpoint 1.6 (colored)

sync with head.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Feb 1 20:01:06 2008 UTC (16 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.19: +6 -5 lines
Diff to previous 1.19 (colored)

Replace a KAUTH_GENERIC_ISSUSER in the cpuctl code with a proper kauth
request.

Reviewed by ad@, tested by me.

Revision 1.6.4.6 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:02 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.4.5: +26 -22 lines
Diff to previous 1.6.4.5 (colored) to branchpoint 1.6 (colored)

sync with head

Revision 1.15.4.2 / (download) - annotate - [select for diffs], Sat Jan 19 12:15:20 2008 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.15.4.1: +10 -20 lines
Diff to previous 1.15.4.1 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored)

Sync with HEAD

Revision 1.19 / (download) - annotate - [select for diffs], Tue Jan 15 14:50:07 2008 UTC (16 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.18: +6 -2 lines
Diff to previous 1.18 (colored)

Introduce optional cpu_offline_md to execute MD actions at the end of
cpu_offline. Use this on amd64/i386 to force a FPU save. As this was
triggered by npxsave_cpu/fpusave_cpu not working for a different CPU,
remove the cpu_info argument and adjust npxsave_*/fpusave_* to use bool
for the save.

OK ad@

Revision 1.18 / (download) - annotate - [select for diffs], Tue Jan 15 03:37:10 2008 UTC (16 years, 1 month ago) by rmind
Branch: MAIN
Changes since 1.17: +5 -22 lines
Diff to previous 1.17 (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.17 / (download) - annotate - [select for diffs], Mon Jan 14 12:40:03 2008 UTC (16 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.16: +5 -2 lines
Diff to previous 1.16 (colored)

add a per-cpu storage allocator.

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:00 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.6.2.2: +17 -3 lines
Diff to previous 1.6.2.2 (colored) to branchpoint 1.6 (colored)

sync with HEAD

Revision 1.15.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:55:47 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.15: +16 -2 lines
Diff to previous 1.15 (colored)

Sync with HEAD

Revision 1.12.2.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:45:56 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.12.2.2: +16 -2 lines
Diff to previous 1.12.2.2 (colored)

Sync with HEAD.

Revision 1.14.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:37 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.14.2.1: +16 -2 lines
Diff to previous 1.14.2.1 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored)

Sync with head.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Dec 22 03:26:34 2007 UTC (16 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base
Changes since 1.15: +16 -2 lines
Diff to previous 1.15 (colored)

add a function to lookup cpu_info by cpu index.

Revision 1.2.10.8 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:15 2007 UTC (16 years, 2 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.2.10.7: +3 -3 lines
Diff to previous 1.2.10.7 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Sync with HEAD.

Revision 1.12.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:26 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.12.2.1: +3 -3 lines
Diff to previous 1.12.2.1 (colored)

Sync with HEAD.

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:39 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Sync with head.

Revision 1.6.4.5 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:38 2007 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.4.4: +3 -3 lines
Diff to previous 1.6.4.4 (colored) to branchpoint 1.6 (colored)

sync with head

Revision 1.15 / (download) - annotate - [select for diffs], Wed Dec 5 07:06:52 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, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

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

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:36 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.12: +8 -2 lines
Diff to previous 1.12 (colored)

Sync with HEAD.

Revision 1.6.4.4 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:39 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.4.3: +92 -8 lines
Diff to previous 1.6.4.3 (colored) to branchpoint 1.6 (colored)

sync with head.

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:01:58 2007 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.10: +92 -8 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

Sync with HEAD

Revision 1.2.10.7 / (download) - annotate - [select for diffs], Sun Nov 11 16:47:59 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.2.10.6: +3 -2 lines
Diff to previous 1.2.10.6 (colored) to branchpoint 1.2 (colored)

Sync with HEAD.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:00 2007 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.6.2.1: +3 -2 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored)

sync with -HEAD

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

Merge from vmlocking:

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

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:31:31 2007 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.6: +128 -20 lines
Diff to previous 1.6 (colored)

sync with HEAD

Revision 1.2.10.6 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:26 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.2.10.5: +20 -6 lines
Diff to previous 1.2.10.5 (colored) to branchpoint 1.2 (colored)

Sync with HEAD.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Nov 6 00:42:41 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Changes since 1.12: +7 -2 lines
Diff to previous 1.12 (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.12 / (download) - annotate - [select for diffs], Mon Nov 5 03:36:14 2007 UTC (16 years, 4 months ago) by rmind
Branch: MAIN
Branch point for: mjf-devfs
Changes since 1.11: +15 -6 lines
Diff to previous 1.11 (colored)

cpu_xc_offline: Do not double-lock the runqueues for SCHED_4BSD, it uses a
global sched_mutex.  Fixes a hang reported by <jmcneill>.  Tested with M2
and 4BSD - seems to be working fine.

Revision 1.2.10.5 / (download) - annotate - [select for diffs], Sun Nov 4 21:03:31 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.2.10.4: +77 -8 lines
Diff to previous 1.2.10.4 (colored) to branchpoint 1.2 (colored)

Sync with HEAD.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Nov 4 11:43:07 2007 UTC (16 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.10: +77 -8 lines
Diff to previous 1.10 (colored)

- Migrate all threads when the state of CPU is changed to offline;
- Fix inverted logic with r_mcount in M2;
- setrunnable: perform sched_takecpu() when making the LWP runnable;
- setrunnable: l_mutex cannot be spc_mutex here;

This makes cpuctl(8) work with SCHED_M2.

OK by <ad>.

Revision 1.2.2.9 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:16 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.2.2.8: +7 -2 lines
Diff to previous 1.2.2.8 (colored) to branchpoint 1.2 (colored) next main 1.3 (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.6.4.3 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:21 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.4.2: +46 -21 lines
Diff to previous 1.6.4.2 (colored) to branchpoint 1.6 (colored)

sync with head.

Revision 1.2.10.4 / (download) - annotate - [select for diffs], Fri Oct 26 15:48:28 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.2.10.3: +46 -21 lines
Diff to previous 1.2.10.3 (colored) to branchpoint 1.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.2.2.8 / (download) - annotate - [select for diffs], Tue Oct 23 20:17:09 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.2.2.7: +8 -3 lines
Diff to previous 1.2.2.7 (colored) to branchpoint 1.2 (colored)

Sync with head.

Revision 1.6.6.2 / (download) - annotate - [select for diffs], Thu Oct 18 08:33:11 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.6.6.1: +8 -3 lines
Diff to previous 1.6.6.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

sync with head.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Oct 17 17:50:07 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4
Branch point for: bouyer-xenamd64
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

Fix reversed args to memset. From Iain Hibbert.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Oct 15 14:12:55 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.8: +7 -2 lines
Diff to previous 1.8 (colored)

Add _SC_NPROCESSORS_ONLN and _SC_NPROCESSORS_CONF for sysconf(). These
are extensions but are provided by many Unix systems.

Revision 1.6.6.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:38 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.6: +40 -20 lines
Diff to previous 1.6 (colored)

sync with head.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Oct 8 15:51:03 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base3, vmlocking-base
Changes since 1.7: +4 -2 lines
Diff to previous 1.7 (colored)

Add stubs that provide new soft interrupt API from the vmlocking branch.
For now these just pass through to the current softintr code.

(The naming is different to allow softint/softintr to co-exist for a while.
I'm hoping that should make it easier to transition.)

Revision 1.7 / (download) - annotate - [select for diffs], Mon Oct 8 15:12:06 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.6: +38 -20 lines
Diff to previous 1.6 (colored)

Merge file descriptor locking, cwdi locking and cross-call changes
from the vmlocking branch.

Revision 1.2.10.3 / (download) - annotate - [select for diffs], Mon Sep 3 16:48:47 2007 UTC (16 years, 6 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.2.10.2: +5 -2 lines
Diff to previous 1.2.10.2 (colored) to branchpoint 1.2 (colored)

Sync with HEAD.

Revision 1.6.4.2 / (download) - annotate - [select for diffs], Mon Sep 3 14:40:44 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6.4.1: +254 -0 lines
Diff to previous 1.6.4.1 (colored) to branchpoint 1.6 (colored)

sync with head.

Revision 1.2.6.2 / (download) - annotate - [select for diffs], Mon Sep 3 10:22:58 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.2.6.1: +5 -2 lines
Diff to previous 1.2.6.1 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Sync with HEAD.

Revision 1.2.2.7 / (download) - annotate - [select for diffs], Sat Sep 1 12:55:15 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.2.2.6: +2 -0 lines
Diff to previous 1.2.2.6 (colored) to branchpoint 1.2 (colored)

- Add a CPU layer to pool caches. In combination with vmem/kmem this
  provides CPU-local slab/object and general purpose allocators. The
  strategy used is as described in Jeff Bonwick's USENIX paper, except in
  at least one place where the described allocation strategy doesn't make
  sense. For exclusive access to the CPU layer the IPL is raised or kernel
  preemption disabled. Where the interrupt priority levels are software
  emulated this is much cheaper than taking a lock, and I think that
  writing to a local %pil register is likely to have a similar penalty to
  taking a lock.

  No tuning of the group sizes is currently done - all groups have 15
  items each, but this should be fairly easy to implement. Also, the
  reclamation mechanism should probably use a cross-call to drain the
  CPU-level caches on remote CPUs.

  Currently this causes kernel memory corruption on i386, yet works without
  a problem on amd64. The cache layer is disabled for the time being until I
  can find the bug.

- Change the pool_cache API so that the caches are themselves dynamically
  allocated, and that each cache is tied to a single pool only. Add some
  stubs to change pool_cache parameters that call directly through to the
  pool layer (e.g. pool_cache_sethiwat). The idea here is that pool_cache
  should become the default object allocator (and so LKM friendly), and
  that the pool allocator should be for kernel-internal use only. This will
  be posted to tech-kern@ for review.

Revision 1.2.2.6 / (download) - annotate - [select for diffs], Thu Aug 30 20:02:33 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.2.2.5: +5 -3 lines
Diff to previous 1.2.2.5 (colored) to branchpoint 1.2 (colored)

- Instead of xc_broadcast()/xc_unicast() waiting for completion, have them
  return a value which can later be passed to xc_wait(). Allows the caller
  to go and do other stuff in the meantime.
- Fix the xcall thread to work properly in the event of a spurious wakeup.

Revision 1.2.2.5 / (download) - annotate - [select for diffs], Sun Aug 26 12:04:47 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.2.2.4: +33 -19 lines
Diff to previous 1.2.2.4 (colored) to branchpoint 1.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.2.2.4 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:28 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.2.2.3: +200 -3 lines
Diff to previous 1.2.2.3 (colored) to branchpoint 1.2 (colored)

Sync with HEAD.

Revision 1.6.4.1, Sat Aug 18 00:21:10 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.6: +0 -254 lines
FILE REMOVED

file kern_cpu.c was added on branch yamt-lazymbuf on 2007-09-03 14:40:44 +0000

Revision 1.6 / (download) - annotate - [select for diffs], Sat Aug 18 00:21:10 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, yamt-lazymbuf, matt-armv6
Changes since 1.5: +5 -2 lines
Diff to previous 1.5 (colored)

Make the uarea cache per-CPU and drain in batches of 4.

Revision 1.2.6.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:06 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.2: +196 -3 lines
Diff to previous 1.2 (colored)

Sync with HEAD.

Revision 1.2.10.2 / (download) - annotate - [select for diffs], Thu Aug 9 02:37:18 2007 UTC (16 years, 6 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.2.10.1: +4 -2 lines
Diff to previous 1.2.10.1 (colored) to branchpoint 1.2 (colored)

Sync with HEAD.

Revision 1.5.2.2 / (download) - annotate - [select for diffs], Sun Aug 5 01:19:18 2007 UTC (16 years, 7 months ago) by rmind
Branch: matt-mips64
Changes since 1.5.2.1: +251 -0 lines
Diff to previous 1.5.2.1 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)

Improve per-CPU support for the workqueue(9):
 - Make structures CPU-cache friendly, as suggested and explained
   by Andrew Doran.  CACHE_LINE_SIZE definition is invented.
 - Use current CPU if NULL is passed to the workqueue_enqueue().
 - Implemented MI CPU index, which could be used as an index of array.
   Removed linked-lists usage for work queues.

The roundup2() function avoids division, but works only with power of 2.

Reviewed by: <ad>, <yamt>, <tech-kern>

Revision 1.5.2.1, Sun Aug 5 01:19:17 2007 UTC (16 years, 7 months ago) by rmind
Branch: matt-mips64
Changes since 1.5: +0 -251 lines
FILE REMOVED

file kern_cpu.c was added on branch matt-mips64 on 2007-08-05 01:19:18 +0000

Revision 1.5 / (download) - annotate - [select for diffs], Sun Aug 5 01:19:17 2007 UTC (16 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: matt-mips64-base
Branch point for: matt-mips64
Changes since 1.4: +4 -2 lines
Diff to previous 1.4 (colored)

Improve per-CPU support for the workqueue(9):
 - Make structures CPU-cache friendly, as suggested and explained
   by Andrew Doran.  CACHE_LINE_SIZE definition is invented.
 - Use current CPU if NULL is passed to the workqueue_enqueue().
 - Implemented MI CPU index, which could be used as an index of array.
   Removed linked-lists usage for work queues.

The roundup2() function avoids division, but works only with power of 2.

Reviewed by: <ad>, <yamt>, <tech-kern>

Revision 1.2.10.1 / (download) - annotate - [select for diffs], Sat Aug 4 12:33:14 2007 UTC (16 years, 7 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.2: +194 -3 lines
Diff to previous 1.2 (colored)

Sync with HEAD.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Aug 4 11:57:54 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.3: +6 -2 lines
Diff to previous 1.3 (colored)

A quick hack to get things building again. Don't refer to curlwp
if !MULTIPROCESSOR.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Aug 4 11:03:01 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.2: +190 -3 lines
Diff to previous 1.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.2.4.2 / (download) - annotate - [select for diffs], Wed Jul 11 20:09:44 2007 UTC (16 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.2.4.1: +58 -0 lines
Diff to previous 1.2.4.1 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Sync with head.

Revision 1.2.2.3 / (download) - annotate - [select for diffs], Sun Jun 17 21:31:20 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.2.2.2: +6 -4 lines
Diff to previous 1.2.2.2 (colored) to branchpoint 1.2 (colored)

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

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Sat Jun 9 21:37:26 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.2.2.1: +58 -0 lines
Diff to previous 1.2.2.1 (colored) to branchpoint 1.2 (colored)

Sync with head.

Revision 1.2.4.1, Thu May 17 14:51:38 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.2: +0 -58 lines
FILE REMOVED

file kern_cpu.c was added on branch mjf-ufs-trans on 2007-07-11 20:09:44 +0000

Revision 1.2.2.1, Thu May 17 14:51:38 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.2: +0 -58 lines
FILE REMOVED

file kern_cpu.c was added on branch vmlocking on 2007-06-09 21:37:26 +0000

Revision 1.2 / (download) - annotate - [select for diffs], Thu May 17 14:51:38 2007 UTC (16 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, hpcarm-cleanup
Branch point for: vmlocking, nick-csl-alignment, mjf-ufs-trans, jmcneill-pm
Changes since 1.1: +58 -0 lines
Diff to previous 1.1 (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.1.2.3 / (download) - annotate - [select for diffs], Sun May 13 17:02:58 2007 UTC (16 years, 9 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.1.2.2: +4 -2 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored) next main 1.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.1.2.2 / (download) - annotate - [select for diffs], Sat Mar 24 12:07:23 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.1.2.1: +5 -2 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

update ncpu when attaching cpus, rather than counting cpus after
calling cpu_boot_secondary_processors.
no difference at this point, but it should be more cpu-hotplug friendly.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Sat Mar 24 11:36:02 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.1: +53 -0 lines
Diff to previous 1.1 (colored)

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

Revision 1.1, Sat Mar 24 11:36:02 2007 UTC (16 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Branch point for: yamt-idlelwp
FILE REMOVED

file kern_cpu.c was initially added on branch yamt-idlelwp.

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>