The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.76 / (download) - annotate - [select for diffs], Fri Mar 1 04:32:38 2024 UTC (6 weeks, 4 days ago) by mrg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.75: +8 -2 lines
Diff to previous 1.75 (colored)

check that l_nopreempt (preemption count) doesn't change after callbacks

check that the idle loop, soft interrupt handlers, workqueue, and xcall
callbacks do not modify the preemption count, in most cases, knowing it
should be 0 currently.

this work was originally done by simonb.  cleaned up slightly and some
minor enhancement made by myself, and with discussion with riastradh@.

other callback call sites could check this as well (such as MD interrupt
handlers, or really anything that includes a callback registration.  x86
version to be commited separately.)

Revision 1.75 / (download) - annotate - [select for diffs], Fri Aug 4 12:24:36 2023 UTC (8 months, 1 week ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.74: +2 -9 lines
Diff to previous 1.74 (colored)

Revert "softint(9): Sprinkle KASSERT(!cold)."

Temporary workaround for PR kern/57563 -- to be fixed properly after
analysis.

Revision 1.74 / (download) - annotate - [select for diffs], Fri Aug 4 07:40:30 2023 UTC (8 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.73: +9 -2 lines
Diff to previous 1.73 (colored)

softint(9): Sprinkle KASSERT(!cold).

Softints are forbidden to run while cold.  So let's make sure nobody
even tries it -- if they do, they might be delayed indefinitely,
which is going to be much harder to diagnose.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Apr 9 09:18:09 2023 UTC (12 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.72: +6 -4 lines
Diff to previous 1.72 (colored)

kern: KASSERT(A && B) -> KASSERT(A); KASSERT(B)

Revision 1.72 / (download) - annotate - [select for diffs], Fri Oct 28 21:52:02 2022 UTC (17 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, 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, netbsd-10
Changes since 1.71: +47 -2 lines
Diff to previous 1.71 (colored)

softint(9): Sprinkle dtrace probes.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Sep 3 02:48:00 2022 UTC (19 months, 1 week ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.70: +3 -26 lines
Diff to previous 1.70 (colored)

Garbage-collect the remaining vestiges of netisr.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Mar 30 17:02:02 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.69: +6 -2 lines
Diff to previous 1.69 (colored)

kern: Assert softint does not net acquire kernel locks.

This redoes previous change where I mistakenly used the CPU's biglock
count, which is not necessarily stable -- the softint lwp may sleep
on a mutex, and the lwp it interrupted may start up again and release
the kernel lock, so by the time the softint lwp wakes up again and
the softint function returns, the CPU may not be holding any kernel
locks.  But the softint lwp should never hold kernel locks except
when it's in a (usually, non-MPSAFE) softint function.

Same with callout.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Mar 30 14:54:29 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.68: +2 -10 lines
Diff to previous 1.68 (colored)

Revert "kern: Sprinkle biglock-slippage assertions."

Got the diagnostic information I needed from this, and it's holding
up releng tests of everything else, so let's back this out until I
need more diagnostics or track down the original source of the
problem.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Mar 30 10:34:14 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.67: +10 -2 lines
Diff to previous 1.67 (colored)

kern: Sprinkle biglock-slippage assertions.

We seem to have a poltergeist that occasionally messes with the
biglock depth, but it's very hard to reproduce and only manifests as
some other CPU spinning out on the kernel lock which is no good for
diagnostics.

Revision 1.67 / (download) - annotate - [select for diffs], Sun Dec 5 04:56:40 2021 UTC (2 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

s/futher/further/ in comment.

Revision 1.66 / (download) - annotate - [select for diffs], Sun May 17 14:11:30 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.65: +29 -50 lines
Diff to previous 1.65 (colored)

softint_disestablish(): use a high priority xcall to determine that the
handler is no longer running.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Apr 30 20:54:27 2020 UTC (3 years, 11 months ago) by skrll
Branch: MAIN
Changes since 1.64: +6 -6 lines
Diff to previous 1.64 (colored)

Trailing whitespace

Revision 1.45.4.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:04 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.45.4.2: +1 -3 lines
Diff to previous 1.45.4.2 (colored) to branchpoint 1.45 (colored) next main 1.46 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.45.4.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:51 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.45.4.1: +73 -125 lines
Diff to previous 1.45.4.1 (colored) to branchpoint 1.45 (colored)

Merge changes from current as of 20200406

Revision 1.64 / (download) - annotate - [select for diffs], Fri Mar 27 00:13:52 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.63: +9 -8 lines
Diff to previous 1.63 (colored)

Comments

Revision 1.63 / (download) - annotate - [select for diffs], Thu Mar 26 20:19:06 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.62: +19 -79 lines
Diff to previous 1.62 (colored)

softint_overlay() (slow case) gains ~nothing but creates potential headaches.
In the interests of simplicity remove it and always use the kthreads.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Mar 8 15:05:18 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.61: +2 -5 lines
Diff to previous 1.61 (colored)

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

Revision 1.56.2.3 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:03 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.56.2.2: +26 -5 lines
Diff to previous 1.56.2.2 (colored) to branchpoint 1.56 (colored) next main 1.57 (colored)

Sync with head.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Feb 17 21:44:42 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.60: +6 -2 lines
Diff to previous 1.60 (colored)

softint_dispatch(): Temporarily call kernel_lock_plug_leak() since there is
incontinent code somewhere.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Feb 15 18:12:15 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.59: +5 -5 lines
Diff to previous 1.59 (colored)

- Move the LW_RUNNING flag back into l_pflag: updating l_flag without lock
  in softint_dispatch() is risky.  May help with the "softint screwup"
  panic.

- Correct the memory barriers around zombies switching into oblivion.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Jan 26 18:52:55 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.58: +20 -3 lines
Diff to previous 1.58 (colored)

softint_dispatch(): replace the KASSERT for LW_RUNNING with a big printf()
plus panic() that dumps lots of info.

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

Sync with head.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Jan 25 15:12:47 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2
Changes since 1.57: +9 -19 lines
Diff to previous 1.57 (colored)

softint_execute(): don't hang onto the kernel_lock hold longer than
needed.

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:35 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.56: +11 -9 lines
Diff to previous 1.56 (colored)

Sync with head.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Jan 8 17:38:42 2020 UTC (4 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base1
Changes since 1.56: +11 -9 lines
Diff to previous 1.56 (colored)

Hopefully fix some problems seen with MP support on non-x86, in particular
where curcpu() is defined as curlwp->l_cpu:

- mi_switch(): undo the ~2007ish optimisation to unlock curlwp before
  calling cpu_switchto().  It's not safe to let other actors mess with the
  LWP (in particular l->l_cpu) while it's still context switching.  This
  removes l->l_ctxswtch.

- Move the LP_RUNNING flag into l->l_flag and rename to LW_RUNNING since
  it's now covered by the LWP's lock.

- Ditch lwp_exit_switchaway() and just call mi_switch() instead.  Everything
  is in cache anyway so it wasn't buying much by trying to avoid saving old
  state.  This means cpu_switchto() will never be called with prevlwp ==
  NULL.

- Remove some KERNEL_LOCK handling which hasn't been needed for years.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Dec 16 22:47:54 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.55: +3 -7 lines
Diff to previous 1.55 (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.47.2.1 / (download) - annotate - [select for diffs], Thu Dec 12 20:43:08 2019 UTC (4 years, 4 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2
Changes since 1.47: +7 -5 lines
Diff to previous 1.47 (colored) next main 1.48 (colored)

Pull up following revision(s) (requested by ad in ticket #546):

	sys/kern/kern_resource.c: revision 1.183
	sys/kern/kern_softint.c: revision 1.49

calcru: ignore running softints, unless softint_timing is on.
Fixes crazy times reported for proc0.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Dec 6 21:36:10 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (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.54 / (download) - annotate - [select for diffs], Fri Dec 6 18:15:57 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.53: +4 -3 lines
Diff to previous 1.53 (colored)

softint_trigger (slow case): set RESCHED_IDLE too just to be consistent.
No functional change.

Revision 1.53 / (download) - annotate - [select for diffs], Tue Dec 3 05:07:48 2019 UTC (4 years, 4 months ago) by riastradh
Branch: MAIN
Changes since 1.52: +2 -6 lines
Diff to previous 1.52 (colored)

Rip out pserialize(9) logic now that the RCU patent has expired.

pserialize_perform() is now basically just xc_barrier(XC_HIGHPRI).
No more tentacles throughout the scheduler.  Simplify the psz read
count for diagnostic assertions by putting it unconditionally into
cpu_info.

From rmind@, tidied up by me.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Dec 1 15:34:46 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (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.51 / (download) - annotate - [select for diffs], Mon Nov 25 17:24:59 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.50: +5 -5 lines
Diff to previous 1.50 (colored)

port-sparc/54718 (sparc install hangs since recent scheduler changes)

Revision 1.50 / (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.49: +10 -9 lines
Diff to previous 1.49 (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.49 / (download) - annotate - [select for diffs], Thu Nov 21 17:50:49 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.48: +7 -5 lines
Diff to previous 1.48 (colored)

calcru: ignore running softints, unless softint_timing is on.
Fixes crazy times reported for proc0.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Oct 6 15:11:17 2019 UTC (4 years, 6 months ago) by uwe
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.47: +3 -5 lines
Diff to previous 1.47 (colored)

xc_barrier - convenience function to xc_broadcast() a nop.

Make the intent more clear and also avoid a bunch of (xcfunc_t)nullop
casts that gcc 8 -Wcast-function-type is not happy about.

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

Sync with HEAD

Revision 1.47 / (download) - annotate - [select for diffs], Fri May 17 03:34:26 2019 UTC (4 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RC1
Branch point for: netbsd-9
Changes since 1.46: +4 -2 lines
Diff to previous 1.46 (colored)

Implement an aggressive psref leak detector

It is yet another psref leak detector that enables to tell where a leak occurs
while a simpler version that is already committed just tells an occurrence of a
leak.

Investigating of psref leaks is hard because once a leak occurs a percpu list of
psref that tracks references can be corrupted.  A reference to a tracking object
is memorized in the list via an intermediate object (struct psref) that is
normally allocated on a stack of a thread.  Thus, the intermediate object can be
overwritten on a leak resulting in corruption of the list.

The tracker makes a shadow entry to an intermediate object and stores some hints
into it (currently it's a caller address of psref_acquire).  We can detect a
leak by checking the entries on certain points where any references should be
released such as the return point of syscalls and the end of each softint
handler.

The feature is expensive and enabled only if the kernel is built with
PSREF_DEBUG.

Proposed on tech-kern

Revision 1.46 / (download) - annotate - [select for diffs], Fri Apr 19 01:52:55 2019 UTC (4 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.45: +5 -2 lines
Diff to previous 1.45 (colored)

Implement a simple psref leak detector

It detects leaks by counting up the number of held psref by an LWP and checking
its zeroness at the end of syscalls and softint handlers.  For the counter, a
unused field of struct lwp is reused.

The detector runs only if DIAGNOSTIC is turned on.

Revision 1.43.10.2 / (download) - annotate - [select for diffs], Mon Jan 22 12:30:20 2018 UTC (6 years, 2 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.43.10.1: +7 -4 lines
Diff to previous 1.43.10.1 (colored) to branchpoint 1.43 (colored) next main 1.44 (colored)

Pull up following revision(s) (requested by jdolecek in ticket #506):
	sys/kern/kern_softint.c: revision 1.45
	sys/rump/librump/rumpkern/rump.c: revision 1.331
	sys/kern/subr_pserialize.c: revision 1.10
	sys/kern/subr_psref.c: revision 1.10
Prevent panic or hangup in softint_disestablish(), pserialize_perform() or
psref_target_destroy() while mp_online == false.
 See http://mail-index.netbsd.org/tech-kern/2017/12/25/msg022829.html
Set mp_online = true. This change might fix PR#52886.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Dec 28 03:39:48 2017 UTC (6 years, 3 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat
Branch point for: phil-wifi
Changes since 1.44: +7 -4 lines
Diff to previous 1.44 (colored)

 Prevent panic or hangup in softint_disestablish(), pserialize_perform() or
psref_target_destroy() while mp_online == false.

 See http://mail-index.netbsd.org/tech-kern/2017/12/25/msg022829.html

Revision 1.38.12.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:44 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.38.12.2: +1 -1 lines
Diff to previous 1.38.12.2 (colored) to branchpoint 1.38 (colored) next main 1.39 (colored)

update from HEAD

Revision 1.43.10.1 / (download) - annotate - [select for diffs], Thu Nov 23 13:40:22 2017 UTC (6 years, 4 months ago) by martin
Branch: netbsd-8
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #387):
	sys/kern/kern_softint.c: revision 1.44
 Increase the size of softint's data to prevent panic on big machine. Nowadays,
some device drivers and some pseudo interfaces allocate a lot of softints. The
resource size for softints are static and it panics when it execeed the limit.
It can be dynamically resized. Untill dynamically resizing is implemented,
increase softint_bytes from 8192 to 32768.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Nov 22 02:20:21 2017 UTC (6 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

 Increase the size of softint's data to prevent panic on big machine. Nowadays,
some device drivers and some pseudo interfaces allocate a lot of softints. The
resource size for softints are static and it panics when it execeed the limit.
It can be dynamically resized. Untill dynamically resizing is implemented,
increase softint_bytes from 8192 to 32768.

Revision 1.38.8.2 / (download) - annotate - [select for diffs], Thu Jul 14 06:56:03 2016 UTC (7 years, 9 months ago) by snj
Branch: netbsd-6
Changes since 1.38.8.1: +4 -4 lines
Diff to previous 1.38.8.1 (colored) to branchpoint 1.38 (colored) next main 1.39 (colored)

Pull up following revision(s) (requested by knakahara in ticket #1356):
	sys/kern/kern_softint.c: revision 1.42
fix the following softint parallel operation problem.
(0) softint handler "handler A" is established
(1) CPU#X does softint_schedule() for "handler A"
    - the softhand_t is set SOFTINT_PENDING flag
    - the softhand_t is NOT set SOFTINT_ACTIVE flag yet
(2) CPU#X begins other H/W interrupt processing
(3) CPU#Y does softint_disestablish() for "handler A"
    - waits until softhand_t's SOFTINT_ACTIVE of all CPUs is clear
    - the softhand_t is set not SOFTINT_ACTIVE but SOFTINT_PENDING,
      so CPU#Y does not wait
    - unset the function of "handler A"
(4) CPU#X does softint_execute()
    - the function of "handler A" is already clear, so panic

Revision 1.38.8.1.2.1 / (download) - annotate - [select for diffs], Thu Jul 14 06:44:50 2016 UTC (7 years, 9 months ago) by snj
Branch: netbsd-6-1
Changes since 1.38.8.1: +4 -4 lines
Diff to previous 1.38.8.1 (colored) next main 1.38.8.2 (colored)

Pull up following revision(s) (requested by knakahara in ticket #1356):
	sys/kern/kern_softint.c: revision 1.42
fix the following softint parallel operation problem.
(0) softint handler "handler A" is established
(1) CPU#X does softint_schedule() for "handler A"
    - the softhand_t is set SOFTINT_PENDING flag
    - the softhand_t is NOT set SOFTINT_ACTIVE flag yet
(2) CPU#X begins other H/W interrupt processing
(3) CPU#Y does softint_disestablish() for "handler A"
    - waits until softhand_t's SOFTINT_ACTIVE of all CPUs is clear
    - the softhand_t is set not SOFTINT_ACTIVE but SOFTINT_PENDING,
      so CPU#Y does not wait
    - unset the function of "handler A"
(4) CPU#X does softint_execute()
    - the function of "handler A" is already clear, so panic

Revision 1.38.14.2 / (download) - annotate - [select for diffs], Thu Jul 14 06:43:35 2016 UTC (7 years, 9 months ago) by snj
Branch: netbsd-6-0
Changes since 1.38.14.1: +4 -4 lines
Diff to previous 1.38.14.1 (colored) to branchpoint 1.38 (colored) next main 1.39 (colored)

Pull up following revision(s) (requested by knakahara in ticket #1356):
	sys/kern/kern_softint.c: revision 1.42
fix the following softint parallel operation problem.
(0) softint handler "handler A" is established
(1) CPU#X does softint_schedule() for "handler A"
    - the softhand_t is set SOFTINT_PENDING flag
    - the softhand_t is NOT set SOFTINT_ACTIVE flag yet
(2) CPU#X begins other H/W interrupt processing
(3) CPU#Y does softint_disestablish() for "handler A"
    - waits until softhand_t's SOFTINT_ACTIVE of all CPUs is clear
    - the softhand_t is set not SOFTINT_ACTIVE but SOFTINT_PENDING,
      so CPU#Y does not wait
    - unset the function of "handler A"
(4) CPU#X does softint_execute()
    - the function of "handler A" is already clear, so panic

Revision 1.41.4.2 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:20 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.41.4.1: +4 -4 lines
Diff to previous 1.41.4.1 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

Sync with HEAD

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jul 4 04:20:14 2016 UTC (7 years, 9 months ago) by knakahara
Branch: MAIN
CVS Tags: 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, 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-8-base, 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: netbsd-8
Changes since 1.42: +4 -4 lines
Diff to previous 1.42 (colored)

revert kern_softint.c:r1.42 (which was incorrect fix)

gif(4) has violated softint(9) contract. That is fixed by previous 2 commits.
see:
    https://mail-index.netbsd.org/tech-kern/2016/01/12/msg019993.html

Revision 1.41.6.1 / (download) - annotate - [select for diffs], Tue Jan 26 04:50:37 2016 UTC (8 years, 2 months ago) by riz
Branch: netbsd-7-0
CVS Tags: netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Changes since 1.41: +4 -4 lines
Diff to previous 1.41 (colored) next main 1.42 (colored)

Pull up following revision(s) (requested by knakahara in ticket #1067):
	sys/kern/kern_softint.c: revision 1.42
fix the following softint parallel operation problem.
(0) softint handler "handler A" is established
(1) CPU#X does softint_schedule() for "handler A"
- the softhand_t is set SOFTINT_PENDING flag
- the softhand_t is NOT set SOFTINT_ACTIVE flag yet
(2) CPU#X begins other H/W interrupt processing
(3) CPU#Y does softint_disestablish() for "handler A"
- waits until softhand_t's SOFTINT_ACTIVE of all CPUs is clear
- the softhand_t is set not SOFTINT_ACTIVE but SOFTINT_PENDING,
so CPU#Y does not wait
- unset the function of "handler A"
(4) CPU#X does softint_execute()
- the function of "handler A" is already clear, so panic

Revision 1.41.2.1 / (download) - annotate - [select for diffs], Tue Jan 26 04:50:22 2016 UTC (8 years, 2 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.41: +4 -4 lines
Diff to previous 1.41 (colored) next main 1.42 (colored)

Pull up following revision(s) (requested by knakahara in ticket #1067):
	sys/kern/kern_softint.c: revision 1.42
fix the following softint parallel operation problem.
(0) softint handler "handler A" is established
(1) CPU#X does softint_schedule() for "handler A"
- the softhand_t is set SOFTINT_PENDING flag
- the softhand_t is NOT set SOFTINT_ACTIVE flag yet
(2) CPU#X begins other H/W interrupt processing
(3) CPU#Y does softint_disestablish() for "handler A"
- waits until softhand_t's SOFTINT_ACTIVE of all CPUs is clear
- the softhand_t is set not SOFTINT_ACTIVE but SOFTINT_PENDING,
so CPU#Y does not wait
- unset the function of "handler A"
(4) CPU#X does softint_execute()
- the function of "handler A" is already clear, so panic

Revision 1.41.4.1 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:05 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.41: +4 -4 lines
Diff to previous 1.41 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.42 / (download) - annotate - [select for diffs], Thu Dec 24 02:27:14 2015 UTC (8 years, 3 months ago) by knakahara
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.41: +4 -4 lines
Diff to previous 1.41 (colored)

fix the following softint parallel operation problem.

(0) softint handler "handler A" is established
(1) CPU#X does softint_schedule() for "handler A"
    - the softhand_t is set SOFTINT_PENDING flag
    - the softhand_t is NOT set SOFTINT_ACTIVE flag yet
(2) CPU#X begins other H/W interrupt processing
(3) CPU#Y does softint_disestablish() for "handler A"
    - waits until softhand_t's SOFTINT_ACTIVE of all CPUs is clear
    - the softhand_t is set not SOFTINT_ACTIVE but SOFTINT_PENDING,
      so CPU#Y does not wait
    - unset the function of "handler A"
(4) CPU#X does softint_execute()
    - the function of "handler A" is already clear, so panic

Revision 1.38.12.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.38.12.1: +59 -13 lines
Diff to previous 1.38.12.1 (colored) to branchpoint 1.38 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.40.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:55:58 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.40: +55 -11 lines
Diff to previous 1.40 (colored) next main 1.41 (colored)

Rebase.

Revision 1.41 / (download) - annotate - [select for diffs], Sun May 25 15:42:01 2014 UTC (9 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1
Branch point for: nick-nhusb, netbsd-7-0, netbsd-7
Changes since 1.40: +55 -11 lines
Diff to previous 1.40 (colored)

softint: implement softint_schedule_cpu() to trigger software interrupts
on the remote CPUs and add SOFTINT_RCPU flag to indicate whether this is
going to be used; implemented using asynchronous IPIs.

Revision 1.38.2.2 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.38.2.1: +6 -4 lines
Diff to previous 1.38.2.1 (colored) to branchpoint 1.38 (colored) next main 1.39 (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.39.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:07 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.39: +6 -4 lines
Diff to previous 1.39 (colored) next main 1.40 (colored)

sync with head

Revision 1.40 / (download) - annotate - [select for diffs], Sat Sep 7 03:34:59 2013 UTC (10 years, 7 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.39: +6 -4 lines
Diff to previous 1.39 (colored)

Change two KASSERTs to KASSERTMSG

Revision 1.38.12.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:52 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.38: +6 -2 lines
Diff to previous 1.38 (colored)

resync with head

Revision 1.38.8.1 / (download) - annotate - [select for diffs], Fri Feb 8 19:32:07 2013 UTC (11 years, 2 months ago) by riz
Branch: netbsd-6
CVS Tags: 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
Branch point for: netbsd-6-1
Changes since 1.38: +6 -2 lines
Diff to previous 1.38 (colored)

Pull up following revision(s) (requested by rmind in ticket #782):
	sys/rump/include/machine/intr.h: revision 1.19
	sys/kern/subr_pserialize.c: revision 1.6
	sys/kern/kern_softint.c: revision 1.39
- softint_dispatch: perform pserialize(9) switchpoint when softintr processing
  finishes (without blocking).  Problem reported by hannken@, thanks!
- pserialize_read_enter: use splsoftserial(), not splsoftclock().
- pserialize_perform: add xcall(9) barrier as interrupts may be coalesced.
Provide splsoftserial.
GRRR RUMP

Revision 1.38.14.1 / (download) - annotate - [select for diffs], Fri Feb 8 19:31:19 2013 UTC (11 years, 2 months ago) by riz
Branch: netbsd-6-0
CVS Tags: 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
Changes since 1.38: +6 -2 lines
Diff to previous 1.38 (colored)

Pull up following revision(s) (requested by rmind in ticket #782):
	sys/rump/include/machine/intr.h: revision 1.19
	sys/kern/subr_pserialize.c: revision 1.6
	sys/kern/kern_softint.c: revision 1.39
- softint_dispatch: perform pserialize(9) switchpoint when softintr processing
  finishes (without blocking).  Problem reported by hannken@, thanks!
- pserialize_read_enter: use splsoftserial(), not splsoftclock().
- pserialize_perform: add xcall(9) barrier as interrupts may be coalesced.
Provide splsoftserial.
GRRR RUMP

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:21 2013 UTC (11 years, 2 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.38: +6 -2 lines
Diff to previous 1.38 (colored)

sync with head

Revision 1.39 / (download) - annotate - [select for diffs], Mon Jan 7 23:21:31 2013 UTC (11 years, 3 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base8, 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.38: +6 -2 lines
Diff to previous 1.38 (colored)

- softint_dispatch: perform pserialize(9) switchpoint when softintr processing
  finishes (without blocking).  Problem reported by hannken@, thanks!
- pserialize_read_enter: use splsoftserial(), not splsoftclock().
- pserialize_perform: add xcall(9) barrier as interrupts may be coalesced.

Revision 1.38 / (download) - annotate - [select for diffs], Tue Sep 27 01:02:38 2011 UTC (12 years, 6 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, tls-maxphys, netbsd-6-0, netbsd-6
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored)

Modify *ASSERTMSG() so they are now used as variadic macros. The main goal
is to provide routines that do as KASSERT(9) says: append a message
to the panic format string when the assertion triggers, with optional
arguments.

Fix call sites to reflect the new definition.

Discussed on tech-kern@. See
http://mail-index.netbsd.org/tech-kern/2011/09/07/msg011427.html

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jul 31 13:41:30 2011 UTC (12 years, 8 months ago) by uebayasi
Branch: MAIN
Changes since 1.36: +4 -2 lines
Diff to previous 1.36 (colored)

Revert previous; s/kmem(9)/uvm_km(9)/ and comment why done so.  Per request
from rmind@.

Revision 1.36 / (download) - annotate - [select for diffs], Sat Jul 30 05:24:16 2011 UTC (12 years, 8 months ago) by uebayasi
Branch: MAIN
Changes since 1.35: +4 -4 lines
Diff to previous 1.35 (colored)

Use kmem(9) to allocate per-cpu softint context.  No functional changes.

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:31 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.33: +7 -3 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

Sync with HEAD.

Revision 1.31.4.3 / (download) - annotate - [select for diffs], Tue May 31 03:05:02 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.31.4.2: +0 -1 lines
Diff to previous 1.31.4.2 (colored) to branchpoint 1.31 (colored) next main 1.32 (colored)

sync with head

Revision 1.35 / (download) - annotate - [select for diffs], Sun Apr 24 18:46:22 2011 UTC (12 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.34: +2 -3 lines
Diff to previous 1.34 (colored)

- Replace few malloc(9) uses with kmem(9).
- Rename buf_malloc() to buf_alloc(), fix comments.
- Remove some unnecessary inclusions.

Revision 1.31.4.2 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:08 2011 UTC (12 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.31.4.1: +5 -0 lines
Diff to previous 1.31.4.1 (colored) to branchpoint 1.31 (colored)

sync with head

Revision 1.34 / (download) - annotate - [select for diffs], Mon Apr 11 19:13:54 2011 UTC (13 years ago) by rmind
Branch: MAIN
Changes since 1.33: +7 -2 lines
Diff to previous 1.33 (colored)

softint_execute: add assert which could catch locking bugs in softint handlers.

Revision 1.31.4.1 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:16 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.31: +7 -5 lines
Diff to previous 1.31 (colored)

sync with head

Revision 1.33 / (download) - annotate - [select for diffs], Mon Dec 20 00:25:46 2010 UTC (13 years, 3 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.32: +3 -3 lines
Diff to previous 1.32 (colored)

Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits.  Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Dec 11 22:32:13 2010 UTC (13 years, 4 months ago) by matt
Branch: MAIN
Changes since 1.31: +6 -4 lines
Diff to previous 1.31 (colored)

Make sure all for loops use { }

Revision 1.23.4.2.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:28:17 2010 UTC (13 years, 11 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.23.4.2: +8 -3 lines
Diff to previous 1.23.4.2 (colored) next main 1.23.4.3 (colored)

sync to netbsd-5

Revision 1.16.2.6 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:17 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.16.2.5: +16 -7 lines
Diff to previous 1.16.2.5 (colored) to branchpoint 1.16 (colored) next main 1.17 (colored)

sync with head

Revision 1.23.4.3 / (download) - annotate - [select for diffs], Sat Jan 16 17:41:14 2010 UTC (14 years, 3 months ago) by bouyer
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.23.4.2: +8 -3 lines
Diff to previous 1.23.4.2 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored)

Pull up following revision(s) (requested by rmind in ticket #1241):
	sys/kern/kern_softint.c: revision 1.30
softint_execute: release/re-acquire kernel-lock depending on SOFTINT_MPSAFE
flag.  Keeping it held for MP-safe cases break the lock order assumptions.
Per discussion with <martin>.

Revision 1.23.4.2.2.1 / (download) - annotate - [select for diffs], Sat Jan 16 17:41:07 2010 UTC (14 years, 3 months ago) by bouyer
Branch: netbsd-5-0
CVS Tags: netbsd-5-0-2-RELEASE
Changes since 1.23.4.2: +8 -3 lines
Diff to previous 1.23.4.2 (colored) next main 1.23.4.3 (colored)

Pull up following revision(s) (requested by rmind in ticket #1241):
	sys/kern/kern_softint.c: revision 1.30
softint_execute: release/re-acquire kernel-lock depending on SOFTINT_MPSAFE
flag.  Keeping it held for MP-safe cases break the lock order assumptions.
Per discussion with <martin>.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Jan 9 19:02:17 2010 UTC (14 years, 3 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip
Branch point for: rmind-uvmplock
Changes since 1.30: +10 -6 lines
Diff to previous 1.30 (colored)

softint_overlay: disable kernel preemption before curlwp->l_cpu use.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jan 8 12:10:46 2010 UTC (14 years, 3 months ago) by rmind
Branch: MAIN
Changes since 1.29: +8 -3 lines
Diff to previous 1.29 (colored)

softint_execute: release/re-acquire kernel-lock depending on SOFTINT_MPSAFE
flag.  Keeping it held for MP-safe cases break the lock order assumptions.
Per discussion with <martin>.

Revision 1.16.2.5 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:16 2009 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.16.2.4: +3 -2 lines
Diff to previous 1.16.2.4 (colored) to branchpoint 1.16 (colored)

sync with head.

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:34 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.25.2.1: +4 -3 lines
Diff to previous 1.25.2.1 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored)

Sync with HEAD.

Revision 1.29 / (download) - annotate - [select for diffs], Sun Jul 19 10:11:55 2009 UTC (14 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

set LP_RUNNING when starting lwp0 and idle lwps.
add assertions.

Revision 1.16.2.4 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:31 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.16.2.3: +3 -3 lines
Diff to previous 1.16.2.3 (colored) to branchpoint 1.16 (colored)

sync with head

Revision 1.28 / (download) - annotate - [select for diffs], Mon May 18 21:31:27 2009 UTC (14 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5
Changes since 1.27: +1 -1 lines
Diff to previous 1.27 (colored)

Back out rev 1.27 now that MD implementations of spl*() have been fixed
to be a memory barrier.

Revision 1.16.2.3 / (download) - annotate - [select for diffs], Sat May 16 10:41:48 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.16.2.2: +3 -3 lines
Diff to previous 1.16.2.2 (colored) to branchpoint 1.16 (colored)

sync with head

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:56 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.25: +4 -4 lines
Diff to previous 1.25 (colored)

Sync with HEAD.

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

Revision 1.27 / (download) - annotate - [select for diffs], Tue May 5 20:26:36 2009 UTC (14 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, jym-xensuspend-base
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

Declare sh_flags volatile.
Without it, on ports where splhigh() is inline, the compiler will optimise
the second SOFTINT_PENDING test in softint_schedule(). A dissasembly
of softint_schedule() with and without the volatile sh_flags confirm this
on sparc.
Because of this there is a race that could lead to the softhand_t
being enqueued twice on si_q, leading to a corrupted queue and
some handler being SOFTINT_PENDING but never called.

Should fix PR kern/38637

Revision 1.16.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:47 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.16.2.1: +53 -19 lines
Diff to previous 1.16.2.1 (colored) to branchpoint 1.16 (colored)

sync with head.

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

Sync with HEAD.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Apr 6 21:22:47 2009 UTC (15 years ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Fix spelling.

Revision 1.23.4.2 / (download) - annotate - [select for diffs], Mon Feb 2 03:40:11 2009 UTC (15 years, 2 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: netbsd-5-0, matt-nb5-mips64
Changes since 1.23.4.1: +3 -3 lines
Diff to previous 1.23.4.1 (colored) to branchpoint 1.23 (colored)

Pull up following revision(s) (requested by ad in ticket #349):
	sys/kern/kern_softint.c: revision 1.25
softint_disestablish: don't pass softint_lock to kpause, it's not held.

Revision 1.23.4.1 / (download) - annotate - [select for diffs], Mon Feb 2 03:39:18 2009 UTC (15 years, 2 months ago) by snj
Branch: netbsd-5
Changes since 1.23: +47 -13 lines
Diff to previous 1.23 (colored)

Pull up following revision(s) (requested by ad in ticket #349):
	sys/kern/kern_softint.c: revision 1.24
	sys/sys/intr.h: revision 1.8
softint_disestablish: the soft interrupt could still be running on a CPU
somewhere in the system. If it is, wait for it to complete before tearing
it down. The caller commits to not trigger the interrupt again once
disestablish is set in motion.

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:38 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.23: +47 -13 lines
Diff to previous 1.23 (colored)

Sync with HEAD.

Revision 1.11.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:19 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.11.6.2: +46 -12 lines
Diff to previous 1.11.6.2 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

Sync with HEAD.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Jan 1 12:26:46 2009 UTC (15 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

softint_disestablish: don't pass softint_lock to kpause, it's not held.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Dec 13 21:13:30 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.23: +47 -13 lines
Diff to previous 1.23 (colored)

softint_disestablish: the soft interrupt could still be running on a CPU
somewhere in the system. If it is, wait for it to complete before tearing
it down. The caller commits to not trigger the interrupt again once
disestablish is set in motion.

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

Sync with HEAD.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Oct 14 17:15:20 2008 UTC (15 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

Give maximum level of network softinterrupts a symbolic constant
(which happened to get bumbed from 32 to 33 (AF_MAX) now).

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

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

Revision 1.15.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:39 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.15.2.1: +7 -7 lines
Diff to previous 1.15.2.1 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored)

sync with head

Revision 1.11.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:09 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.11.6.1: +21 -21 lines
Diff to previous 1.11.6.1 (colored) to branchpoint 1.11 (colored)

Sync with HEAD.

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

PR kern/38812 race between lwp_exit_switchaway and exit1/coredump

Move the LWP RUNNING and TIMEINTR flags into the thread-private flag word.

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

Move lwp_exit_switchaway() into kern_synch.c. Instead of always switching
to the idle loop, pick a new LWP from the run queue.

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

sync with head.

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

sync with head.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Apr 28 23:00:22 2008 UTC (15 years, 11 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.19: +4 -4 lines
Diff to previous 1.19 (colored)

Don't count many items as EVCNT_TYPE_INTR because they clutter up the
systat vmstat display.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Apr 28 21:17:16 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.18: +4 -6 lines
Diff to previous 1.18 (colored)

Make the preemption switch a __HAVE instead of an option.

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

Remove clause 3 and 4 from TNF licenses

Revision 1.17 / (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.16: +10 -2 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Thu Apr 24 11:38:36 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.15: +4 -4 lines
Diff to previous 1.15 (colored)

Merge the socket locking patch:

- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Apr 12 18:22:03 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Fix typo. Spotted by kardel@.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Apr 12 17:17:28 2008 UTC (16 years ago) by ad
Branch: MAIN
Changes since 1.13: +8 -7 lines
Diff to previous 1.13 (colored)

softint_overlay: bind the stolen LWP to the current CPU while processing,
to prevent it blocking and migrating to another CPU.

Revision 1.11.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:02 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.11: +8 -5 lines
Diff to previous 1.11 (colored)

Sync with HEAD.

Revision 1.3.4.9 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:02 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3.4.8: +5 -2 lines
Diff to previous 1.3.4.8 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

sync with head.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:13 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.11: +10 -7 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

sync with head.

Revision 1.4.2.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:59 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.4.2.3: +15 -13 lines
Diff to previous 1.4.2.3 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

sync with HEAD

Revision 1.13 / (download) - annotate - [select for diffs], Thu Mar 20 19:12:23 2008 UTC (16 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.12: +5 -2 lines
Diff to previous 1.12 (colored)

softint_execute: add more assertions.

Revision 1.3.4.8 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:33 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3.4.7: +7 -7 lines
Diff to previous 1.3.4.7 (colored) to branchpoint 1.3 (colored)

sync with head.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Mar 10 22:20:14 2008 UTC (16 years, 1 month ago) by martin
Branch: MAIN
Changes since 1.11: +7 -7 lines
Diff to previous 1.11 (colored)

Use cpu index instead of the machine dependend, not very expressive
cpuid when naming user-visible kernel entities.

Revision 1.3.6.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:46 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.3.6.3: +7 -8 lines
Diff to previous 1.3.6.3 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Sync with HEAD.

Revision 1.3.4.7 / (download) - annotate - [select for diffs], Mon Feb 11 14:59:58 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3.4.6: +4 -4 lines
Diff to previous 1.3.4.6 (colored) to branchpoint 1.3 (colored)

sync with head.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Feb 6 15:34:36 2008 UTC (16 years, 2 months ago) by yamt
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.10: +4 -4 lines
Diff to previous 1.10 (colored)

softint_dispatch: fix softint_timing.

Revision 1.3.4.6 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:15 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3.4.5: +5 -6 lines
Diff to previous 1.3.4.5 (colored) to branchpoint 1.3 (colored)

sync with head.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jan 29 18:06:14 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.9: +5 -6 lines
Diff to previous 1.9 (colored)

Remove reference to lockmgr().

Revision 1.3.4.5 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:12 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3.4.4: +15 -7 lines
Diff to previous 1.3.4.4 (colored) to branchpoint 1.3 (colored)

sync with head

Revision 1.4.2.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:09 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.4.2.2: +664 -38 lines
Diff to previous 1.4.2.2 (colored) to branchpoint 1.4 (colored)

sync with HEAD

Revision 1.6.6.2 / (download) - annotate - [select for diffs], Wed Jan 2 21:55:58 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.6.6.1: +3 -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.3.6.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:01 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.3.6.2: +15 -7 lines
Diff to previous 1.3.6.2 (colored) to branchpoint 1.3 (colored)

Sync with HEAD.

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Wed Dec 26 19:57:09 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.6: +15 -7 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

Sync with head.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Dec 22 01:14:54 2007 UTC (16 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.8: +5 -5 lines
Diff to previous 1.8 (colored)

use binuptime for l_stime/l_rtime.

Revision 1.6.6.1 / (download) - annotate - [select for diffs], Thu Dec 13 21:56:54 2007 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.6: +12 -4 lines
Diff to previous 1.6 (colored)

Sync with HEAD

Revision 1.6.4.2 / (download) - annotate - [select for diffs], Thu Dec 13 05:06:00 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-kmem
Changes since 1.6.4.1: +3 -3 lines
Diff to previous 1.6.4.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

sync with head.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Dec 11 19:07:28 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, cube-autoconf-base, cube-autoconf
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Change the ncpu test to work when a pool_cache or softint is initialized
between mi_cpu_attach() and attachment of the boot CPU. Suggested by mrg@.

Revision 1.6.4.1 / (download) - annotate - [select for diffs], Tue Dec 11 15:44:12 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-kmem
Changes since 1.6: +12 -4 lines
Diff to previous 1.6 (colored)

sync with head.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Dec 10 20:43:43 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base2
Changes since 1.6: +12 -4 lines
Diff to previous 1.6 (colored)

softint_establish: hack around CPU_INFO_FOREACH() not working before
configure() on some architectures.

Revision 1.1.6.3 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:20 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.1.6.2: +656 -38 lines
Diff to previous 1.1.6.2 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Sync with HEAD.

Revision 1.3.6.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:32 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.3.6.1: +656 -38 lines
Diff to previous 1.3.6.1 (colored) to branchpoint 1.3 (colored)

Sync with HEAD.

Revision 1.3.4.4 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:49 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3.4.3: +656 -38 lines
Diff to previous 1.3.4.3 (colored) to branchpoint 1.3 (colored)

sync with head

Revision 1.6 / (download) - annotate - [select for diffs], Mon Dec 3 17:15:00 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base
Branch point for: yamt-kmem, vmlocking2, bouyer-xeni386
Changes since 1.5: +8 -18 lines
Diff to previous 1.5 (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.5 / (download) - annotate - [select for diffs], Mon Dec 3 15:34:33 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.4: +658 -30 lines
Diff to previous 1.4 (colored)

Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.

Revision 1.3.6.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:42 2007 UTC (16 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.3: +43 -2 lines
Diff to previous 1.3 (colored)

Sync with HEAD.

Revision 1.3.4.3 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:44 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3.4.2: +43 -2 lines
Diff to previous 1.3.4.2 (colored) to branchpoint 1.3 (colored)

sync with head.

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:11 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.3: +43 -2 lines
Diff to previous 1.3 (colored) next main 1.4 (colored)

Sync with HEAD

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Tue Nov 6 23:31:58 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.4.2.1: +175 -0 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored)

sync with HEAD

Revision 1.1.6.2 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:31 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.1.6.1: +43 -2 lines
Diff to previous 1.1.6.1 (colored) to branchpoint 1.1 (colored)

Sync with HEAD.

Revision 1.4.2.1, Tue Nov 6 00:42:42 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
Changes since 1.4: +0 -175 lines
FILE REMOVED

file kern_softint.c was added on branch matt-armv6 on 2007-11-06 23:31:58 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Tue Nov 6 00:42:42 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: matt-armv6
Changes since 1.3: +43 -2 lines
Diff to previous 1.3 (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.1.2.21 / (download) - annotate - [select for diffs], Mon Nov 5 15:01:03 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.20: +6 -6 lines
Diff to previous 1.1.2.20 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Eliminate ref to safepri.

Revision 1.1.2.20 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:20 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.19: +3 -10 lines
Diff to previous 1.1.2.19 (colored) to branchpoint 1.1 (colored)

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

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

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

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

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

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

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

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

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

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

- newlwp -> lwp_create

Revision 1.1.2.19 / (download) - annotate - [select for diffs], Tue Oct 30 15:32:52 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.18: +2 -3 lines
Diff to previous 1.1.2.18 (colored) to branchpoint 1.1 (colored)

cpu_netisrs is no more.

Revision 1.3.4.2 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:28 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3.4.1: +134 -0 lines
Diff to previous 1.3.4.1 (colored) to branchpoint 1.3 (colored)

sync with head.

Revision 1.1.6.1 / (download) - annotate - [select for diffs], Fri Oct 26 15:48:35 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.1: +134 -0 lines
Diff to previous 1.1 (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.1.2.18 / (download) - annotate - [select for diffs], Thu Oct 18 15:47:00 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.17: +163 -79 lines
Diff to previous 1.1.2.17 (colored) to branchpoint 1.1 (colored)

Soft interrupt changes. This speeds up the slow mechanism quite a bit and
removes the requirement that IPL_SCHED == IPL_HIGH. On a DECstation 3100
using the slow mechanism, FTP transfers are about 7% slower than HEAD on
the few simple tests that I have done.

- Instead of using the run queues to schedule soft interrupts, poll for soft
  interrupt activity in mi_switch(). If there is a soft interrupt to run, we
  pick a new soft interrupt LWP to run in preference to checking the run
  queues.

- If a soft interrupt occurs while the CPU is running in userspace, hijack
  the user LWP in userret() to run the soft interrupt, thus avoiding context
  switches. This is OK to do, since in userret() the LWP can hold no locks.
  Soft interrupts will very rarely block in this configuration, and any
  blocking activity will be short term, so the user process will ~never be
  delayed by much. The downside to this approach is that it prevents the
  architecture from doing anything useful with real-time LWPs or kernel
  preemption, but that is not a problem is the fast path is implemented.

- Steal an idea from powerpc, and use DONETISR to set up multiple soft
  interrupt handlers for the legacy netisrs. Now schednetisr() just does
  softint_schedule() on the relevant handle.

Revision 1.1.8.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:43 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.1: +134 -0 lines
Diff to previous 1.1 (colored) next main 1.2 (colored)

sync with head.

Revision 1.1.2.17 / (download) - annotate - [select for diffs], Tue Oct 9 15:22:20 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.16: +2 -136 lines
Diff to previous 1.1.2.16 (colored) to branchpoint 1.1 (colored)

Sync with head.

Revision 1.1.2.16 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:28 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.15: +136 -2 lines
Diff to previous 1.1.2.15 (colored) to branchpoint 1.1 (colored)

Sync with head.

Revision 1.3.4.1, Mon Oct 8 20:06:19 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3: +0 -134 lines
FILE REMOVED

file kern_softint.c was added on branch yamt-lazymbuf on 2007-10-27 11:35:28 +0000

Revision 1.3 / (download) - annotate - [select for diffs], Mon Oct 8 20:06:19 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: yamt-lazymbuf, mjf-devfs, bouyer-xenamd64
Changes since 1.2: +4 -2 lines
Diff to previous 1.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.2 / (download) - annotate - [select for diffs], Mon Oct 8 15:51:03 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.1: +132 -0 lines
Diff to previous 1.1 (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.1.2.15 / (download) - annotate - [select for diffs], Mon Sep 24 13:05:19 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.14: +6 -8 lines
Diff to previous 1.1.2.14 (colored) to branchpoint 1.1 (colored)

Replace references to top/bottom half to reduce confusion. Suggested by
yamt@.

Revision 1.1.2.14 / (download) - annotate - [select for diffs], Sat Sep 1 15:23:58 2007 UTC (16 years, 7 months ago) by yamt
Branch: vmlocking
Changes since 1.1.2.13: +22 -5 lines
Diff to previous 1.1.2.13 (colored) to branchpoint 1.1 (colored)

make "softint block" evcnt per softint_t.  ok'ed by Andrew Doran.

Revision 1.1.2.13 / (download) - annotate - [select for diffs], Tue Aug 28 12:29:01 2007 UTC (16 years, 7 months ago) by yamt
Branch: vmlocking
Changes since 1.1.2.12: +3 -2 lines
Diff to previous 1.1.2.12 (colored) to branchpoint 1.1 (colored)

softint_dispatch: add a missing pmap_deactivate.  ok'ed by Andrew Doran.

Revision 1.1.2.12 / (download) - annotate - [select for diffs], Tue Aug 21 13:59:43 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.11: +3 -3 lines
Diff to previous 1.1.2.11 (colored) to branchpoint 1.1 (colored)

A few minor corrections around calls to cpu_need_resched().

Revision 1.1.2.11 / (download) - annotate - [select for diffs], Sun Aug 19 23:28:45 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.10: +11 -6 lines
Diff to previous 1.1.2.10 (colored) to branchpoint 1.1 (colored)

softint_execute: acquire kernel_lock only once.

Revision 1.1.2.10 / (download) - annotate - [select for diffs], Mon Aug 13 10:01:01 2007 UTC (16 years, 8 months ago) by yamt
Branch: vmlocking
Changes since 1.1.2.9: +4 -4 lines
Diff to previous 1.1.2.9 (colored) to branchpoint 1.1 (colored)

softint_execute: s/Since since/Since/ in a comment.

Revision 1.1.2.9 / (download) - annotate - [select for diffs], Wed Jul 18 10:28:36 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.8: +8 -22 lines
Diff to previous 1.1.2.8 (colored) to branchpoint 1.1 (colored)

Don't bother yielding if a higher priority LWP is interrupted, just
leave a comment about it.

Revision 1.1.2.8 / (download) - annotate - [select for diffs], Wed Jul 18 10:13:59 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.7: +103 -73 lines
Diff to previous 1.1.2.7 (colored) to branchpoint 1.1 (colored)

- No need for a TAILQ, use a SIMPLEQ instead.
- Update blurb.

Revision 1.1.2.7 / (download) - annotate - [select for diffs], Sun Jul 15 22:20:28 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.6: +3 -4 lines
Diff to previous 1.1.2.6 (colored) to branchpoint 1.1 (colored)

Get pmax working.

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Sat Jul 14 22:09:44 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.5: +26 -26 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (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.1.2.5 / (download) - annotate - [select for diffs], Sat Jul 7 12:18:16 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.4: +8 -9 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored)

Fix a comment.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Sat Jul 7 12:12:40 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.3: +3 -6 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored)

Minor tweak to previous.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Sat Jul 7 11:56:11 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.2: +178 -121 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (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.1.2.2 / (download) - annotate - [select for diffs], Sun Jul 1 21:31:32 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.1.2.1: +152 -8 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

- softint_execute: if a thread with higher priority has been interrupted,
  then yield. Need to find a way to optimise this as it currently means
  walking the list of pinned LWPs.
- Add blurb (to be edited/completed).
- Add a counter to track how often soft interrupts sleep.
- Minor cosmetic changes.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Sun Jun 17 21:31:27 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.1: +493 -0 lines
Diff to previous 1.1 (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.1, Sun Jun 17 21:31:27 2007 UTC (16 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, mjf-ufs-trans-base, hpcarm-cleanup
Branch point for: yamt-x86pmap, vmlocking, jmcneill-pm
FILE REMOVED

file kern_softint.c was initially added on branch vmlocking.

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>