The NetBSD Project

CVS log for src/sys/rump/librump/rumpkern/lwproc.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.58 / (download) - annotate - [select for diffs], Sun Oct 15 11:11:37 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.57: +3 -2 lines
Diff to previous 1.57 (colored) to selected 1.42.4.2 (colored)

rump: Sprinkle sys/syncobj.h here too.

Revision 1.57 / (download) - annotate - [select for diffs], Thu Oct 5 19:41:07 2023 UTC (6 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.56: +3 -22 lines
Diff to previous 1.56 (colored) to selected 1.42.4.2 (colored)

Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).

Revision 1.56 / (download) - annotate - [select for diffs], Wed Oct 4 20:29:18 2023 UTC (6 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.55: +5 -4 lines
Diff to previous 1.55 (colored) to selected 1.42.4.2 (colored)

Eliminate l->l_biglocks.  Originally I think it had a use but these days a
local variable will do.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Oct 4 20:28:06 2023 UTC (6 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.54: +10 -2 lines
Diff to previous 1.54 (colored) to selected 1.42.4.2 (colored)

Eliminate l->l_ncsw and l->l_nivcsw.  From memory think they were added
before we had per-LWP struct rusage; the same is now tracked there.

Revision 1.54 / (download) - annotate - [select for diffs], Wed Feb 22 21:44:45 2023 UTC (13 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.53: +2 -4 lines
Diff to previous 1.53 (colored) to selected 1.42.4.2 (colored)

rump: Nix membar_enter/exit after/before RUMPUSER_LWP_CREATE/DESTROY.

These make no sense and are obviously not needed for any of the
rumpuser implementations in-tree.  (For single-threaded fiber and
pth_dummy, no barriers needed; for pth, RUMPUSER_LWP_CREATE/DESTROY
use pthread_mutex so don't need any barriers.)

It _might_ make sense to do membar_release/acquire around just
RUMPUSER_LWP_DESTROY, perhaps if there's some reference-counting
business involved.  But if a rumpuser implementation really needs
that it can do it itself.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Feb 22 21:44:33 2023 UTC (13 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored) to selected 1.42.4.2 (colored)

rumpkern/lwproc.c: Nix trailing whitespace.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Nov 2 09:01:42 2022 UTC (17 months, 2 weeks ago) by ozaki-r
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.51: +10 -10 lines
Diff to previous 1.51 (colored) to selected 1.42.4.2 (colored)

rump: don't touch p_nlwps without holding p_lock

There was a race condition on p_nlwps.  Heavy thread switching could
cause a kernel panic like:
  panic: kernel diagnostic assertion "LIST_EMPTY(&p->p_lwps)" failed:
  file "(hidden)/src/lib/librump/../../sys/rump/librump/rumpkern/lwproc.c", line 177

Revision 1.51 / (download) - annotate - [select for diffs], Sat May 30 19:16:53 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.50: +17 -21 lines
Diff to previous 1.50 (colored) to selected 1.42.4.2 (colored)

Fix a lock order reversal that caused hangs.

Revision 1.50 / (download) - annotate - [select for diffs], Sat May 23 23:42:44 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.49: +13 -13 lines
Diff to previous 1.49 (colored) to selected 1.42.4.2 (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.49 / (download) - annotate - [select for diffs], Sat May 23 20:45:11 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.48: +7 -5 lines
Diff to previous 1.48 (colored) to selected 1.42.4.2 (colored)

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

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

Revision 1.48 / (download) - annotate - [select for diffs], Sat Apr 25 15:42:15 2020 UTC (3 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored) to selected 1.42.4.2 (colored)

Merge the bouyer-xenpvh branch, bringing in Xen PV drivers support under HVM
guests in GENERIC.
Xen support can be disabled at runtime with
boot -c
disable hypervisor

Revision 1.44.4.2 / (download) - annotate - [select for diffs], Sat Apr 25 11:24:07 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.44.4.1: +5 -4 lines
Diff to previous 1.44.4.1 (colored) to branchpoint 1.44 (colored) next main 1.45 (colored) to selected 1.42.4.2 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.47 / (download) - annotate - [select for diffs], Fri Apr 24 13:34:47 2020 UTC (3 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored) to selected 1.42.4.2 (colored)

lwp0.l_lid needs to be 0.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Apr 24 03:56:12 2020 UTC (3 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.45: +4 -3 lines
Diff to previous 1.45 (colored) to selected 1.42.4.2 (colored)

Adapt to LWP ID allocation changes.

Revision 1.40.18.2 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:45 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.40.18.1: +4 -3 lines
Diff to previous 1.40.18.1 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD

Revision 1.44.4.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:13 2020 UTC (4 years ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.44: +4 -3 lines
Diff to previous 1.44 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD

Revision 1.45 / (download) - annotate - [select for diffs], Sun Apr 19 20:32:00 2020 UTC (4 years ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base1
Changes since 1.44: +4 -3 lines
Diff to previous 1.44 (colored) to selected 1.42.4.2 (colored)

- Only increment nprocs when we're creating a new process, not just
  when allocating a PID.
- Per above, proc_free_pid() no longer decrements nprocs.  It's now done
  in proc_free() right after proc_free_pid().
- Ensure nprocs is accessed using atomics everywhere.

Revision 1.42.4.2 / (download) - annotate - [selected], Sat Feb 29 20:21:09 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.42.4.1: +6 -6 lines
Diff to previous 1.42.4.1 (colored) to branchpoint 1.42 (colored) next main 1.43 (colored)

Sync with head.

Revision 1.44 / (download) - annotate - [select for diffs], Sat Feb 15 18:12:15 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base, ad-namecache-base3
Branch point for: bouyer-xenpvh
Changes since 1.43: +6 -6 lines
Diff to previous 1.43 (colored) to selected 1.42.4.2 (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.42.4.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:37 2020 UTC (4 years, 3 months ago) by ad
Branch: ad-namecache
Changes since 1.42: +6 -6 lines
Diff to previous 1.42 (colored) to selected 1.42.4.2 (colored)

Sync with head.

Revision 1.43 / (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-base2, ad-namecache-base1
Changes since 1.42: +6 -6 lines
Diff to previous 1.42 (colored) to selected 1.42.4.2 (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.40.18.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:53 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.40: +6 -2 lines
Diff to previous 1.40 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD

Revision 1.42 / (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-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.41: +4 -2 lines
Diff to previous 1.41 (colored) to selected 1.42.4.2 (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.41 / (download) - annotate - [select for diffs], Sat Mar 9 09:02:38 2019 UTC (5 years, 1 month ago) by hannken
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.40: +4 -2 lines
Diff to previous 1.40 (colored) to selected 1.42.4.2 (colored)

Rumpkernel has its own thread deallocation.  Add missing fstrans_lwp_dtor()
to lwproc_freelwp().

PR bin/50350: rump/rumpkern/t_sp/stress_{long,short} fail on Core 2 Quad

Revision 1.18.14.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:16 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.18.14.3: +96 -12 lines
Diff to previous 1.18.14.3 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored) to selected 1.42.4.2 (colored)

update from HEAD

Revision 1.31.4.5 / (download) - annotate - [select for diffs], Sun May 29 08:44:39 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.31.4.4: +29 -2 lines
Diff to previous 1.31.4.4 (colored) to branchpoint 1.31 (colored) next main 1.32 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD

Revision 1.40 / (download) - annotate - [select for diffs], Sun Apr 24 07:45:10 2016 UTC (7 years, 11 months ago) by martin
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi
Changes since 1.39: +29 -2 lines
Diff to previous 1.39 (colored) to selected 1.42.4.2 (colored)

Add lwp_find() - verbatim copy from the hard kernel.

Revision 1.31.4.4 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:18 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.31.4.3: +3 -3 lines
Diff to previous 1.31.4.3 (colored) to branchpoint 1.31 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD

Revision 1.39 / (download) - annotate - [select for diffs], Mon Apr 4 20:47:57 2016 UTC (8 years ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored) to selected 1.42.4.2 (colored)

Split p_xstat (composite wait(2) status code, or signal number depending
on context) into:
1. p_xexit:		exit code
2. p_xsig:		signal number
3. p_sflag & WCOREFLAG	bit to indicated that the process core-dumped.

Fix the documentation of the flag bits in <sys/proc.h>

Revision 1.31.4.3 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:37 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.31.4.2: +44 -5 lines
Diff to previous 1.31.4.2 (colored) to branchpoint 1.31 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD

Revision 1.38 / (download) - annotate - [select for diffs], Mon Feb 8 18:18:19 2016 UTC (8 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored) to selected 1.42.4.2 (colored)

Allocate struct cpu_info dynamically.  Saves quite a lot of BSS in the
common case and reduces rump kernel memory requirements by 10% or more
in really tiny deployments.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jan 26 23:12:17 2016 UTC (8 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.36: +5 -3 lines
Diff to previous 1.36 (colored) to selected 1.42.4.2 (colored)

Put the kernelside rump kernel headers into <rump-sys> instead of
sprinkling them around the faction directories.  Avoids having
to add a CPPFLAGS (or several) to pretty much every component
Makefile.

Leave compat headers around in the old locations.

The commit changes some autogenerated files, but I'll fix the
generators shortly and regen.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Jan 18 23:27:20 2016 UTC (8 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.35: +39 -2 lines
Diff to previous 1.35 (colored) to selected 1.42.4.2 (colored)

put lwp/proc stuff into the same source module (emul.c -> lwproc.c)

Revision 1.31.4.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:29 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.31.4.1: +6 -5 lines
Diff to previous 1.31.4.1 (colored) to branchpoint 1.31 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD

Revision 1.35 / (download) - annotate - [select for diffs], Sat Apr 18 15:49:18 2015 UTC (9 years ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606
Changes since 1.34: +4 -3 lines
Diff to previous 1.34 (colored) to selected 1.42.4.2 (colored)

Give remote clients struct pmap storage.  Although the pmap is unused,
that way we can sure that the pmap macro framework doesn't access all
the wrong places.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Apr 17 13:03:38 2015 UTC (9 years ago) by pooka
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored) to selected 1.42.4.2 (colored)

Don't share file descriptors between proc0 and local clients.

Revision 1.31.4.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:30 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.31: +26 -9 lines
Diff to previous 1.31 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD

Revision 1.33 / (download) - annotate - [select for diffs], Fri Apr 3 16:40:55 2015 UTC (9 years ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.32: +15 -8 lines
Diff to previous 1.32 (colored) to selected 1.42.4.2 (colored)

Use a different vmspace for rump kernel proc0 and local clients.
While the rump kernel and local clients are by definition in the same
host vmspace, there are subtle differences in how in-kernel code works
in case accessing the kernel vmspace or a user process vmspace.

Problem discovered by riastradh's "read(fd, NULL, 1)" test.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jan 21 14:39:37 2015 UTC (9 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.31: +13 -3 lines
Diff to previous 1.31 (colored) to selected 1.42.4.2 (colored)

Account for lwps so that rump_sys_setuid() doesn't hit a KASSERT when
it tries to reaccount a switching procs lwps.

from Mato Lucina

Revision 1.18.14.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:40 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.18.14.2: +98 -19 lines
Diff to previous 1.18.14.2 (colored) to branchpoint 1.18 (colored) to selected 1.42.4.2 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.28.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:56:51 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.28: +14 -6 lines
Diff to previous 1.28 (colored) next main 1.29 (colored) to selected 1.42.4.2 (colored)

Rebase.

Revision 1.18.4.2 / (download) - annotate - [select for diffs], Thu May 22 11:41:15 2014 UTC (9 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.18.4.1: +119 -23 lines
Diff to previous 1.18.4.1 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored) to selected 1.42.4.2 (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.23.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:18 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.23: +100 -21 lines
Diff to previous 1.23 (colored) next main 1.24 (colored) to selected 1.42.4.2 (colored)

sync with head

Revision 1.31 / (download) - annotate - [select for diffs], Fri Apr 25 13:20:45 2014 UTC (9 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, rmind-smpnet-nbase, rmind-smpnet-base, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Branch point for: nick-nhusb
Changes since 1.30: +4 -6 lines
Diff to previous 1.30 (colored) to selected 1.42.4.2 (colored)

Init function pointers to nullop() so that callers don't need a dance

Revision 1.30 / (download) - annotate - [select for diffs], Wed Apr 16 22:34:02 2014 UTC (10 years ago) by pooka
Branch: MAIN
Changes since 1.29: +11 -2 lines
Diff to previous 1.29 (colored) to selected 1.42.4.2 (colored)

Reparent children of a dying lwproc.  Fixes wpa_supplicant -B (and
most likely a bunch of other things).

Revision 1.29 / (download) - annotate - [select for diffs], Wed Apr 9 23:53:36 2014 UTC (10 years ago) by pooka
Branch: MAIN
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored) to selected 1.42.4.2 (colored)

implement lwp_create() and a few related interfaces.
main raison d'impalerment: the aio driver

Revision 1.28 / (download) - annotate - [select for diffs], Sun Mar 16 15:30:05 2014 UTC (10 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored) to selected 1.42.4.2 (colored)

remove unnecesary verbosity: s/RUMP_CURLWP_MODEL/RUMP_CURLWP/

Revision 1.27 / (download) - annotate - [select for diffs], Sat Mar 15 15:15:27 2014 UTC (10 years, 1 month ago) by pooka
Branch: MAIN
Changes since 1.26: +39 -7 lines
Diff to previous 1.26 (colored) to selected 1.42.4.2 (colored)

Allow compile-time optimizations to curlwp.  This can have a pretty
staggering impact on performance.  When running sendto() in a loop,
the improvement is 200k more calls per second with an inlined __thread
curlwp as opposed to the default.  In other words, it shaves off hundreds
of CPU cycles per call (~20%).  Even just eliminating the x86_curlwp()
call in favor of an inline gives an improvement of 60k calls per second.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Dec 16 15:36:29 2013 UTC (10 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.25: +5 -2 lines
Diff to previous 1.25 (colored) to selected 1.42.4.2 (colored)

Translate return values for emulations, e.g. Linux.  For ports without
__HAVE_MINIMAL_EMUL, we simply look up the values from p->p_emul->e_errno.
For ports which cannot afford to keep an extra pointer per emul structure
around, we hope there is __HAVE_SYSCALL_INTERN support and thread the
errno values through p_emuldata.  Notably, we cannot alter the syscall
method like most ports do with syscall_intern, since they do it via
p_mdproc, so MI code is not possible there.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Dec 9 16:21:15 2013 UTC (10 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.24: +13 -4 lines
Diff to previous 1.24 (colored) to selected 1.42.4.2 (colored)

stop ktrace at process exit

Revision 1.24 / (download) - annotate - [select for diffs], Sun Oct 27 20:25:45 2013 UTC (10 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.23: +37 -10 lines
Diff to previous 1.23 (colored) to selected 1.42.4.2 (colored)

Enable holding implicit threads over explicit scheduling points (i.e.
a kernel driver calling rump_lwproc_switch()).  Also, correctly handle
curcpu()->ci_curlwp and biglock there.

Revision 1.18.14.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:28 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.18.14.1: +25 -8 lines
Diff to previous 1.18.14.1 (colored) to branchpoint 1.18 (colored) to selected 1.42.4.2 (colored)

resync from head

Revision 1.23 / (download) - annotate - [select for diffs], Wed May 15 14:07:26 2013 UTC (10 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored) to selected 1.42.4.2 (colored)

Add RUMPUSER_LWP_CLEAR instead of overloading RUMPUSER_LWP_SET.
This simplifies some alternative hypervisor implementations.

Revision 1.22 / (download) - annotate - [select for diffs], Thu May 2 19:15:01 2013 UTC (10 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: khorben-n900
Changes since 1.21: +9 -5 lines
Diff to previous 1.21 (colored) to selected 1.42.4.2 (colored)

Inform the rump kernel hypervisor of valid thread contexts so
that the implementation can allocate and release storage for them
in an optimal fashion, if necessary.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Apr 28 23:19:33 2013 UTC (10 years, 11 months ago) by pooka
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored) to selected 1.42.4.2 (colored)

One more mutex which is used as a spin mutex and therefore needs
to be tagged as one, lest the mighty assert smites thee.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Mar 7 18:49:13 2013 UTC (11 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.19: +17 -4 lines
Diff to previous 1.19 (colored) to selected 1.42.4.2 (colored)

Support multiple syscall emuls.

Rump kernels with only local clients have it easy, since they have to
support at most two syscall vectors (some calls such as mount/unmount
can be made only through the "native" NetBSD vector).  Remote clients
are a whole different tin of green beans.  This change addresses local
clients only.

Revision 1.18.4.1 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:51 2013 UTC (11 years, 3 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.18: +2 -4 lines
Diff to previous 1.18 (colored) to selected 1.42.4.2 (colored)

sync with (a bit old) head

Revision 1.18.14.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:50 2012 UTC (11 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.18: +2 -4 lines
Diff to previous 1.18 (colored) to selected 1.42.4.2 (colored)

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

Revision 1.19 / (download) - annotate - [select for diffs], Tue Nov 13 20:10:02 2012 UTC (11 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7
Changes since 1.18: +2 -4 lines
Diff to previous 1.18 (colored) to selected 1.42.4.2 (colored)

kill some -Wunused-but-set-variable warnings

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:10:07 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.10: +36 -10 lines
Diff to previous 1.10 (colored) next main 1.11 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD.

Revision 1.15.2.4 / (download) - annotate - [select for diffs], Tue May 31 03:05:11 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.15.2.3: +1 -1 lines
Diff to previous 1.15.2.3 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored) to selected 1.42.4.2 (colored)

sync with head

Revision 1.18 / (download) - annotate - [select for diffs], Sun May 1 02:52:42 2011 UTC (12 years, 11 months ago) by pgoyette
Branch: MAIN
CVS Tags: yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache, tls-maxphys
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored) to selected 1.42.4.2 (colored)

More lim_free() fallout

Revision 1.15.2.3 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:17 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.15.2.2: +10 -3 lines
Diff to previous 1.15.2.2 (colored) to branchpoint 1.15 (colored) to selected 1.42.4.2 (colored)

sync with head

Revision 1.17 / (download) - annotate - [select for diffs], Tue Mar 8 12:39:29 2011 UTC (13 years, 1 month ago) by pooka
Branch: MAIN
Changes since 1.16: +10 -2 lines
Diff to previous 1.16 (colored) to selected 1.42.4.2 (colored)

Nuke all threads belonging to a process calling exec before allowing
the exec handshake to return.

In addition to being The Right Thing To Do, fixes some nasty
conditions for CLOEXEC fd's (or at least does so in theory, I
couldn't create any problems although I tried).

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 7 21:04:47 2011 UTC (13 years, 1 month ago) by pooka
Branch: MAIN
Changes since 1.15: +4 -5 lines
Diff to previous 1.15 (colored) to selected 1.42.4.2 (colored)

Fill in a functional struct lwp (especially l_mutex) before exposing
it on p_lwps.

Revision 1.15.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:56:15 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.15.2.1: +397 -0 lines
Diff to previous 1.15.2.1 (colored) to branchpoint 1.15 (colored) to selected 1.42.4.2 (colored)

sync with head

Revision 1.10.4.2 / (download) - annotate - [select for diffs], Thu Feb 17 12:00:51 2011 UTC (13 years, 2 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.10.4.1: +16 -3 lines
Diff to previous 1.10.4.1 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD

Revision 1.15.2.1, Thu Feb 10 13:40:35 2011 UTC (13 years, 2 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.15: +0 -397 lines
FILE REMOVED

file lwproc.c was added on branch rmind-uvmplock on 2011-03-05 20:56:15 +0000

Revision 1.15 / (download) - annotate - [select for diffs], Thu Feb 10 13:40:35 2011 UTC (13 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: bouyer-quota2-nbase, bouyer-quota2-base
Branch point for: rmind-uvmplock
Changes since 1.14: +12 -2 lines
Diff to previous 1.14 (colored) to selected 1.42.4.2 (colored)

Explicitly zerofill some fields which are not within the boundaries
of p_start/endzero for whatever reasons.

Obviously, this fixes remote physio when running with MALLOC_OPTIONS J.
Otherwise PS_WEXIT is set in struct proc, proc_vmspace_getref() fails,
and copyout_proc() with it.

Reported by njoly

Revision 1.14 / (download) - annotate - [select for diffs], Thu Feb 10 13:31:30 2011 UTC (13 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.13: +6 -3 lines
Diff to previous 1.13 (colored) to selected 1.42.4.2 (colored)

copy parent's p_comm when forking (if it exists)

Revision 1.10.4.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:20:04 2011 UTC (13 years, 2 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.10: +12 -6 lines
Diff to previous 1.10 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jan 28 18:48:21 2011 UTC (13 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored) to selected 1.42.4.2 (colored)

Don't NULL out l_cpu, l_stat is the new rumpkernel way too.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jan 28 16:58:28 2011 UTC (13 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.11: +10 -5 lines
Diff to previous 1.11 (colored) to selected 1.42.4.2 (colored)

Some lwp-walkers expect the correct value for l_stat, so use a flag
in l_flag instead of l_stat for the purpose of flagging lwps in a
dying proc.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jan 28 16:34:31 2011 UTC (13 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored) to selected 1.42.4.2 (colored)

fill in a default name for p_comm

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jan 13 15:38:29 2011 UTC (13 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored) to selected 1.42.4.2 (colored)

Introduce RUMP_LOCALPROC_P() macro and use it.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jan 12 12:51:21 2011 UTC (13 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored) to selected 1.42.4.2 (colored)

When the client and the rump kernel are the same host process, all
threads blocking in the kernel automatically exit when the process
exists.  However, for the sysproxy case this does not hold.
Typically it's ~harmless, but e.g. in the case of socket binding
following by poll it gets annoying.

Introduce sysproxy procexit, which wakes up all threads blocking
on a condition when a process's communication socket is closed.
The code is a little different from the regular kernel simply
because in a rump kernel l_mutex is not available at all times
(this is because scheduling happens on every kernel entry and exit,
and that path must be kept lockless for any reasonable performance).
Instead, use gating which makes sure all threads are either out of
the cv code or suspended in a well-known state.  Then, wake up the
threads and tell them to get the hell out of our galaxy.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jan 6 11:22:55 2011 UTC (13 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.7: +3 -2 lines
Diff to previous 1.7 (colored) to selected 1.42.4.2 (colored)

Support LOCKDEBUG.  To use it, compile sys/rump with RUMP_LOCKDEBUG=yes.

requested by martin (sparc64 gdb cannot reliably produce a stack trace)

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jan 2 12:52:25 2011 UTC (13 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.6: +21 -9 lines
Diff to previous 1.6 (colored) to selected 1.42.4.2 (colored)

There is a use case where preserving the parent's fd table is
relevant, so to accommodate that change rump_lwproc_newproc() to
rump_lwproc_rfork().  The new interface has the rfork() fd table
semantics.  The equivalent of rump_lwproc_newproc() is
rump_lwproc_rfork(RUMP_RFCFDG).

Revision 1.6 / (download) - annotate - [select for diffs], Mon Nov 22 20:42:19 2010 UTC (13 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.5: +8 -2 lines
Diff to previous 1.5 (colored) to selected 1.42.4.2 (colored)

Support physio for remote processes.
==> add support for remote vmspace vmapbuf/vunmapbuf
  ==> add proper support for copyin/out_vmspace
    ==> add support for remote vmspace uvm_io
      ==> add support for non-curproc rumpuser_sp_copyin/out
        ==> store remote context in vm_map->pmap instead of
            pthread_specificdata

In short, makes read/write of most (all?) block devices work from
a remote rump client via rump syscalls.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Nov 17 19:54:09 2010 UTC (13 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored) to selected 1.42.4.2 (colored)

cleanup some old garbage

Revision 1.4 / (download) - annotate - [select for diffs], Mon Nov 15 20:37:22 2010 UTC (13 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.3: +15 -3 lines
Diff to previous 1.3 (colored) to selected 1.42.4.2 (colored)

Add a new signal model RUMP_SIGMODEL_RECORD which records all
signals which are posted to a process.

Revision 1.2.4.3 / (download) - annotate - [select for diffs], Sat Nov 6 08:08:51 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.2.4.2: +10 -6 lines
Diff to previous 1.2.4.2 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Oct 29 15:32:24 2010 UTC (13 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base4
Changes since 1.2: +10 -6 lines
Diff to previous 1.2 (colored) to selected 1.42.4.2 (colored)

Attach implicit threads to initproc instead of proc0.  This way
applications which alter, by purpose or by accident, the uid in an
implicit thread are don't affect kernel threads.

from discussion with njoly

Revision 1.2.4.2 / (download) - annotate - [select for diffs], Fri Oct 22 07:22:49 2010 UTC (13 years, 6 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.2.4.1: +342 -0 lines
Diff to previous 1.2.4.1 (colored) to branchpoint 1.2 (colored) to selected 1.42.4.2 (colored)

Sync with HEAD (-D20101022).

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Sat Oct 9 03:32:43 2010 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.2.2.1: +342 -0 lines
Diff to previous 1.2.2.1 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored) to selected 1.42.4.2 (colored)

sync with head

Revision 1.2.4.1, Wed Sep 1 21:16:56 2010 UTC (13 years, 7 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.2: +0 -342 lines
FILE REMOVED

file lwproc.c was added on branch uebayasi-xip on 2010-10-22 07:22:49 +0000

Revision 1.2.2.1, Wed Sep 1 21:16:56 2010 UTC (13 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.2: +0 -342 lines
FILE REMOVED

file lwproc.c was added on branch yamt-nfs-mp on 2010-10-09 03:32:43 +0000

Revision 1.2 / (download) - annotate - [select for diffs], Wed Sep 1 21:16:56 2010 UTC (13 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base3
Branch point for: yamt-nfs-mp, uebayasi-xip
Changes since 1.1: +5 -2 lines
Diff to previous 1.1 (colored) to selected 1.42.4.2 (colored)

proper panic for trying to release implicit lwp

Revision 1.1 / (download) - annotate - [select for diffs], Wed Sep 1 19:37:58 2010 UTC (13 years, 7 months ago) by pooka
Branch: MAIN
Diff to selected 1.42.4.2 (colored)

Implement rump_lwproc: the new lwp/proc management routines for
rump.  These move the management of the pid/lwpid space from the
application into the kernel, make code more robust, and make it
possible to attach multiple lwp's to non-proc0 processes.

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>