The NetBSD Project

CVS log for src/sys/uvm/uvm_glue.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.182 / (download) - annotate - [select for diffs], Wed Oct 4 20:34:19 2023 UTC (6 months, 1 week ago) by ad
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.181: +3 -4 lines
Diff to previous 1.181 (colored) to selected 1.87 (colored)

Remove unneeded test of ci->ci_want_resched.

Revision 1.181 / (download) - annotate - [select for diffs], Sun Jun 14 21:41:42 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, 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, 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.180: +2 -5 lines
Diff to previous 1.180 (colored) to selected 1.87 (colored)

Remove PG_ZERO.  It worked brilliantly on x86 machines from the mid-90s but
having spent an age experimenting with it over the last 6 months on various
machines and with different use cases it's always either break-even or a
slight net loss for me.

Revision 1.180 / (download) - annotate - [select for diffs], Thu Jun 11 19:20:47 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.179: +3 -3 lines
Diff to previous 1.179 (colored) to selected 1.87 (colored)

uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched.  It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.

Revision 1.179 / (download) - annotate - [select for diffs], Fri May 22 19:46:29 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.178: +2 -14 lines
Diff to previous 1.178 (colored) to selected 1.87 (colored)

Remove the ubc_direct hack.

Revision 1.177.2.1 / (download) - annotate - [select for diffs], Sat Apr 25 11:24:08 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.177: +14 -2 lines
Diff to previous 1.177 (colored) next main 1.178 (colored) to selected 1.87 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.178 / (download) - annotate - [select for diffs], Thu Apr 23 21:53:01 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.177: +14 -2 lines
Diff to previous 1.177 (colored) to selected 1.87 (colored)

Enable ubc_direct by default, but only on systems with no more than 2 CPUs
for now.

Revision 1.163.18.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:21 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.163.18.2: +0 -1 lines
Diff to previous 1.163.18.2 (colored) to branchpoint 1.163 (colored) next main 1.164 (colored) to selected 1.87 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.163.18.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:09:04 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.163.18.1: +40 -10 lines
Diff to previous 1.163.18.1 (colored) to branchpoint 1.163 (colored) to selected 1.87 (colored)

Merge changes from current as of 20200406

Revision 1.177 / (download) - annotate - [select for diffs], Thu Mar 5 12:21:00 2020 UTC (4 years, 1 month ago) by rin
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base1, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.176: +6 -4 lines
Diff to previous 1.176 (colored) to selected 1.87 (colored)

Part of PR kern/54994:

Memory allocated in the fast path of uarea_poolpage_alloc() is
a page itself. Therefore, it is obviously page-aligned.

Pointed out by skrll.

Revision 1.175.2.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:38 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.175: +2 -5 lines
Diff to previous 1.175 (colored) next main 1.176 (colored) to selected 1.87 (colored)

Sync with head.

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

l->l_emap_gen isn't used any more.

Revision 1.175 / (download) - annotate - [select for diffs], Tue Dec 31 22:42:51 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.174: +22 -2 lines
Diff to previous 1.174 (colored) to selected 1.87 (colored)

- Add and use wrapper functions that take and acquire page interlocks, and pairs
  of page interlocks.  Require that the page interlock be held over calls to
  uvm_pageactivate(), uvm_pagewire() and similar.

- Solve the concurrency problem with page replacement state.  Rather than
  updating the global state synchronously, set an intended state on
  individual pages (active, inactive, enqueued, dequeued) while holding the
  page interlock.  After the interlock is released put the pages on a 128
  entry per-CPU queue for their state changes to be made real in batch.
  This results in in a ~400 fold decrease in contention on my test system.
  Proposed on tech-kern but modified to use the page interlock rather than
  atomics to synchronise as it's much easier to maintain that way, and
  cheaper.

Revision 1.174 / (download) - annotate - [select for diffs], Tue Dec 31 13:07:14 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.173: +3 -3 lines
Diff to previous 1.173 (colored) to selected 1.87 (colored)

Rename uvm_free() -> uvm_availmem().

Revision 1.173 / (download) - annotate - [select for diffs], Fri Dec 27 12:51:57 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.172: +11 -2 lines
Diff to previous 1.172 (colored) to selected 1.87 (colored)

Redo the page allocator to perform better, especially on multi-core and
multi-socket systems.  Proposed on tech-kern.  While here:

- add rudimentary NUMA support - needs more work.
- remove now unused "listq" from vm_page.

Revision 1.172 / (download) - annotate - [select for diffs], Sat Dec 21 13:00:25 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.171: +4 -4 lines
Diff to previous 1.171 (colored) to selected 1.87 (colored)

uvmexp.free -> uvm_free()

Revision 1.171 / (download) - annotate - [select for diffs], Mon Dec 16 22:47:55 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.170: +4 -2 lines
Diff to previous 1.170 (colored) to selected 1.87 (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.170 / (download) - annotate - [select for diffs], Thu Nov 21 17:47:53 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.169: +3 -3 lines
Diff to previous 1.169 (colored) to selected 1.87 (colored)

Use lwp_changepri().

Revision 1.169 / (download) - annotate - [select for diffs], Thu Nov 14 16:48:51 2019 UTC (4 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.168: +2 -3 lines
Diff to previous 1.168 (colored) to selected 1.87 (colored)

Don't include "opt_kasan.h" when there's already <sys/asan.h> included.

Revision 1.163.18.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:58 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.163: +18 -15 lines
Diff to previous 1.163 (colored) to selected 1.87 (colored)

Sync with HEAD

Revision 1.168 / (download) - annotate - [select for diffs], Wed May 8 16:00:01 2019 UTC (4 years, 11 months ago) by chs
Branch: MAIN
CVS Tags: 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
Changes since 1.167: +13 -12 lines
Diff to previous 1.167 (colored) to selected 1.87 (colored)

uvm_pagealloc() uses UVM_PGA_* flags, not UVM_KMF_* flags,
and it is always nowait.  fix uarea_poolpage_alloc() to not use
flags from the wrong collection for calling uvm_pagealloc()
and to wait itself if a page is not immediately available.

Revision 1.167 / (download) - annotate - [select for diffs], Sun Apr 7 09:20:04 2019 UTC (5 years ago) by maxv
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.166: +4 -4 lines
Diff to previous 1.166 (colored) to selected 1.87 (colored)

Provide a code argument in kasan_mark(), and give a code to each caller.
Five codes used: GenericRedZone, MallocRedZone, KmemRedZone, PoolRedZone,
and PoolUseAfterFree.

This can greatly help debugging complex memory corruptions.

Revision 1.163.16.3 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:08 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.163.16.2: +4 -4 lines
Diff to previous 1.163.16.2 (colored) to branchpoint 1.163 (colored) next main 1.164 (colored) to selected 1.87 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.166 / (download) - annotate - [select for diffs], Sun Dec 23 12:15:01 2018 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.165: +4 -4 lines
Diff to previous 1.165 (colored) to selected 1.87 (colored)

Simplify the KASAN API, use only kasan_mark() and explain briefly. The
alloc/free naming was too confusing.

Revision 1.163.16.2 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:52 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.163.16.1: +3 -5 lines
Diff to previous 1.163.16.1 (colored) to branchpoint 1.163 (colored) to selected 1.87 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.165 / (download) - annotate - [select for diffs], Sun Nov 4 13:48:27 2018 UTC (5 years, 5 months ago) by mlelstv
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.164: +3 -5 lines
Diff to previous 1.164 (colored) to selected 1.87 (colored)

PMAP_MAP_POOLPAGE must not fail. Trigger assertion here instead of
panic later from failing PR_WAITOK memory allocations.

Revision 1.163.16.1 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:48 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.163: +6 -2 lines
Diff to previous 1.163 (colored) to selected 1.87 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.164 / (download) - annotate - [select for diffs], Wed Aug 22 12:07:43 2018 UTC (5 years, 7 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.163: +6 -2 lines
Diff to previous 1.163 (colored) to selected 1.87 (colored)

Add support for monitoring the stack with kASan. This allows us to detect
illegal memory accesses occuring there.

The compiler inlines a piece of code in each function that adds redzones
around the local variables and poisons them. The illegal accesses are then
detected using the usual kASan machinery.

The stack size is doubled, from 4 pages to 8 pages.

Several boot functions are marked with the __noasan flag, to prevent the
compiler from adding redzones in them (because we haven't yet initialized
kASan). The kasan_early_init function is called early at boot time to
quickly create the shadow for the current stack; after this is done, we
don't need __noasan anymore in the boot path.

We pass -fasan-shadow-offset=0xDFFF900000000000, because the compiler
wants to do
	shad = shadow-offset + (addr >> 3)
and we do, in kasan_addr_to_shad
	shad = KASAN_SHADOW_START + ((addr - CANONICAL_BASE) >> 3)
hence
	shad = KASAN_SHADOW_START + (addr >> 3) - (CANONICAL_BASE >> 3)
	     = [KASAN_SHADOW_START - (CANONICAL_BASE >> 3)] + (addr >> 3)
implies
	shadow-offset = KASAN_SHADOW_START - (CANONICAL_BASE >> 3)
	              = 0xFFFF800000000000 - (0xFFFF800000000000 >> 3)
	              = 0xDFFF900000000000

In UVM, we add a kasan_free (that is not preceded by a kasan_alloc). We
don't add poisoned redzones ourselves, but all the functions we execute
do, so we need to manually clear the poison before freeing the stack.

With the help of Kamil for the makefile stuff.

Revision 1.160.2.1 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:22 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.160: +4 -4 lines
Diff to previous 1.160 (colored) next main 1.161 (colored) to selected 1.87 (colored)

update from HEAD

Revision 1.161.2.1 / (download) - annotate - [select for diffs], Sun May 29 08:44:40 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.161: +2 -2 lines
Diff to previous 1.161 (colored) next main 1.162 (colored) to selected 1.87 (colored)

Sync with HEAD

Revision 1.163 / (download) - annotate - [select for diffs], Sun May 22 09:10:37 2016 UTC (7 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, 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-base, 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, 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, pgoyette-compat
Changes since 1.162: +21 -18 lines
Diff to previous 1.162 (colored) to selected 1.87 (colored)

Revert my previous change. I missed an entry on NXR.

Revision 1.162 / (download) - annotate - [select for diffs], Sat May 21 06:37:28 2016 UTC (7 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.161: +18 -21 lines
Diff to previous 1.161 (colored) to selected 1.87 (colored)

USPACE and USPACE_ALIGN are constants. Use a #if instead. Probably saves
some instructions.

Revision 1.161 / (download) - annotate - [select for diffs], Thu Nov 27 14:25:01 2014 UTC (9 years, 4 months ago) by uebayasi
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.160: +4 -4 lines
Diff to previous 1.160 (colored) to selected 1.87 (colored)

Consistently use kpreempt_*() outside scheduler path.

Revision 1.156.2.3.2.1 / (download) - annotate - [select for diffs], Wed Nov 28 22:59:09 2012 UTC (11 years, 4 months ago) by matt
Branch: matt-nb6-plus
Changes since 1.156.2.3: +7 -3 lines
Diff to previous 1.156.2.3 (colored) next main 1.157 (colored) to selected 1.87 (colored)

Pull from HEAD:
Add a __HAVE_CPU_UAREA_IDLELWP hook so that the MD code can allocate
special UAREAs for idle lwp's.

Revision 1.151.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:23:01 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.151.2.1: +7 -3 lines
Diff to previous 1.151.2.1 (colored) to branchpoint 1.151 (colored) next main 1.152 (colored) to selected 1.87 (colored)

sync with head

Revision 1.160 / (download) - annotate - [select for diffs], Sat Sep 1 00:26:37 2012 UTC (11 years, 7 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, 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, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.159: +7 -3 lines
Diff to previous 1.159 (colored) to selected 1.87 (colored)

Add a __HAVE_CPU_UAREA_IDLELWP hook so that the MD code can allocate
special UAREAs for idle lwp's.

Revision 1.152.2.3 / (download) - annotate - [select for diffs], Sun Apr 29 23:05:09 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.152.2.2: +13 -8 lines
Diff to previous 1.152.2.2 (colored) to branchpoint 1.152 (colored) next main 1.153 (colored) to selected 1.87 (colored)

sync to latest -current.

Revision 1.151.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:58 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.151: +16 -4 lines
Diff to previous 1.151 (colored) to selected 1.87 (colored)

sync with head

Revision 1.156.2.3 / (download) - annotate - [select for diffs], Thu Apr 12 17:05:37 2012 UTC (12 years 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, 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, matt-nb6-plus-nbase, matt-nb6-plus-base
Branch point for: matt-nb6-plus
Changes since 1.156.2.2: +8 -6 lines
Diff to previous 1.156.2.2 (colored) to branchpoint 1.156 (colored) next main 1.157 (colored) to selected 1.87 (colored)

Pull up following revision(s) (requested by martin in ticket #175):
	sys/kern/kern_exit.c: revision 1.238
	tests/lib/libc/gen/posix_spawn/t_fileactions.c: revision 1.4
	tests/lib/libc/gen/posix_spawn/t_fileactions.c: revision 1.5
	sys/uvm/uvm_extern.h: revision 1.183
	lib/libc/gen/posix_spawn_fileactions.c: revision 1.2
	sys/kern/kern_exec.c: revision 1.348
	sys/kern/kern_exec.c: revision 1.349
	sys/compat/netbsd32/syscalls.master: revision 1.95
	sys/uvm/uvm_glue.c: revision 1.159
	sys/uvm/uvm_map.c: revision 1.317
	sys/compat/netbsd32/netbsd32.h: revision 1.95
	sys/kern/exec_elf.c: revision 1.38
	sys/sys/spawn.h: revision 1.2
	sys/sys/exec.h: revision 1.135
	sys/compat/netbsd32/netbsd32_execve.c: revision 1.34
Rework posix_spawn locking and memory management:
 - always provide a vmspace for the new proc, initially borrowing from proc0
   (this part fixes PR 46286)
 - increase parallelism between parent and child if arguments allow this,
   avoiding a potential deadlock on exec_lock
 - add a new flag for userland to request old (lockstepped) behaviour for
   better error reporting
 - adapt test cases to the previous two and add a new variant to test the
   diagnostics flag
 - fix a few memory (and lock) leaks
 - provide netbsd32 compat
Fix asynchronous posix_spawn child exit status (and test for it).

Revision 1.156.2.2 / (download) - annotate - [select for diffs], Mon Apr 9 17:58:11 2012 UTC (12 years ago) by riz
Branch: netbsd-6
Changes since 1.156.2.1: +7 -4 lines
Diff to previous 1.156.2.1 (colored) to branchpoint 1.156 (colored) to selected 1.87 (colored)

Pull up following revision(s) (requested by chs in ticket #167):
	sys/uvm/uvm_glue.c: revision 1.158
fix uarea_system_poolpage_free() to handle freeing a uarea
that was not allocated by cpu_uarea_alloc() (ie. on plaforms
where cpu_uarea_alloc() failing is not fatal).
fixes PR 46284.

Revision 1.159 / (download) - annotate - [select for diffs], Sun Apr 8 11:27:45 2012 UTC (12 years ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Changes since 1.158: +8 -6 lines
Diff to previous 1.158 (colored) to selected 1.87 (colored)

Rework posix_spawn locking and memory management:
 - always provide a vmspace for the new proc, initially borrowing from proc0
   (this part fixes PR 46286)
 - increase parallelism between parent and child if arguments allow this,
   avoiding a potential deadlock on exec_lock
 - add a new flag for userland to request old (lockstepped) behaviour for
   better error reporting
 - adapt test cases to the previous two and add a new variant to test the
   diagnostics flag
 - fix a few memory (and lock) leaks
 - provide netbsd32 compat

Revision 1.158 / (download) - annotate - [select for diffs], Fri Apr 6 17:16:30 2012 UTC (12 years ago) by chs
Branch: MAIN
Changes since 1.157: +7 -4 lines
Diff to previous 1.157 (colored) to selected 1.87 (colored)

fix uarea_system_poolpage_free() to handle freeing a uarea
that was not allocated by cpu_uarea_alloc() (ie. on plaforms
where cpu_uarea_alloc() failing is not fatal).
fixes PR 46284.

Revision 1.152.2.2 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:52 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.152.2.1: +4 -5 lines
Diff to previous 1.152.2.1 (colored) to branchpoint 1.152 (colored) to selected 1.87 (colored)

sync to -current.

Revision 1.156.2.1 / (download) - annotate - [select for diffs], Mon Feb 20 21:54:57 2012 UTC (12 years, 1 month ago) by sborrill
Branch: netbsd-6
Changes since 1.156: +4 -5 lines
Diff to previous 1.156 (colored) to selected 1.87 (colored)

Pull up the following revisions(s) (requested by martin in ticket #14):
	include/spawn.h:		revision 1.2
	sys/kern/kern_exec.c:		revision 1.341
	sys/uvm/uvm_glue.c:		revision 1.157
	tests/lib/libc/gen/posix_spawn/t_fileactions.c:	revision 1.3

posix_spawn: fix kernel bug when passing empty fileactions (PR kern/46038)
and add a test case for this.  Fix potential race condition, doublefreeing
of memory and memory leaks in error cases.

Revision 1.157 / (download) - annotate - [select for diffs], Mon Feb 20 12:21:23 2012 UTC (12 years, 1 month ago) by martin
Branch: MAIN
CVS Tags: jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Changes since 1.156: +4 -5 lines
Diff to previous 1.156 (colored) to selected 1.87 (colored)

Solve previous fix (for early posix_spawn children exiting on error)
differently.

Revision 1.152.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:59 2012 UTC (12 years, 2 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.152: +6 -3 lines
Diff to previous 1.152 (colored) to selected 1.87 (colored)

merge to -current.

Revision 1.156 / (download) - annotate - [select for diffs], Sun Feb 12 11:18:04 2012 UTC (12 years, 2 months ago) by martin
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.155: +4 -2 lines
Diff to previous 1.155 (colored) to selected 1.87 (colored)

In uvm_proc_exit bail out early if we have no vmspace yet (as it happens
for failing posix_spawn child processes).
Fixes PR kern/45991.

Revision 1.155 / (download) - annotate - [select for diffs], Sat Feb 11 23:16:18 2012 UTC (12 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.154: +4 -3 lines
Diff to previous 1.154 (colored) to selected 1.87 (colored)

Add a posix_spawn syscall, as discussed on tech-kern.
Based on the summer of code project by Charles Zhang, heavily reworked
later by me - all bugs are likely mine.
Ok: core, releng.

Revision 1.154 / (download) - annotate - [select for diffs], Wed Feb 1 23:43:49 2012 UTC (12 years, 2 months ago) by para
Branch: MAIN
Changes since 1.153: +27 -10 lines
Diff to previous 1.153 (colored) to selected 1.87 (colored)

allocate uareas and buffers from kernel_map again
add code to drain pools if kmem_arena runs out of space

Revision 1.153 / (download) - annotate - [select for diffs], Fri Jan 27 19:48:41 2012 UTC (12 years, 2 months ago) by para
Branch: MAIN
Changes since 1.152: +12 -29 lines
Diff to previous 1.152 (colored) to selected 1.87 (colored)

extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged

Revision 1.152 / (download) - annotate - [select for diffs], Wed Nov 23 01:07:50 2011 UTC (12 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.151: +7 -2 lines
Diff to previous 1.151 (colored) to selected 1.87 (colored)

When allocating a page for a kernel stack and PMAP_ALLOC_POOLPAGE is
defined, use it.  (allows a MIPS N32 kernel to boot when there is memory
outside of KSEG0).

Revision 1.151 / (download) - annotate - [select for diffs], Sat Jul 2 01:26:29 2011 UTC (12 years, 9 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.150: +9 -4 lines
Diff to previous 1.150 (colored) to selected 1.87 (colored)

Allow the MD code to decide to panic if cpu_uarea_alloc would return NULL.
If NULL is returned, just allocate the standard way.

Revision 1.149.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:35 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.149: +8 -15 lines
Diff to previous 1.149 (colored) next main 1.150 (colored) to selected 1.87 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.150 / (download) - annotate - [select for diffs], Sun Jun 12 03:36:03 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.149: +8 -15 lines
Diff to previous 1.149 (colored) to selected 1.87 (colored)

Welcome to 5.99.53!  Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.

Revision 1.146.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:10:21 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.146: +64 -9 lines
Diff to previous 1.146 (colored) next main 1.147 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.144.2.4 / (download) - annotate - [select for diffs], Sat Mar 5 20:56:36 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.144.2.3: +69 -14 lines
Diff to previous 1.144.2.3 (colored) to branchpoint 1.144 (colored) next main 1.145 (colored) to selected 1.87 (colored)

sync with head

Revision 1.146.4.2 / (download) - annotate - [select for diffs], Sat Mar 5 15:10:52 2011 UTC (13 years, 1 month ago) by bouyer
Branch: bouyer-quota2
Changes since 1.146.4.1: +63 -3 lines
Diff to previous 1.146.4.1 (colored) to branchpoint 1.146 (colored) next main 1.147 (colored) to selected 1.87 (colored)

Sync with HEAD

Revision 1.149 / (download) - annotate - [select for diffs], Fri Feb 18 10:43:52 2011 UTC (13 years, 2 months ago) by drochner
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, bouyer-quota2-nbase
Branch point for: cherry-xenmp
Changes since 1.148: +7 -7 lines
Diff to previous 1.148 (colored) to selected 1.87 (colored)

make this build w/o HAVE_CPU_UAREA_ROUTINES

Revision 1.148 / (download) - annotate - [select for diffs], Thu Feb 17 19:27:13 2011 UTC (13 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.147: +63 -3 lines
Diff to previous 1.147 (colored) to selected 1.87 (colored)

Add support for cpu-specific uarea allocation routines.  Allows different
allocation for user and system lwps.  MIPS will use this to map uareas of
system lwp used direct-mapped addresses (to reduce the overhead of
switching to kernel threads).  ibm4xx could use to map uareas via direct
mapped addresses and avoid the problem of having the kernel stack not in
the TLB.

Revision 1.146.4.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:20:06 2011 UTC (13 years, 2 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.146: +3 -8 lines
Diff to previous 1.146 (colored) to selected 1.87 (colored)

Sync with HEAD

Revision 1.147 / (download) - annotate - [select for diffs], Wed Feb 2 15:25:27 2011 UTC (13 years, 2 months ago) by chuck
Branch: MAIN
CVS Tags: uebayasi-xip-base7, bouyer-quota2-base
Changes since 1.146: +3 -8 lines
Diff to previous 1.146 (colored) to selected 1.87 (colored)

udpate license clauses on my code to match the new-style BSD licenses.
based on second diff that rmind@ sent me.

no functional change with this commit.

Revision 1.146 / (download) - annotate - [select for diffs], Fri Jan 14 02:06:34 2011 UTC (13 years, 3 months ago) by rmind
Branch: MAIN
CVS Tags: jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.145: +7 -7 lines
Diff to previous 1.145 (colored) to selected 1.87 (colored)

Retire struct user, remove sys/user.h inclusions.  Note sys/user.h header
as obsolete.  Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.

Revision 1.126.2.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:55:16 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.126.2.4: +9 -4 lines
Diff to previous 1.126.2.4 (colored) to branchpoint 1.126 (colored) next main 1.127 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.144.2.3 / (download) - annotate - [select for diffs], Sun May 30 05:18:09 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.144.2.2: +9 -4 lines
Diff to previous 1.144.2.2 (colored) to branchpoint 1.144 (colored) to selected 1.87 (colored)

sync with head

Revision 1.143.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:37 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.143: +11 -5 lines
Diff to previous 1.143 (colored) next main 1.144 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.144.2.2 / (download) - annotate - [select for diffs], Sun Apr 25 15:27:38 2010 UTC (13 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.144.2.1: +8 -13 lines
Diff to previous 1.144.2.1 (colored) to branchpoint 1.144 (colored) to selected 1.87 (colored)

- Invent mm_md_getva() and mm_md_relva() routines, provided by MD and
  indicated with __HAVE_MM_MD_PREFER_VA.  It will be used to deal with
  cache aliasing issues and thus fix little MIPS, ARM and friends.

- Convert dev_mem_readwrite() to use unmanaged mappings.  Fix a missed
  offset addition in a case of direct map.  Sprinkle various comments in
  the memory device driver.

- Add missing direct map handling on hp700 and vax.  Make checks across
  m68k ports more consistent, reduce the diffs.  Fix kernacc check miss
  on news68k.  Minor off-by-one fix for alpha.  Add MEMC_PHYS_BASE for
  mmap() case check on acorn26.  Misc clean-up.

Revision 1.145 / (download) - annotate - [select for diffs], Fri Apr 16 03:21:49 2010 UTC (14 years ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, matt-mips64-premerge-20101231
Changes since 1.144: +9 -4 lines
Diff to previous 1.144 (colored) to selected 1.87 (colored)

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

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

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

Revision 1.144.2.1 / (download) - annotate - [select for diffs], Thu Mar 18 04:36:54 2010 UTC (14 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.144: +7 -9 lines
Diff to previous 1.144 (colored) to selected 1.87 (colored)

Unify /dev/{mem,kmem,zero,null} implementations in MI code.  Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.

Revision 1.126.2.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:46 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.126.2.3: +37 -457 lines
Diff to previous 1.126.2.3 (colored) to branchpoint 1.126 (colored) to selected 1.87 (colored)

sync with head

Revision 1.144 / (download) - annotate - [select for diffs], Thu Feb 25 23:10:49 2010 UTC (14 years, 1 month ago) by jym
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Changes since 1.143: +4 -3 lines
Diff to previous 1.143 (colored) to selected 1.87 (colored)

Change RSS (resident set size) limit. Instead of setting it arbitrarily
to the total free memory available to the system, use the smallest value
between VM_MAXUSER_ADDRESS and total free memory (having a RSS limit
bigger than VM_MAXUSER_ADDRESS has no real meaning).

Fix a possible int overflow when ptoa(uvmexp.free) is bigger than 4GB
with a 32 bits vaddr_t.

Reviewed by bouyer@.

See also http://mail-index.netbsd.org/tech-kern/2010/02/24/msg007395.html

Revision 1.143 / (download) - annotate - [select for diffs], Thu Dec 17 01:25:11 2009 UTC (14 years, 4 months ago) by rmind
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.142: +8 -6 lines
Diff to previous 1.142 (colored) to selected 1.87 (colored)

Replace few USER_TO_UAREA/UAREA_TO_USER uses, reduce sys/user.h inclusions.

Revision 1.142 / (download) - annotate - [select for diffs], Sat Nov 21 17:45:02 2009 UTC (14 years, 4 months ago) by rmind
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.141: +16 -2 lines
Diff to previous 1.141 (colored) to selected 1.87 (colored)

Add uvm_lwp_getuarea() and uvm_lwp_setuarea().  OK matt@.

Revision 1.141 / (download) - annotate - [select for diffs], Wed Oct 21 21:12:07 2009 UTC (14 years, 5 months ago) by rmind
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.140: +17 -454 lines
Diff to previous 1.140 (colored) to selected 1.87 (colored)

Remove uarea swap-out functionality:

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

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

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

Revision 1.126.2.3 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:35 2009 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.126.2.2: +43 -7 lines
Diff to previous 1.126.2.2 (colored) to branchpoint 1.126 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.140 / (download) - annotate - [select for diffs], Mon Aug 10 16:50:18 2009 UTC (14 years, 8 months ago) by matt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored) to selected 1.87 (colored)

Revent change to printf.  (why can't __func__ concat with other string?)

Revision 1.139 / (download) - annotate - [select for diffs], Sun Aug 9 22:19:09 2009 UTC (14 years, 8 months ago) by matt
Branch: MAIN
Changes since 1.138: +44 -8 lines
Diff to previous 1.138 (colored) to selected 1.87 (colored)

Only swapout uareas if VMSWAP_UAREA is defined (which is should be by default).
If it's not defined and PMAP_MAP_POOLPAGE is defined and USPACE == PAGE_SIZE,
then allocate/map USPACE via uvm_pagealloc/PMAP_MAP_POOLPAGE.

On platforms like MIPS with 16KB pages, this means that uareas (and hence lwp
kernel stacks) will be always be accessible since they will be KSEG0.

Revision 1.135.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:33:04 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.135.2.1: +5 -2 lines
Diff to previous 1.135.2.1 (colored) to branchpoint 1.135 (colored) next main 1.136 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.126.2.2 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:28 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.126.2.1: +5 -2 lines
Diff to previous 1.126.2.1 (colored) to branchpoint 1.126 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.138 / (download) - annotate - [select for diffs], Sun Jun 28 15:18:51 2009 UTC (14 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.137: +5 -2 lines
Diff to previous 1.137 (colored) to selected 1.87 (colored)

Ephemeral mapping (emap) implementation.  Concept is based on the idea that
activity of other threads will perform the TLB flush for the processes using
emap as a side effect.  To track that, global and per-CPU generation numbers
are used.  This idea was suggested by Andrew Doran; various improvements to
it by me.  Notes:

- For now, zero-copy on pipe is not yet enabled.
- TCP socket code would likely need more work.
- Additional UVM loaning improvements are needed.

Proposed on <tech-kern>, silence there.
Quickly reviewed by <ad>.

Revision 1.135.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:23:10 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.135: +5 -7 lines
Diff to previous 1.135 (colored) to selected 1.87 (colored)

Sync with HEAD.

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

Revision 1.126.2.1 / (download) - annotate - [select for diffs], Mon May 4 08:14:39 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.126: +22 -151 lines
Diff to previous 1.126 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.133.4.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:58 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.133.4.2: +5 -7 lines
Diff to previous 1.133.4.2 (colored) to branchpoint 1.133 (colored) next main 1.134 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.137 / (download) - annotate - [select for diffs], Thu Apr 16 00:17:19 2009 UTC (15 years ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Changes since 1.136: +3 -7 lines
Diff to previous 1.136 (colored) to selected 1.87 (colored)

Avoid few #ifdef KSTACK_CHECK_MAGIC.

Revision 1.133.6.1 / (download) - annotate - [select for diffs], Wed Apr 1 00:25:23 2009 UTC (15 years ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.133: +4 -2 lines
Diff to previous 1.133 (colored) next main 1.134 (colored) to selected 1.87 (colored)

Pull up following revision(s) (requested by mrg in ticket #622):
	bin/csh/csh.1: revision 1.46
	bin/csh/func.c: revision 1.37
	bin/ps/print.c: revision 1.111
	bin/ps/ps.c: revision 1.74
	bin/sh/miscbltin.c: revision 1.38
	bin/sh/sh.1: revision 1.92 via patch
	external/bsd/top/dist/machine/m_netbsd.c: revision 1.7
	lib/libkvm/kvm_proc.c: revision 1.82
	sys/arch/mips/mips/cpu_exec.c: revision 1.55
	sys/compat/darwin/darwin_exec.c: revision 1.57
	sys/compat/ibcs2/ibcs2_exec.c: revision 1.73
	sys/compat/irix/irix_resource.c: revision 1.15
	sys/compat/linux/arch/amd64/linux_exec_machdep.c: revision 1.16
	sys/compat/linux/arch/i386/linux_exec_machdep.c: revision 1.12
	sys/compat/linux/common/linux_limit.h: revision 1.5
	sys/compat/osf1/osf1_resource.c: revision 1.14
	sys/compat/svr4/svr4_resource.c: revision 1.18
	sys/compat/svr4_32/svr4_32_resource.c: revision 1.17
	sys/kern/exec_subr.c: revision 1.62
	sys/kern/init_sysctl.c: revision 1.160
	sys/kern/kern_exec.c: revision 1.288
	sys/kern/kern_resource.c: revision 1.151
	sys/sys/param.h: patch
	sys/sys/resource.h: revision 1.31
	sys/sys/sysctl.h: revision 1.184
	sys/uvm/uvm_extern.h: revision 1.153
	sys/uvm/uvm_glue.c: revision 1.136
	sys/uvm/uvm_mmap.c: revision 1.128
	usr.bin/systat/ps.c: revision 1.32
- - add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes.  this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.
- - adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.
- - add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)
- - patch sh, and csh to notice RLIMIT_AS.  (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)
- - patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.
- - update irix, svr4, svr4_32, linux and osf1 emulations to support
this information.  (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)
this addresses PR 7897.  it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.
tested on i386 and sparc64, build tested on several other platforms.
thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)

Revision 1.136 / (download) - annotate - [select for diffs], Sun Mar 29 01:02:51 2009 UTC (15 years ago) by mrg
Branch: MAIN
Changes since 1.135: +4 -2 lines
Diff to previous 1.135 (colored) to selected 1.87 (colored)

- add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes.  this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.

- adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.

- add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)

- patch sh, and csh to notice RLIMIT_AS.  (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)

- patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.

- update irix, svr4, svr4_32, linux and osf1 emulations to support
this information.  (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)


this addresses PR 7897.  it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.

tested on i386 and sparc64, build tested on several other platforms.

thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)

Revision 1.133.4.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:34:40 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.133.4.1: +3 -3 lines
Diff to previous 1.133.4.1 (colored) to branchpoint 1.133 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.135 / (download) - annotate - [select for diffs], Sat Jan 31 09:13:09 2009 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.134: +3 -3 lines
Diff to previous 1.134 (colored) to selected 1.87 (colored)

uvm_swapin: uncomment an assertion which is now ok.

Revision 1.133.4.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:20:36 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.133: +2 -126 lines
Diff to previous 1.133 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.117.6.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:43 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.117.6.4: +0 -124 lines
Diff to previous 1.117.6.4 (colored) to branchpoint 1.117 (colored) next main 1.118 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.133.2.1 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:42 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.133: +2 -126 lines
Diff to previous 1.133 (colored) next main 1.134 (colored) to selected 1.87 (colored)

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

Revision 1.134 / (download) - annotate - [select for diffs], Wed Nov 19 18:36:10 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.133: +2 -126 lines
Diff to previous 1.133 (colored) to selected 1.87 (colored)

Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime

Revision 1.126.4.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:37:06 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.126.4.1: +4 -2 lines
Diff to previous 1.126.4.1 (colored) to branchpoint 1.126 (colored) next main 1.127 (colored) to selected 1.87 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.117.6.4 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:21 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.117.6.3: +13 -3 lines
Diff to previous 1.117.6.3 (colored) to branchpoint 1.117 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.131.2.2 / (download) - annotate - [select for diffs], Fri Jun 27 15:11:55 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.131.2.1: +4 -2 lines
Diff to previous 1.131.2.1 (colored) next main 1.132 (colored) to selected 1.87 (colored)

Sync with head.

Revision 1.133 / (download) - annotate - [select for diffs], Wed Jun 25 19:20:56 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base, netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5, haad-dm
Changes since 1.132: +4 -2 lines
Diff to previous 1.132 (colored) to selected 1.87 (colored)

Don't swap kernel stacks of realtime threads.

Revision 1.126.4.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:32:06 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.126: +16 -21 lines
Diff to previous 1.126 (colored) to selected 1.87 (colored)

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

Revision 1.131.2.1 / (download) - annotate - [select for diffs], Wed Jun 18 16:33:59 2008 UTC (15 years, 10 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.131: +9 -3 lines
Diff to previous 1.131 (colored) to selected 1.87 (colored)

Sync with head.

Revision 1.124.2.3 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:17 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.124.2.2: +13 -20 lines
Diff to previous 1.124.2.2 (colored) to branchpoint 1.124 (colored) next main 1.125 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.132 / (download) - annotate - [select for diffs], Mon Jun 16 10:19:57 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Changes since 1.131: +9 -3 lines
Diff to previous 1.131 (colored) to selected 1.87 (colored)

uvm_swapout: try to lock the vm_map before calling pmap_collect.

Revision 1.131 / (download) - annotate - [select for diffs], Mon Jun 9 11:52:34 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Branch point for: simonb-wapbl
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored) to selected 1.87 (colored)

swappable: invert previous so we check for SACTIVE or SSTOP.

Revision 1.130 / (download) - annotate - [select for diffs], Mon Jun 9 11:51:43 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.129: +4 -2 lines
Diff to previous 1.129 (colored) to selected 1.87 (colored)

swappable: return false if l->l_proc->p_stat == SDYING.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Jun 9 11:49:54 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.128: +4 -4 lines
Diff to previous 1.128 (colored) to selected 1.87 (colored)

uvm_proc_exit: use macros to disable preemption.

Revision 1.117.6.3 / (download) - annotate - [select for diffs], Thu Jun 5 19:14:38 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.117.6.2: +0 -15 lines
Diff to previous 1.117.6.2 (colored) to branchpoint 1.117 (colored) to selected 1.87 (colored)

Sync with HEAD.

Also fix build.

Revision 1.128 / (download) - annotate - [select for diffs], Wed Jun 4 12:45:28 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.127: +2 -17 lines
Diff to previous 1.127 (colored) to selected 1.87 (colored)

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

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

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

Revision 1.124.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:54 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.124.2.1: +5 -3 lines
Diff to previous 1.124.2.1 (colored) to branchpoint 1.124 (colored) to selected 1.87 (colored)

sync with head

Revision 1.117.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:37 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.117.6.1: +27 -24 lines
Diff to previous 1.117.6.1 (colored) to branchpoint 1.117 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.127 / (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-base3
Changes since 1.126: +5 -3 lines
Diff to previous 1.126 (colored) to selected 1.87 (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.124.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:56 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.124: +13 -11 lines
Diff to previous 1.124 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.126 / (download) - annotate - [select for diffs], Sun Apr 27 11:39:46 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, yamt-nfs-mp-base, hpcarm-cleanup-nbase
Branch point for: yamt-nfs-mp, wrstuden-revivesa
Changes since 1.125: +4 -2 lines
Diff to previous 1.125 (colored) to selected 1.87 (colored)

Disable preemption while swapping pmap.

Revision 1.125 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:31 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.124: +11 -11 lines
Diff to previous 1.124 (colored) to selected 1.87 (colored)

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

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

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

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

Revision 1.124 / (download) - annotate - [select for diffs], Fri Apr 11 15:47:15 2008 UTC (16 years ago) by yamt
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.123: +3 -3 lines
Diff to previous 1.123 (colored) to selected 1.87 (colored)

fix the order of printf arguments.

Revision 1.123 / (download) - annotate - [select for diffs], Fri Apr 11 15:31:37 2008 UTC (16 years ago) by christos
Branch: MAIN
Changes since 1.122: +15 -16 lines
Diff to previous 1.122 (colored) to selected 1.87 (colored)

- use uarea_swapin, rather than duplicating the code.
- use __func__ where appropriate.

Revision 1.117.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:14 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.117: +5 -9 lines
Diff to previous 1.117 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Mar 29 20:40:52 2008 UTC (16 years ago) by christos
Branch: MAIN
Changes since 1.121: +4 -4 lines
Diff to previous 1.121 (colored) to selected 1.87 (colored)

make this compile

Revision 1.121 / (download) - annotate - [select for diffs], Sat Mar 29 20:15:54 2008 UTC (16 years ago) by dholland
Branch: MAIN
Changes since 1.120: +3 -3 lines
Diff to previous 1.120 (colored) to selected 1.87 (colored)

Fix broken build. hi skrll :-)

Revision 1.120 / (download) - annotate - [select for diffs], Sat Mar 29 18:49:13 2008 UTC (16 years ago) by skrll
Branch: MAIN
Changes since 1.119: +3 -5 lines
Diff to previous 1.119 (colored) to selected 1.87 (colored)

Fix unsed variable when DEBUG isn't defined.

Revision 1.119 / (download) - annotate - [select for diffs], Thu Mar 27 19:06:52 2008 UTC (16 years ago) by ad
Branch: MAIN
Changes since 1.118: +3 -3 lines
Diff to previous 1.118 (colored) to selected 1.87 (colored)

Make rusage collection per-LWP and collate in the appropriate places.
cloned threads need a little bit more work but the locking needs to
be fixed first.

Revision 1.117.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:33 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.117: +3 -5 lines
Diff to previous 1.117 (colored) next main 1.118 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.111.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:13 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.111.2.2: +75 -92 lines
Diff to previous 1.111.2.2 (colored) to branchpoint 1.111 (colored) next main 1.112 (colored) to selected 1.87 (colored)

sync with HEAD

Revision 1.89.2.10 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:52 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.89.2.9: +3 -5 lines
Diff to previous 1.89.2.9 (colored) to branchpoint 1.89 (colored) next main 1.90 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.118 / (download) - annotate - [select for diffs], Fri Feb 29 12:08:04 2008 UTC (16 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.117: +3 -5 lines
Diff to previous 1.117 (colored) to selected 1.87 (colored)

update comment

Revision 1.112.6.2 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:33 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.112.6.1: +85 -96 lines
Diff to previous 1.112.6.1 (colored) to branchpoint 1.112 (colored) next main 1.113 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.89.2.9 / (download) - annotate - [select for diffs], Mon Feb 11 15:00:10 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.89.2.8: +15 -7 lines
Diff to previous 1.89.2.8 (colored) to branchpoint 1.89 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.117 / (download) - annotate - [select for diffs], Fri Feb 8 11:49:40 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.116: +7 -5 lines
Diff to previous 1.116 (colored) to selected 1.87 (colored)

uvm_uarea_init: fix compilation where PAGE_SIZE is not a constant. (sparc)
reported by Tom Spindler.

Revision 1.116 / (download) - annotate - [select for diffs], Thu Feb 7 12:21:24 2008 UTC (16 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.115: +9 -3 lines
Diff to previous 1.115 (colored) to selected 1.87 (colored)

uvm_uarea_init: make #if about PR_NOALIGN clearer and add a comment
to explain it.

Revision 1.89.2.8 / (download) - annotate - [select for diffs], Mon Feb 4 09:25:09 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.89.2.7: +66 -89 lines
Diff to previous 1.89.2.7 (colored) to branchpoint 1.89 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.115 / (download) - annotate - [select for diffs], Mon Jan 28 12:22:47 2008 UTC (16 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.114: +66 -89 lines
Diff to previous 1.114 (colored) to selected 1.87 (colored)

remove a special allocator for uareas, which is no longer necessary.
use pool_cache instead.

Revision 1.89.2.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:48:21 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.89.2.6: +13 -9 lines
Diff to previous 1.89.2.6 (colored) to branchpoint 1.89 (colored) to selected 1.87 (colored)

sync with head

Revision 1.111.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:58:40 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.111.2.1: +13 -9 lines
Diff to previous 1.111.2.1 (colored) to branchpoint 1.111 (colored) to selected 1.87 (colored)

sync with HEAD

Revision 1.113.6.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:58:37 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.113: +13 -9 lines
Diff to previous 1.113 (colored) next main 1.114 (colored) to selected 1.87 (colored)

Sync with HEAD

Revision 1.114 / (download) - annotate - [select for diffs], Wed Jan 2 11:49:16 2008 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.113: +13 -9 lines
Diff to previous 1.113 (colored) to selected 1.87 (colored)

Merge vmlocking2 to head.

Revision 1.113.2.2 / (download) - annotate - [select for diffs], Sat Dec 15 00:26:55 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking2
Changes since 1.113.2.1: +13 -9 lines
Diff to previous 1.113.2.1 (colored) to branchpoint 1.113 (colored) next main 1.114 (colored) to selected 1.87 (colored)

uvm_lwp_hold, uvm_lwp_rele: use atomic ops to avoid lock order problems.

Revision 1.113.2.1 / (download) - annotate - [select for diffs], Tue Dec 4 13:03:59 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking2
Changes since 1.113: +6 -6 lines
Diff to previous 1.113 (colored) to selected 1.87 (colored)

Pull the vmlocking changes into a new branch.

Revision 1.112.6.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:49:38 2007 UTC (16 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.112: +6 -11 lines
Diff to previous 1.112 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.89.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:45:38 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.89.2.5: +6 -11 lines
Diff to previous 1.89.2.5 (colored) to branchpoint 1.89 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.112.4.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:03:33 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.112: +6 -11 lines
Diff to previous 1.112 (colored) next main 1.113 (colored) to selected 1.87 (colored)

Sync with HEAD

Revision 1.111.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:35:28 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.111: +7 -12 lines
Diff to previous 1.111 (colored) to selected 1.87 (colored)

sync with HEAD

Revision 1.108.6.3 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:42 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.108.6.2: +6 -11 lines
Diff to previous 1.108.6.2 (colored) to branchpoint 1.108 (colored) next main 1.109 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.113 / (download) - annotate - [select for diffs], Tue Nov 6 00:42:46 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, jmcneill-base, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.112: +6 -11 lines
Diff to previous 1.112 (colored) to selected 1.87 (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.104.2.13 / (download) - annotate - [select for diffs], Mon Nov 5 16:53:52 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.104.2.12: +3 -2 lines
Diff to previous 1.104.2.12 (colored) next main 1.105 (colored) to selected 1.87 (colored)

uvm_scheduler: set curlwp->l_class = SCHED_FIFO so that the swapper does
not get its priority adjusted by the scheduler. This is a special case
since init inherits via fork() and we can only adjust the swapper after.

Revision 1.104.2.12 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:28 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.104.2.11: +2 -3 lines
Diff to previous 1.104.2.11 (colored) to selected 1.87 (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.89.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:53 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.89.2.4: +3 -3 lines
Diff to previous 1.89.2.4 (colored) to branchpoint 1.89 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.104.2.11 / (download) - annotate - [select for diffs], Sat Oct 27 09:18:54 2007 UTC (16 years, 5 months ago) by yamt
Branch: vmlocking
Changes since 1.104.2.10: +4 -4 lines
Diff to previous 1.104.2.10 (colored) to selected 1.87 (colored)

fix priorities for some kernel threads.  advised and ok'ed by Andrew Doran.

Revision 1.104.2.10 / (download) - annotate - [select for diffs], Thu Oct 18 22:45:54 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.104.2.9: +4 -9 lines
Diff to previous 1.104.2.9 (colored) to selected 1.87 (colored)

Free uareas back to the uarea cache on the CPU where they were last used.

Revision 1.104.2.9 / (download) - annotate - [select for diffs], Tue Oct 9 13:45:18 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.104.2.8: +3 -3 lines
Diff to previous 1.104.2.8 (colored) to selected 1.87 (colored)

Sync with head.

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

Sync with HEAD.

Revision 1.112 / (download) - annotate - [select for diffs], Fri Sep 21 00:18:35 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base
Branch point for: mjf-devfs, bouyer-xenamd64
Changes since 1.111: +3 -3 lines
Diff to previous 1.111 (colored) to selected 1.87 (colored)

uvm_swapin: disable the swaplock assertion. uvm_lwp_hold() can't take
the lock yet.

Revision 1.108.6.1 / (download) - annotate - [select for diffs], Mon Sep 3 16:49:16 2007 UTC (16 years, 7 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.108: +87 -40 lines
Diff to previous 1.108 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.89.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:47:06 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.89.2.3: +189 -77 lines
Diff to previous 1.89.2.3 (colored) to branchpoint 1.89 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.108.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 10:24:25 2007 UTC (16 years, 7 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.108: +87 -40 lines
Diff to previous 1.108 (colored) next main 1.109 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.104.2.8 / (download) - annotate - [select for diffs], Mon Aug 20 21:28:31 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.104.2.7: +87 -42 lines
Diff to previous 1.104.2.7 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.111 / (download) - annotate - [select for diffs], Sat Aug 18 10:07:55 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base5
Branch point for: matt-armv6
Changes since 1.110: +3 -4 lines
Diff to previous 1.110 (colored) to selected 1.87 (colored)

Include sys/cpu.h for CPU_INFO_FOREACH.

Revision 1.110 / (download) - annotate - [select for diffs], Sat Aug 18 00:31:32 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.109: +5 -4 lines
Diff to previous 1.109 (colored) to selected 1.87 (colored)

Fix error in previous.

Revision 1.109 / (download) - annotate - [select for diffs], Sat Aug 18 00:21:11 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.108: +83 -36 lines
Diff to previous 1.108 (colored) to selected 1.87 (colored)

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

Revision 1.108 / (download) - annotate - [select for diffs], Sat Jul 14 22:27:15 2007 UTC (16 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.107: +2 -4 lines
Diff to previous 1.107 (colored) to selected 1.87 (colored)

Revert unintentially committed change.

Revision 1.104.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:12:55 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.104: +114 -47 lines
Diff to previous 1.104 (colored) next main 1.105 (colored) to selected 1.87 (colored)

Sync with head.

Revision 1.107 / (download) - annotate - [select for diffs], Mon Jul 9 21:11:36 2007 UTC (16 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: mjf-ufs-trans-base
Changes since 1.106: +96 -38 lines
Diff to previous 1.106 (colored) to selected 1.87 (colored)

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

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

Revision 1.104.2.7 / (download) - annotate - [select for diffs], Fri Jun 8 14:18:21 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.104.2.6: +17 -10 lines
Diff to previous 1.104.2.6 (colored) to selected 1.87 (colored)

Sync with head.

Revision 1.106 / (download) - annotate - [select for diffs], Thu May 17 14:51:43 2007 UTC (16 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.105: +18 -9 lines
Diff to previous 1.105 (colored) to selected 1.87 (colored)

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

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

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

Revision 1.99.2.6 / (download) - annotate - [select for diffs], Thu Apr 19 04:11:40 2007 UTC (17 years ago) by ad
Branch: yamt-idlelwp
Changes since 1.99.2.5: +16 -7 lines
Diff to previous 1.99.2.5 (colored) next main 1.100 (colored) to selected 1.87 (colored)

Don't swap out threads blocked on a turnstile, to avoid deadlock.

Revision 1.99.2.5 / (download) - annotate - [select for diffs], Sun Apr 15 16:04:09 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.99.2.4: +4 -4 lines
Diff to previous 1.99.2.4 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.104.2.6 / (download) - annotate - [select for diffs], Tue Apr 10 15:41:42 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.104.2.5: +6 -3 lines
Diff to previous 1.104.2.5 (colored) to selected 1.87 (colored)

Don't swap out threads blocked on a turnstile, to avoid deadlock.
It doesn't make a lot of sense, anyhow.

Revision 1.104.2.5 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:56 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.104.2.4: +4 -4 lines
Diff to previous 1.104.2.4 (colored) to selected 1.87 (colored)

Sync with head.

Revision 1.104.2.4 / (download) - annotate - [select for diffs], Mon Apr 9 22:10:08 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.104.2.3: +4 -3 lines
Diff to previous 1.104.2.3 (colored) to selected 1.87 (colored)

- Add two new arguments to kthread_create1: pri_t pri, bool mpsafe.
- Fork kthreads off proc0 as new LWPs, not new processes.

Revision 1.104.2.3 / (download) - annotate - [select for diffs], Thu Apr 5 21:32:52 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.104.2.2: +89 -33 lines
Diff to previous 1.104.2.2 (colored) to selected 1.87 (colored)

- Put a per-LWP lock around swapin / swapout.
- Replace use of lockmgr().
- Minor locking fixes and assertions.
- uvm_map.h no longer pulls in proc.h, etc.
- Use kpause where appropriate.

Revision 1.104.6.1 / (download) - annotate - [select for diffs], Thu Mar 29 19:28:04 2007 UTC (17 years ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.104: +4 -4 lines
Diff to previous 1.104 (colored) next main 1.105 (colored) to selected 1.87 (colored)

Pullup to -current

Revision 1.105 / (download) - annotate - [select for diffs], Sat Mar 24 21:15:39 2007 UTC (17 years ago) by rmind
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Changes since 1.104: +4 -4 lines
Diff to previous 1.104 (colored) to selected 1.87 (colored)

Export uvm_uarea_free() to the rest.
Make things compile again.

Revision 1.104.2.2 / (download) - annotate - [select for diffs], Wed Mar 21 20:10:18 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.104.2.1: +3 -3 lines
Diff to previous 1.104.2.1 (colored) to selected 1.87 (colored)

GC the simplelock/spinlock debugging stuff.

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

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

Requested by yamt@

Revision 1.104.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 17:51:55 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.104: +20 -20 lines
Diff to previous 1.104 (colored) to selected 1.87 (colored)

Pull in the initial set of changes for the vmlocking branch.

Revision 1.99.2.3 / (download) - annotate - [select for diffs], Mon Mar 12 06:01:12 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.99.2.2: +4 -4 lines
Diff to previous 1.99.2.2 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.104 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:48 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.103: +4 -4 lines
Diff to previous 1.103 (colored) to selected 1.87 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.99.2.2 / (download) - annotate - [select for diffs], Tue Feb 27 16:55:26 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.99.2.1: +25 -22 lines
Diff to previous 1.99.2.1 (colored) to selected 1.87 (colored)

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

Revision 1.89.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:12:28 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.89.2.2: +138 -92 lines
Diff to previous 1.89.2.2 (colored) to branchpoint 1.89 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.103 / (download) - annotate - [select for diffs], Thu Feb 22 06:05:01 2007 UTC (17 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.102: +10 -10 lines
Diff to previous 1.102 (colored) to selected 1.87 (colored)

TRUE -> true, FALSE -> false

Revision 1.102 / (download) - annotate - [select for diffs], Wed Feb 21 23:00:13 2007 UTC (17 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.101: +7 -7 lines
Diff to previous 1.101 (colored) to selected 1.87 (colored)

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

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

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

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

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

Note: further work will go soon.

Revision 1.101 / (download) - annotate - [select for diffs], Mon Feb 19 01:35:20 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.100: +5 -2 lines
Diff to previous 1.100 (colored) to selected 1.87 (colored)

uvm_kick_scheduler(): do nothing until the swap subsystem is initialized.

Revision 1.100 / (download) - annotate - [select for diffs], Sat Feb 17 22:31:45 2007 UTC (17 years, 2 months ago) by pavel
Branch: MAIN
Changes since 1.99: +10 -10 lines
Diff to previous 1.99 (colored) to selected 1.87 (colored)

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.

Revision 1.99 / (download) - annotate - [select for diffs], Thu Feb 15 20:21:13 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.98: +87 -59 lines
Diff to previous 1.98 (colored) to selected 1.87 (colored)

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

Revision 1.98 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:43 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.97: +37 -22 lines
Diff to previous 1.97 (colored) to selected 1.87 (colored)

Merge newlock2 to head.

Revision 1.89.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:51:05 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.89.2.1: +9 -6 lines
Diff to previous 1.89.2.1 (colored) to branchpoint 1.89 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.96.2.6 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:45 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.96.2.5: +9 -9 lines
Diff to previous 1.96.2.5 (colored) to branchpoint 1.96 (colored) next main 1.97 (colored) to selected 1.87 (colored)

Checkpoint work in progress.

Revision 1.96.2.5 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:50 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.96.2.4: +6 -6 lines
Diff to previous 1.96.2.4 (colored) to branchpoint 1.96 (colored) to selected 1.87 (colored)

Sync with head.

Revision 1.96.2.4 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:40 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.96.2.3: +32 -18 lines
Diff to previous 1.96.2.3 (colored) to branchpoint 1.96 (colored) to selected 1.87 (colored)

Checkpoint work in progress.

Revision 1.96.2.3 / (download) - annotate - [select for diffs], Tue Oct 24 21:10:23 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.96.2.2: +3 -3 lines
Diff to previous 1.96.2.2 (colored) to branchpoint 1.96 (colored) to selected 1.87 (colored)

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

Revision 1.96.4.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:52 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.96: +6 -6 lines
Diff to previous 1.96 (colored) next main 1.97 (colored) to selected 1.87 (colored)

sync with head

Revision 1.96.2.2 / (download) - annotate - [select for diffs], Sat Oct 21 15:20:47 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.96.2.1: +14 -13 lines
Diff to previous 1.96.2.1 (colored) to branchpoint 1.96 (colored) to selected 1.87 (colored)

Checkpoint work in progress on locking and per-LWP signals. Very much a
a work in progress and there is still a lot to do.

Revision 1.97 / (download) - annotate - [select for diffs], Thu Oct 5 14:48:33 2006 UTC (17 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.96: +6 -6 lines
Diff to previous 1.96 (colored) to selected 1.87 (colored)

add support for O_DIRECT (I/O directly to application memory,
bypassing any kernel caching for file data).

Revision 1.96.2.1 / (download) - annotate - [select for diffs], Mon Sep 11 18:19:09 2006 UTC (17 years, 7 months ago) by ad
Branch: newlock2
Changes since 1.96: +6 -6 lines
Diff to previous 1.96 (colored) to selected 1.87 (colored)

- Allocate and free turnstiles where needed.
- Split proclist_mutex and alllwp_mutex out of the proclist_lock,
  and use in interrupt context.
- Fix an MP race in enterpgrp()/setsid().
- Acquire proclist_lock and p_crmutex in some obvious places.

Revision 1.92.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 03:00:13 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.92: +27 -23 lines
Diff to previous 1.92 (colored) next main 1.93 (colored) to selected 1.87 (colored)

sync with head

Revision 1.92.8.4 / (download) - annotate - [select for diffs], Sun Sep 3 15:26:08 2006 UTC (17 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.92.8.3: +5 -2 lines
Diff to previous 1.92.8.3 (colored) to branchpoint 1.92 (colored) next main 1.93 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.96 / (download) - annotate - [select for diffs], Tue Aug 29 23:34:48 2006 UTC (17 years, 7 months ago) by matt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.95: +5 -2 lines
Diff to previous 1.95 (colored) to selected 1.87 (colored)

Make PTRACE and COREDUMP optional.  Make the default (status quo) by putting
them in conf/std.

Revision 1.92.8.3 / (download) - annotate - [select for diffs], Mon Jun 26 12:55:08 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.92.8.2: +3 -3 lines
Diff to previous 1.92.8.2 (colored) to branchpoint 1.92 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.89.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:12:40 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.89: +25 -25 lines
Diff to previous 1.89 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.93.4.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:11:44 2006 UTC (17 years, 10 months ago) by chap
Branch: chap-midi
Changes since 1.93: +21 -19 lines
Diff to previous 1.93 (colored) next main 1.94 (colored) to selected 1.87 (colored)

Sync with head.

Revision 1.95 / (download) - annotate - [select for diffs], Tue Jun 13 13:22:06 2006 UTC (17 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.94: +1 -1 lines
Diff to previous 1.94 (colored) to selected 1.87 (colored)

uvm_swapin: process -> lwp in a comment.

Revision 1.92.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:39:45 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.92.6.1: +20 -18 lines
Diff to previous 1.92.6.1 (colored) to branchpoint 1.92 (colored) next main 1.93 (colored) to selected 1.87 (colored)

Sync with head.

Revision 1.93.2.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:48 2006 UTC (17 years, 10 months ago) by tron
Branch: peter-altq
Changes since 1.93: +20 -18 lines
Diff to previous 1.93 (colored) next main 1.94 (colored) to selected 1.87 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.92.8.2 / (download) - annotate - [select for diffs], Wed May 24 10:59:30 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.92.8.1: +20 -18 lines
Diff to previous 1.92.8.1 (colored) to branchpoint 1.92 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.94 / (download) - annotate - [select for diffs], Mon May 22 13:43:54 2006 UTC (17 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base
Changes since 1.93: +20 -18 lines
Diff to previous 1.93 (colored) to selected 1.87 (colored)

introduce macros, UAREA_TO_USER and USER_TO_UAREA,
to convert uarea VA into a pointer to struct user and vice versa,
so that MD code can change the layout in uarea.

Revision 1.92.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:28 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.92: +6 -7 lines
Diff to previous 1.92 (colored) to selected 1.87 (colored)

Sync with head.

Revision 1.92.10.1 / (download) - annotate - [select for diffs], Wed Apr 19 03:58:21 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.92: +6 -7 lines
Diff to previous 1.92 (colored) next main 1.93 (colored) to selected 1.87 (colored)

oops - *really* sync to head this time.

Revision 1.92.8.1 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:58 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.92: +6 -7 lines
Diff to previous 1.92 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.93 / (download) - annotate - [select for diffs], Wed Mar 15 18:09:25 2006 UTC (18 years, 1 month ago) by drochner
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, peter-altq-base, elad-kernelauth-base
Branch point for: peter-altq, chap-midi
Changes since 1.92: +6 -7 lines
Diff to previous 1.92 (colored) to selected 1.87 (colored)

-clean up the interface to uvm_fault: the "fault type" didn't serve
 any purpose (done by a macro, so we don't save any cycles for now)
-kill vm_fault_t; it is not needed for real faults, and for simulated
 faults (wiring) it can be replaced by UVM internal flags
-remove <uvm/uvm_fault.h> from uvm_extern.h again

Revision 1.92 / (download) - annotate - [select for diffs], Sat Dec 24 23:41:34 2005 UTC (18 years, 3 months ago) by perry
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base2, yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, elad-kernelauth
Changes since 1.91: +3 -3 lines
Diff to previous 1.91 (colored) to selected 1.87 (colored)

__inline__ -> inline

Revision 1.91 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:29 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored) to selected 1.87 (colored)

merge ktrace-lwp.

Revision 1.83.4.3 / (download) - annotate - [select for diffs], Tue Dec 6 20:00:12 2005 UTC (18 years, 4 months ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.83.4.2: +4 -3 lines
Diff to previous 1.83.4.2 (colored) to branchpoint 1.83 (colored) next main 1.84 (colored) to selected 1.87 (colored)

Apply patch (requested by yamt in ticket #1015):
	sys/uvm/uvm_glue.c: patch
	sys/uvm/uvm_km.c: patch
- correct a return value of uvm_km_valloc1 in the case of failure.
- do waitok allocation for uvm_uarea_alloc so that it won't fail on
  temporary memory shortage.

Revision 1.66.2.8 / (download) - annotate - [select for diffs], Thu Nov 10 14:12:39 2005 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.66.2.7: +77 -59 lines
Diff to previous 1.66.2.7 (colored) next main 1.67 (colored) to selected 1.87 (colored)

Sync with HEAD. Here we go again...

Revision 1.78.6.1 / (download) - annotate - [select for diffs], Sun Nov 6 00:24:20 2005 UTC (18 years, 5 months ago) by riz
Branch: netbsd-2-1
Changes since 1.78: +2 -3 lines
Diff to previous 1.78 (colored) next main 1.79 (colored) to selected 1.87 (colored)

Pull up following revision(s) (requested by bouyer in ticket #5965):
	sys/uvm/uvm_glue.c: revision 1.90
remove the assertion in uvm_swapout_threads() about LSONPROC lwps
not running on the same CPU as the swapper.  l_stat is protected by
sched_lock, which isn't held here, so we can race with that lwp
starting to run and see its l_cpu not updated yet, as in PR 31870.
we check l_stat again in uvm_swapout() while holding sched_lock,
so the race itself is harmless.

Revision 1.78.2.1 / (download) - annotate - [select for diffs], Sun Nov 6 00:24:19 2005 UTC (18 years, 5 months ago) by riz
Branch: netbsd-2-0
Changes since 1.78: +2 -3 lines
Diff to previous 1.78 (colored) next main 1.79 (colored) to selected 1.87 (colored)

Pull up following revision(s) (requested by bouyer in ticket #5965):
	sys/uvm/uvm_glue.c: revision 1.90
remove the assertion in uvm_swapout_threads() about LSONPROC lwps
not running on the same CPU as the swapper.  l_stat is protected by
sched_lock, which isn't held here, so we can race with that lwp
starting to run and see its l_cpu not updated yet, as in PR 31870.
we check l_stat again in uvm_swapout() while holding sched_lock,
so the race itself is harmless.

Revision 1.78.4.1 / (download) - annotate - [select for diffs], Sun Nov 6 00:24:15 2005 UTC (18 years, 5 months ago) by riz
Branch: netbsd-2
Changes since 1.78: +2 -3 lines
Diff to previous 1.78 (colored) next main 1.79 (colored) to selected 1.87 (colored)

Pull up following revision(s) (requested by bouyer in ticket #5965):
	sys/uvm/uvm_glue.c: revision 1.90
remove the assertion in uvm_swapout_threads() about LSONPROC lwps
not running on the same CPU as the swapper.  l_stat is protected by
sched_lock, which isn't held here, so we can race with that lwp
starting to run and see its l_cpu not updated yet, as in PR 31870.
we check l_stat again in uvm_swapout() while holding sched_lock,
so the race itself is harmless.

Revision 1.83.4.2 / (download) - annotate - [select for diffs], Fri Oct 28 19:49:21 2005 UTC (18 years, 5 months ago) by jmc
Branch: netbsd-3
CVS Tags: netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1
Changes since 1.83.4.1: +2 -3 lines
Diff to previous 1.83.4.1 (colored) to branchpoint 1.83 (colored) to selected 1.87 (colored)

Pullup rev 1.90 (requested by chs in ticket #914)
 Remove the assertion in uvm_swapout_threads() about LSONPROC lwps
 not running on the same CPU as the swapper. l_stat is protected by
 sched_lock, which isn't held here, so we can race with that lwp
 starting to run and see its l_cpu not updated yet, as in PR 31870.
 we check l_stat again in uvm_swapout() while holding sched_lock,
 so the race itself is harmless.

Revision 1.89.4.1 / (download) - annotate - [select for diffs], Wed Oct 26 08:32:52 2005 UTC (18 years, 5 months ago) by yamt
Branch: yamt-vop
Changes since 1.89: +2 -3 lines
Diff to previous 1.89 (colored) next main 1.90 (colored) to selected 1.87 (colored)

sync with head

Revision 1.90 / (download) - annotate - [select for diffs], Mon Oct 24 00:26:37 2005 UTC (18 years, 5 months ago) by chs
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, ktrace-lwp-base
Changes since 1.89: +2 -3 lines
Diff to previous 1.89 (colored) to selected 1.87 (colored)

remove the assertion in uvm_swapout_threads() about LSONPROC lwps
not running on the same CPU as the swapper.  l_stat is protected by
sched_lock, which isn't held here, so we can race with that lwp
starting to run and see its l_cpu not updated yet, as in PR 31870.
we check l_stat again in uvm_swapout() while holding sched_lock,
so the race itself is harmless.

Revision 1.89 / (download) - annotate - [select for diffs], Mon Jun 27 02:19:48 2005 UTC (18 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-vop-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-vop, yamt-lazymbuf
Changes since 1.88: +18 -43 lines
Diff to previous 1.88 (colored) to selected 1.87 (colored)

Use ANSI function decls.

Revision 1.88 / (download) - annotate - [select for diffs], Fri Jun 10 05:10:13 2005 UTC (18 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.87: +6 -8 lines
Diff to previous 1.87 (colored)

Rework the coredump code to have no explicit knownledge of how coredump
i/o is done.  Instead, pass an opaque cookie which is then passed to a
new routine, coredump_write, which does the actual i/o.  This allows the
method of doing i/o to change without affecting any future MD code.
Also, make netbsd32_core.c [re]use core_netbsd.c (in a similar manner that
core_elf64.c uses core_elf32.c) and eliminate that code duplication.
cpu_coredump{,32} is now called twice, first with a NULL iocookie to fill
the core structure and a second to actually write md parts of the coredump.
All i/o is nolonger random access and is suitable for shipping over a stream.

Revision 1.87 / (download) - annotate - [selected], Tue Jun 7 22:02:48 2005 UTC (18 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.86: +3 -2 lines
Diff to previous 1.86 (colored)

Make sure state.end has a valid initial value.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Jun 2 17:01:44 2005 UTC (18 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.85: +57 -16 lines
Diff to previous 1.85 (colored) to selected 1.87 (colored)

When writing coredumps, don't write zero uninstantiated demand-zero pages.
Also, with ELF core dumps, trim trailing zeroes from sections.  These two
changes can shrink coredumps by over 50% in size.

Revision 1.83.4.1 / (download) - annotate - [select for diffs], Sun May 22 19:39:28 2005 UTC (18 years, 10 months ago) by snj
Branch: netbsd-3
Changes since 1.83: +7 -2 lines
Diff to previous 1.83 (colored) to selected 1.87 (colored)

Pull up revision 1.85 (requested by nathanw in ticket #322):
uvm_coredump_walkmap(): Set UVM_COREDUMP_NODUMP on regions whose
protection does not include VM_PROT_READ, so that the core dumping
doesn't error out with EFAULT when trying to write that region.
Addresses PR kern/30143; approach suggested by chs@.

Revision 1.85 / (download) - annotate - [select for diffs], Fri May 6 19:34:47 2005 UTC (18 years, 11 months ago) by nathanw
Branch: MAIN
Changes since 1.84: +7 -2 lines
Diff to previous 1.84 (colored) to selected 1.87 (colored)

uvm_coredump_walkmap(): Set UVM_COREDUMP_NODUMP on regions whose
protection does not include VM_PROT_READ, so that the core dumping
doesn't error out with EFAULT when trying to write that region.

Addresses PR kern/30143; approach suggested by chs@.

Revision 1.81.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:44 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.81: +31 -28 lines
Diff to previous 1.81 (colored) next main 1.82 (colored) to selected 1.87 (colored)

sync with -current

Revision 1.66.2.7 / (download) - annotate - [select for diffs], Fri Apr 1 14:32:12 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.66.2.6: +5 -4 lines
Diff to previous 1.66.2.6 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.84 / (download) - annotate - [select for diffs], Fri Apr 1 11:59:38 2005 UTC (19 years ago) by yamt
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.83: +5 -4 lines
Diff to previous 1.83 (colored) to selected 1.87 (colored)

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.

Revision 1.82.2.2 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:56 2005 UTC (19 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.82.2.1: +3 -3 lines
Diff to previous 1.82.2.1 (colored) to branchpoint 1.82 (colored) next main 1.83 (colored) to selected 1.87 (colored)

sync with head.

Revision 1.66.2.6 / (download) - annotate - [select for diffs], Wed Feb 9 08:26:14 2005 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.66.2.5: +3 -3 lines
Diff to previous 1.66.2.5 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.83 / (download) - annotate - [select for diffs], Tue Feb 8 08:22:37 2005 UTC (19 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored) to selected 1.87 (colored)

update a comment; malloc doesn't use uvm_kernacc anymore.

Revision 1.82.2.1 / (download) - annotate - [select for diffs], Tue Jan 25 12:58:28 2005 UTC (19 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.82: +5 -4 lines
Diff to previous 1.82 (colored) to selected 1.87 (colored)

- don't use uvm_object or managed mappings for wired allocations.
  (eg. malloc(9))
- simplify uvm_km_* apis.

Revision 1.66.2.5 / (download) - annotate - [select for diffs], Mon Jan 24 08:36:05 2005 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.66.2.4: +27 -25 lines
Diff to previous 1.66.2.4 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.82 / (download) - annotate - [select for diffs], Fri Jan 21 03:24:40 2005 UTC (19 years, 2 months ago) by chs
Branch: MAIN
CVS Tags: yamt-km-base
Branch point for: yamt-km
Changes since 1.81: +27 -25 lines
Diff to previous 1.81 (colored) to selected 1.87 (colored)

reduce the size of user coredump files by not dumping regions of
the address space that have never been touched (such as much of the
virtual space allocated for pthread stacks).

Revision 1.66.2.4 / (download) - annotate - [select for diffs], Tue Sep 21 13:39:25 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.66.2.3: +7 -6 lines
Diff to previous 1.66.2.3 (colored) to selected 1.87 (colored)

Fix the sync with head I botched.

Revision 1.66.2.3 / (download) - annotate - [select for diffs], Sat Sep 18 14:57:11 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.66.2.2: +6 -7 lines
Diff to previous 1.66.2.2 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.66.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:57:06 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.66.2.1: +99 -99 lines
Diff to previous 1.66.2.1 (colored) to selected 1.87 (colored)

Sync with HEAD

Revision 1.81 / (download) - annotate - [select for diffs], Wed May 12 20:09:51 2004 UTC (19 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: kent-audio2
Changes since 1.80: +3 -2 lines
Diff to previous 1.80 (colored) to selected 1.87 (colored)

add assertions.

Revision 1.80 / (download) - annotate - [select for diffs], Sun May 2 13:04:57 2004 UTC (19 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.79: +42 -42 lines
Diff to previous 1.79 (colored) to selected 1.87 (colored)

Make uvm_uarea_free an inline function.

Revision 1.79 / (download) - annotate - [select for diffs], Sun Apr 4 18:21:48 2004 UTC (20 years ago) by pk
Branch: MAIN
Changes since 1.78: +4 -4 lines
Diff to previous 1.78 (colored) to selected 1.87 (colored)

Use maxdmap and maxsmap instead of MAXDSIZ and MAXSSIZ.

Revision 1.78 / (download) - annotate - [select for diffs], Wed Mar 24 07:50:48 2004 UTC (20 years ago) by junyoung
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2-1, netbsd-2-0, netbsd-2
Changes since 1.77: +6 -6 lines
Diff to previous 1.77 (colored) to selected 1.87 (colored)

- Nuke __P().
- Drop trailing spaces.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Feb 9 13:11:21 2004 UTC (20 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.76: +17 -4 lines
Diff to previous 1.76 (colored) to selected 1.87 (colored)

- borrow vmspace0 in uvm_proc_exit instead of uvmspace_free.
  the latter is not a appropriate place to do so and it broke vfork.
- deactivate pmap before calling cpu_exit() to keep a balance of
  pmap_activate/deactivate.

Revision 1.76 / (download) - annotate - [select for diffs], Fri Jan 16 12:43:16 2004 UTC (20 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored) to selected 1.87 (colored)

uvm_coredump_walkmap: use UVM_OBJ_IS_DEVICE macro.

Revision 1.75 / (download) - annotate - [select for diffs], Sun Jan 4 11:33:32 2004 UTC (20 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.74: +34 -12 lines
Diff to previous 1.74 (colored) to selected 1.87 (colored)

Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
  as FPU state), and is the last potentially blocking operation;
  all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
  by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
  for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread

Revision 1.74 / (download) - annotate - [select for diffs], Tue Dec 30 12:33:24 2003 UTC (20 years, 3 months ago) by pk
Branch: MAIN
Changes since 1.73: +2 -18 lines
Diff to previous 1.73 (colored) to selected 1.87 (colored)

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes).  It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms.  Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.

Revision 1.73 / (download) - annotate - [select for diffs], Thu Nov 13 03:09:30 2003 UTC (20 years, 5 months ago) by chs
Branch: MAIN
Changes since 1.72: +2 -29 lines
Diff to previous 1.72 (colored) to selected 1.87 (colored)

eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed.  however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors.  most of
the callers of uvm_useracc() make the above incorrect assumption.  the
rest are all misguided optimizations, which optimize for the case
where an operation will fail.  we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors.  since there appear to be no good uses of uvm_useracc(), we'll
just remove it.

Revision 1.72 / (download) - annotate - [select for diffs], Mon Nov 3 04:39:11 2003 UTC (20 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.71: +2 -5 lines
Diff to previous 1.71 (colored) to selected 1.87 (colored)

revert rev.1.70 as it was not needed.
uvm_map_lookup_entry() should handle addresses out of the map.

Revision 1.71 / (download) - annotate - [select for diffs], Sun Nov 2 16:53:43 2003 UTC (20 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.70: +3 -8 lines
Diff to previous 1.70 (colored) to selected 1.87 (colored)

kill unneded SYSVSHM includes
use ANSI C function definition for uvm_lwp_exit()

Revision 1.70 / (download) - annotate - [select for diffs], Sat Nov 1 10:43:27 2003 UTC (20 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.69: +5 -2 lines
Diff to previous 1.69 (colored) to selected 1.87 (colored)

don't try to lookup addresses out of the map in uvm_coredump_walkmap().

Revision 1.69 / (download) - annotate - [select for diffs], Fri Oct 24 13:07:33 2003 UTC (20 years, 5 months ago) by cl
Branch: MAIN
Changes since 1.68: +7 -5 lines
Diff to previous 1.68 (colored) to selected 1.87 (colored)

simplify tests:
The case where l_stat == LSONPROC and l_cpu == curcpu cannot happen
because the pagedaemon is the LWP on curcpu and the pagedaemon is a
kernel thread and the code is only used by the pagedaemon.

See also updated patch in PR kern/23095, which I ment to checkin
originally.

Revision 1.68 / (download) - annotate - [select for diffs], Sun Oct 19 17:45:35 2003 UTC (20 years, 6 months ago) by cl
Branch: MAIN
Changes since 1.67: +15 -9 lines
Diff to previous 1.67 (colored) to selected 1.87 (colored)

don't uvm_swapout LWPs which are LSONPROC on another cpu.

uvm_swapout_threads will swapout LWPs which are running on another CPU:
- uvm_swapout_threads considers LWPs running on another CPU for swapout
  if their l_swtime is high
- uvm_swapout_threads considers LWPs on the runqueue for swapout if their
  l_swtime is high but these LWPs might be running by the time uvm_swapout
  is called

symptoms of failure: panic in setrunqueue

fixes PR kern/23095

Revision 1.67 / (download) - annotate - [select for diffs], Mon Oct 13 20:43:03 2003 UTC (20 years, 6 months ago) by scw
Branch: MAIN
Changes since 1.66: +6 -2 lines
Diff to previous 1.66 (colored) to selected 1.87 (colored)

In uvm_lwp_fork(), check if PMAP_UAREA() is defined and if so, invoke it
with the KVA of the newly-wired uarea.

This is useful on some architectures (e.g. xscale) where the uarea mapping
can be tweaked to use the mini-data cache instead of the main cache.

Revision 1.66.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:27:29 2003 UTC (20 years, 9 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.66: +7 -6 lines
Diff to previous 1.66 (colored) to selected 1.87 (colored)

Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.66 / (download) - annotate - [select for diffs], Sun Jun 29 22:32:50 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.65: +4 -5 lines
Diff to previous 1.65 (colored) to selected 1.87 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:30 2003 UTC (20 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.64: +7 -6 lines
Diff to previous 1.64 (colored) to selected 1.87 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.64 / (download) - annotate - [select for diffs], Fri Feb 14 16:25:12 2003 UTC (21 years, 2 months ago) by atatat
Branch: MAIN
Changes since 1.63: +15 -4 lines
Diff to previous 1.63 (colored) to selected 1.87 (colored)

Rework the way in which the map is traversed when dumping core.  Now
we read-lock the map and call uvm_map_lookup_entry() instead of simply
walking from the header to the next and to the next, etc.

Dumping from sparsely populated amaps could cause faults that would
result in amaps being split, which (in turn) resulted in the core
dumping routines dumping some regions of memory twice.  This makes the
core file too large, the headers not match, gdb not work properly,
and so on.

Addresses PR 19260.

Revision 1.63 / (download) - annotate - [select for diffs], Wed Jan 22 12:52:17 2003 UTC (21 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored) to selected 1.87 (colored)

make KSTACK_CHECK_* compile after sa merge.

Revision 1.62 / (download) - annotate - [select for diffs], Sat Jan 18 09:42:59 2003 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.61: +122 -106 lines
Diff to previous 1.61 (colored) to selected 1.87 (colored)

Merge the nathanw_sa branch.

Revision 1.44.2.22 / (download) - annotate - [select for diffs], Sun Dec 15 22:48:35 2002 UTC (21 years, 4 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.44.2.21: +7 -0 lines
Diff to previous 1.44.2.21 (colored) next main 1.45 (colored) to selected 1.87 (colored)

Add a mutex to the uarea cache.

Revision 1.44.2.21 / (download) - annotate - [select for diffs], Sun Dec 15 18:23:18 2002 UTC (21 years, 4 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.44.2.20: +1 -1 lines
Diff to previous 1.44.2.20 (colored) to selected 1.87 (colored)

Fix a comment.

Revision 1.44.2.20 / (download) - annotate - [select for diffs], Wed Dec 11 06:51:54 2002 UTC (21 years, 4 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.44.2.19: +22 -15 lines
Diff to previous 1.44.2.19 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Nov 17 08:32:45 2002 UTC (21 years, 5 months ago) by chs
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.60: +20 -13 lines
Diff to previous 1.60 (colored) to selected 1.87 (colored)

change uvm_uarea_alloc() to indicate whether the returned uarea is already
backed by physical pages (ie. because it reused a previously-freed one),
so that we can skip a bunch of useless work in that case.
this fixes the underlying problem behind PR 18543, and also speeds up fork()
quite a bit (eg. 7% on my pc, 1% on my ultra2) when we get a cache hit.

Revision 1.44.2.19 / (download) - annotate - [select for diffs], Fri Oct 18 03:42:16 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.18: +3 -3 lines
Diff to previous 1.44.2.18 (colored) to selected 1.87 (colored)

L_INMEM, not P_INMEM.

Revision 1.44.2.18 / (download) - annotate - [select for diffs], Fri Oct 18 02:45:58 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.17: +49 -3 lines
Diff to previous 1.44.2.17 (colored) to selected 1.87 (colored)

Catch up to -current.

Revision 1.50.2.5 / (download) - annotate - [select for diffs], Thu Oct 10 18:45:05 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.50.2.4: +50 -3 lines
Diff to previous 1.50.2.4 (colored) to branchpoint 1.50 (colored) next main 1.51 (colored) to selected 1.87 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.60 / (download) - annotate - [select for diffs], Sun Sep 22 07:20:32 2002 UTC (21 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge
Changes since 1.59: +50 -3 lines
Diff to previous 1.59 (colored) to selected 1.87 (colored)

encapsulate knowledge of uarea allocation in some new functions.

Revision 1.50.2.4 / (download) - annotate - [select for diffs], Fri Sep 6 08:50:23 2002 UTC (21 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.50.2.3: +10 -2 lines
Diff to previous 1.50.2.3 (colored) to branchpoint 1.50 (colored) to selected 1.87 (colored)

sync kqueue branch with HEAD

Revision 1.44.2.17 / (download) - annotate - [select for diffs], Thu Aug 1 02:47:07 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.16: +10 -2 lines
Diff to previous 1.44.2.16 (colored) to selected 1.87 (colored)

Catch up to -current.

Revision 1.44.2.16 / (download) - annotate - [select for diffs], Tue Jul 16 14:10:44 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.15: +3 -3 lines
Diff to previous 1.44.2.15 (colored) to selected 1.87 (colored)

Revert to curproc (in a comment).

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Mon Jul 15 10:37:32 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.58: +10 -2 lines
Diff to previous 1.58 (colored) next main 1.59 (colored) to selected 1.87 (colored)

catch up with -current.

Revision 1.44.2.15 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:43 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.14: +2 -3 lines
Diff to previous 1.44.2.14 (colored) to selected 1.87 (colored)

No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.59 / (download) - annotate - [select for diffs], Tue Jul 2 20:27:48 2002 UTC (21 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.58: +10 -2 lines
Diff to previous 1.58 (colored) to selected 1.87 (colored)

add KSTACK_CHECK_MAGIC. discussed on tech-kern.

Revision 1.44.2.14 / (download) - annotate - [select for diffs], Mon Jun 24 22:12:50 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.13: +4 -4 lines
Diff to previous 1.44.2.13 (colored) to selected 1.87 (colored)

Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.50.2.3 / (download) - annotate - [select for diffs], Sun Jun 23 17:52:17 2002 UTC (21 years, 9 months ago) by jdolecek
Branch: kqueue
Changes since 1.50.2.2: +6 -2 lines
Diff to previous 1.50.2.2 (colored) to branchpoint 1.50 (colored) to selected 1.87 (colored)

catch up with -current on kqueue branch

Revision 1.44.2.13 / (download) - annotate - [select for diffs], Thu Jun 20 03:50:40 2002 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.12: +6 -2 lines
Diff to previous 1.44.2.12 (colored) to selected 1.87 (colored)

Catch up to -current.

Revision 1.58 / (download) - annotate - [select for diffs], Wed May 15 06:57:49 2002 UTC (21 years, 11 months ago) by matt
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Branch point for: gehenna-devsw
Changes since 1.57: +6 -2 lines
Diff to previous 1.57 (colored) to selected 1.87 (colored)

When core dumping a process, don't dump maps backed up by the device pager.
(move the pagerops externs to uvm_object.h and out the C files).

Revision 1.44.2.12 / (download) - annotate - [select for diffs], Thu Feb 28 19:57:09 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.11: +4 -4 lines
Diff to previous 1.44.2.11 (colored) to selected 1.87 (colored)

Add some LWP-specific swapout debugging.

Revision 1.50.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 20:05:35 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.50.2.1: +77 -11 lines
Diff to previous 1.50.2.1 (colored) to branchpoint 1.50 (colored) to selected 1.87 (colored)

Sync kqueue branch with -current.

Revision 1.44.2.11 / (download) - annotate - [select for diffs], Tue Jan 8 00:35:01 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.10: +66 -6 lines
Diff to previous 1.44.2.10 (colored) to selected 1.87 (colored)

Catch up to -current.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Dec 31 22:34:39 2001 UTC (22 years, 3 months ago) by chs
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base, eeh-devprop-base, eeh-devprop
Changes since 1.56: +6 -6 lines
Diff to previous 1.56 (colored) to selected 1.87 (colored)

introduce a new UVM fault type, VM_FAULT_WIREMAX.  this is different
from VM_FAULT_WIRE in that when the pages being wired are faulted in,
the simulated fault is at the maximum protection allowed for the mapping
instead of the current protection.  use this in uvm_map_pageable{,_all}()
to fix the problem where writing via ptrace() to shared libraries that
are also mapped with wired mappings in another process causes a
diagnostic panic when the wired mapping is removed.

this is a really obscure problem so it deserves some more explanation.
ptrace() writing to another process ends up down in uvm_map_extract(),
which for MAP_PRIVATE mappings (such as shared libraries) will cause
the amap to be copied or created.  then the amap is made shared
(ie. the AMAP_SHARED flag is set) between the kernel and the ptrace()d
process so that the kernel can modify pages in the amap and have the
ptrace()d process see the changes.  then when the page being modified
is actually faulted on, the object pages (from the shared library vnode)
is copied to a new anon page and inserted into the shared amap.
to make all the processes sharing the amap actually see the new anon
page instead of the vnode page that was there before, we need to
invalidate all the pmap-level mappings of the vnode page in the pmaps
of the processes sharing the amap, but we don't have a good way of
doing this.  the amap doesn't keep track of the vm_maps which map it.
so all we can do at this point is to remove all the mappings of the
page with pmap_page_protect(), but this has the unfortunate side-effect
of removing wired mappings as well.  removing wired mappings with
pmap_page_protect() is a legitimate operation, it can happen when a file
with a wired mapping is truncated.  so the pmap has no way of knowing
whether a request to remove a wired mapping is normal or when it's due to
this weird situation.  so the pmap has to remove the weird mapping.
the process being ptrace()d goes away and life continues.  then,
much later when we go to unwire or remove the wired vm_map mapping,
we discover that the pmap mapping has been removed when it should
still be there, and we panic.

so where did we go wrong?  the problem is that we don't have any way
to update just the pmap mappings that need to be updated in this
scenario.  we could invent a mechanism to do this, but that is much
more complicated than this change and it doesn't seem like the right
way to go in the long run either.

the real underlying problem here is that wired pmap mappings just
aren't a good concept.  one of the original properties of the pmap
design was supposed to be that all the information in the pmap could
be thrown away at any time and the VM system could regenerate it all
through fault processing, but wired pmap mappings don't allow that.
a better design for UVM would not require wired pmap mappings,
and Chuck C. and I are talking about this, but it won't be done
anytime soon, so this change will do for now.

this change has the effect of causing MAP_PRIVATE mappings to be
copied to anonymous memory when they are mlock()d, so that uvm_fault()
doesn't need to copy these pages later when called from ptrace(), thus
avoiding the call to pmap_page_protect() and the panic that results
from this when the mlock()d region is unlocked or freed.  note that
this change doesn't help the case where the wired mapping is MAP_SHARED.

discussed at great length with Chuck Cranor.
fixes PRs 10363, 12554, 12604, 13041, 13487, 14580 and 14853.

Revision 1.44.2.10 / (download) - annotate - [select for diffs], Sun Dec 16 01:54:30 2001 UTC (22 years, 4 months ago) by gmcgarry
Branch: nathanw_sa
Changes since 1.44.2.9: +4 -2 lines
Diff to previous 1.44.2.9 (colored) to selected 1.87 (colored)

call cpu_proc_fork() from uvm_proc_fork()

Revision 1.56 / (download) - annotate - [select for diffs], Mon Dec 10 01:52:27 2001 UTC (22 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.55: +62 -2 lines
Diff to previous 1.55 (colored) to selected 1.87 (colored)

Move the code that walks the process's VM map during a coredump
into uvm_coredump_walkmap(), and use callbacks into the coredump
routine to do something with each section.

Revision 1.44.2.9 / (download) - annotate - [select for diffs], Sat Dec 8 04:22:18 2001 UTC (22 years, 4 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.44.2.8: +6 -6 lines
Diff to previous 1.44.2.8 (colored) to selected 1.87 (colored)

cpu_fork() -> cpu_lwp_fork().  This logically forks an LWP, not a
complete process.  As noted by Gregory McGarry on tech-kern.

Revision 1.44.2.8 / (download) - annotate - [select for diffs], Wed Nov 14 19:19:05 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.7: +4 -2 lines
Diff to previous 1.44.2.7 (colored) to selected 1.87 (colored)

Catch up to -current.

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:19:53 2001 UTC (22 years, 5 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.53: +4 -2 lines
Diff to previous 1.53 (colored) next main 1.54 (colored) to selected 1.87 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.55 / (download) - annotate - [select for diffs], Sat Nov 10 07:36:59 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.54: +4 -1 lines
Diff to previous 1.54 (colored) to selected 1.87 (colored)

add RCSIDs, and in some cases, slightly cleanup #include order

Revision 1.54 / (download) - annotate - [select for diffs], Tue Nov 6 05:34:42 2001 UTC (22 years, 5 months ago) by chs
Branch: MAIN
Changes since 1.53: +1 -2 lines
Diff to previous 1.53 (colored) to selected 1.87 (colored)

in uvm_exit(), don't bother to unwire the uarea before we free it,
the pages will be freed anyway.

Revision 1.50.4.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:48:40 2001 UTC (22 years, 6 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.50: +12 -8 lines
Diff to previous 1.50 (colored) next main 1.51 (colored) to selected 1.87 (colored)

Catch up with -current.

Revision 1.44.2.7 / (download) - annotate - [select for diffs], Wed Sep 26 19:55:15 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.6: +2 -1 lines
Diff to previous 1.44.2.6 (colored) to selected 1.87 (colored)

Catch up to -current.
Again.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Sep 23 07:10:08 2001 UTC (22 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.52: +2 -1 lines
Diff to previous 1.52 (colored) to selected 1.87 (colored)

bump the rusage counter for "swaps" when we swap out a process.
addresses PR 6170.

Revision 1.44.2.6 / (download) - annotate - [select for diffs], Fri Sep 21 22:37:13 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.5: +12 -9 lines
Diff to previous 1.44.2.5 (colored) to selected 1.87 (colored)

Catch up to -current.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Sep 15 20:36:45 2001 UTC (22 years, 7 months ago) by chs
Branch: MAIN
CVS Tags: post-chs-ubcperf
Changes since 1.51: +10 -7 lines
Diff to previous 1.51 (colored) to selected 1.87 (colored)

a whole bunch of changes to improve performance and robustness under load:

 - remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.

Revision 1.50.2.1 / (download) - annotate - [select for diffs], Thu Sep 13 01:16:32 2001 UTC (22 years, 7 months ago) by thorpej
Branch: kqueue
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored) to selected 1.87 (colored)

Update the kqueue branch to HEAD.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Sep 10 21:19:42 2001 UTC (22 years, 7 months ago) by chris
Branch: MAIN
CVS Tags: pre-chs-ubcperf
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored) to selected 1.87 (colored)

Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.

Revision 1.44.2.5 / (download) - annotate - [select for diffs], Tue Jul 3 03:09:00 2001 UTC (22 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.4: +1 -2 lines
Diff to previous 1.44.2.4 (colored) to selected 1.87 (colored)

Correct merge lossage; lose the now-extraneous splstatclock().

Revision 1.44.2.4 / (download) - annotate - [select for diffs], Thu Jun 21 20:10:30 2001 UTC (22 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.3: +17 -19 lines
Diff to previous 1.44.2.3 (colored) to selected 1.87 (colored)

Catch up to -current.

Revision 1.50 / (download) - annotate - [select for diffs], Sat Jun 2 18:09:26 2001 UTC (22 years, 10 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base
Branch point for: thorpej-devvp, kqueue
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored) to selected 1.87 (colored)

replace vm_map{,_entry}_t with struct vm_map{,_entry} *.

Revision 1.49 / (download) - annotate - [select for diffs], Wed May 30 15:24:23 2001 UTC (22 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.48: +3 -2 lines
Diff to previous 1.48 (colored) to selected 1.87 (colored)

add missing   #include "opt_kgdb.h"

Revision 1.48 / (download) - annotate - [select for diffs], Fri May 25 04:06:13 2001 UTC (22 years, 10 months ago) by chs
Branch: MAIN
Changes since 1.47: +13 -13 lines
Diff to previous 1.47 (colored) to selected 1.87 (colored)

remove trailing whitespace.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Apr 24 04:31:18 2001 UTC (22 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_beforemerge
Changes since 1.46: +2 -4 lines
Diff to previous 1.46 (colored) to selected 1.87 (colored)

Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative.  It may be possible to
optimize these a little more.

Revision 1.29.2.5 / (download) - annotate - [select for diffs], Mon Apr 23 09:42:36 2001 UTC (22 years, 11 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.29.2.4: +1 -2 lines
Diff to previous 1.29.2.4 (colored) to branchpoint 1.29 (colored) next main 1.30 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Apr 21 17:38:24 2001 UTC (23 years ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_base
Changes since 1.45: +1 -2 lines
Diff to previous 1.45 (colored) to selected 1.87 (colored)

The pmap_update() call at the end of uvm_swapout_threads() is
completely useless.  Nuke it.

Revision 1.44.2.3 / (download) - annotate - [select for diffs], Mon Apr 9 01:59:14 2001 UTC (23 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.2: +8 -10 lines
Diff to previous 1.44.2.2 (colored) to selected 1.87 (colored)

Catch up with -current.

Revision 1.29.2.4 / (download) - annotate - [select for diffs], Tue Mar 27 15:32:49 2001 UTC (23 years ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.29.2.3: +8 -10 lines
Diff to previous 1.29.2.3 (colored) to branchpoint 1.29 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.44.2.2 / (download) - annotate - [select for diffs], Mon Mar 19 20:46:57 2001 UTC (23 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.1: +1 -8 lines
Diff to previous 1.44.2.1 (colored) to selected 1.87 (colored)

Fix a very stupid and annoying bug: Don't try to uvm_fault_unwire() a
LWP's u-area twice.

Thirty lashes with a wet noodle for this one.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Mar 15 06:10:57 2001 UTC (23 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.44: +8 -10 lines
Diff to previous 1.44 (colored) to selected 1.87 (colored)

eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:50:10 2001 UTC (23 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.44: +112 -95 lines
Diff to previous 1.44 (colored) to selected 1.87 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.29.2.3 / (download) - annotate - [select for diffs], Sun Feb 11 19:17:49 2001 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.29.2.2: +1 -4 lines
Diff to previous 1.29.2.2 (colored) to branchpoint 1.29 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.44 / (download) - annotate - [select for diffs], Tue Feb 6 19:54:44 2001 UTC (23 years, 2 months ago) by eeh
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.43: +1 -4 lines
Diff to previous 1.43 (colored) to selected 1.87 (colored)

Move maxdmap and maxsmap where they belong and make them big enough.

Revision 1.29.2.2 / (download) - annotate - [select for diffs], Fri Dec 8 09:20:54 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.29.2.1: +26 -23 lines
Diff to previous 1.29.2.1 (colored) to branchpoint 1.29 (colored) to selected 1.87 (colored)

Sync with HEAD.

Revision 1.43 / (download) - annotate - [select for diffs], Sat Nov 25 06:27:59 2000 UTC (23 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.42: +26 -23 lines
Diff to previous 1.42 (colored) to selected 1.87 (colored)

lots of cleanup:
use queue.h macros and KASSERT().
address amap offsets in pages instead of bytes.
make amap_ref() and amap_unref() take an amap, offset and length
  instead of a vm_map_entry_t.
improve whitespace and comments.

Revision 1.29.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:12:00 2000 UTC (23 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.29: +39 -59 lines
Diff to previous 1.29 (colored) to selected 1.87 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.42 / (download) - annotate - [select for diffs], Wed Oct 11 17:27:59 2000 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.41: +4 -3 lines
Diff to previous 1.41 (colored) to selected 1.87 (colored)

- uvmspace_share(): If p2 has a vmspace already, make sure to deactivate
  it and free it as appropriate.  Activate p2's new address space once
  it references p1's.
- uvm_fork(): Make sure the child's vmspace is NULL before calling
  uvmspace_share() (the child doens't have one already in this case).

These changes do not change the behavior for the current use of
uvmspace_share() (vfork(2)), but make it possible for an already
running process (such as a kernel thread) to properly attach to
another process's address space.

Revision 1.41 / (download) - annotate - [select for diffs], Sat Sep 23 00:43:10 2000 UTC (23 years, 6 months ago) by enami
Branch: MAIN
Changes since 1.40: +5 -5 lines
Diff to previous 1.40 (colored) to selected 1.87 (colored)

splstatclock is insufficient to protect run queues.  Acquire scheduler
lock instead.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Aug 21 02:29:32 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.39: +1 -3 lines
Diff to previous 1.39 (colored) to selected 1.87 (colored)

Remove a totally unnecessary splhigh/spl0 pair.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Aug 12 17:46:25 2000 UTC (23 years, 8 months ago) by sommerfeld
Branch: MAIN
Changes since 1.38: +5 -1 lines
Diff to previous 1.38 (colored) to selected 1.87 (colored)

add comment warning about possible unlock/sleep race

Revision 1.38 / (download) - annotate - [select for diffs], Tue Jun 27 17:29:22 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.37: +1 -3 lines
Diff to previous 1.37 (colored) to selected 1.87 (colored)

remove include of <vm/vm.h>

Revision 1.37 / (download) - annotate - [select for diffs], Mon Jun 26 14:21:17 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.36: +1 -3 lines
Diff to previous 1.36 (colored) to selected 1.87 (colored)

remove/move more mach vm header files:

	<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:10:43 2000 UTC (23 years, 9 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.33: +11 -31 lines
Diff to previous 1.33 (colored) next main 1.34 (colored) to selected 1.87 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Jun 18 05:20:27 2000 UTC (23 years, 10 months ago) by simonb
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5
Changes since 1.35: +2 -1 lines
Diff to previous 1.35 (colored) to selected 1.87 (colored)

Set p->p_addr to NULL after it gets freed.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Jun 8 05:52:34 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.34: +1 -26 lines
Diff to previous 1.34 (colored) to selected 1.87 (colored)

Change UVM_UNLOCK_AND_WAIT() to use ltsleep() (it is now atomic, as
advertised).  Garbage-collect uvm_sleep().

Revision 1.34 / (download) - annotate - [select for diffs], Sun May 28 05:49:06 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.33: +10 -6 lines
Diff to previous 1.33 (colored) to selected 1.87 (colored)

Rather than starting init and creating kthreads by forking and then
doing a cpu_set_kpc(), just pass the entry point and argument all
the way down the fork path starting with fork1().  In order to
avoid special-casing the normal fork in every cpu_fork(), MI code
passes down child_return() and the child process pointer explicitly.

This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.

Revision 1.33 / (download) - annotate - [select for diffs], Fri May 26 00:36:53 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.32: +2 -1 lines
Diff to previous 1.32 (colored) to selected 1.87 (colored)

Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor.  Test against SONPROC as appropriate rather than
combinations of SRUN and curproc.  Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Mar 30 12:31:50 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.31: +6 -6 lines
Diff to previous 1.31 (colored) to selected 1.87 (colored)

Remove more register declarations.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Mar 26 20:54:47 2000 UTC (24 years ago) by kleink
Branch: MAIN
Changes since 1.30: +11 -11 lines
Diff to previous 1.30 (colored) to selected 1.87 (colored)

Merge parts of chs-ubc2 into the trunk:
Add a new type voff_t (defined as a synonym for off_t) to describe offsets
into uvm objects, and update the appropriate interfaces to use it, the
most visible effect being the ability to mmap() file offsets beyond
the range of a vaddr_t.

Originally by Chuck Silvers; blame me for problems caused by merging this
into non-UBC.

Revision 1.29.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:43 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored) next main 1.30 (colored) to selected 1.87 (colored)

Pull up to last week's -current.

Revision 1.29.4.1 / (download) - annotate - [select for diffs], Mon Nov 15 00:42:29 1999 UTC (24 years, 5 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored) next main 1.30 (colored) to selected 1.87 (colored)

Sync with -current

Revision 1.30 / (download) - annotate - [select for diffs], Sat Nov 13 00:24:38 1999 UTC (24 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, fvdl-softdep-base, chs-ubc2-newbase
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored) to selected 1.87 (colored)

Change the pmap_enter() API slightly; pmap_enter() now returns an error
value (KERN_SUCCESS or KERN_RESOURCE_SHORTAGE) indicating if it succeeded
or failed.  Change the `wired' and `access_type' arguments to a single
`flags' argument, which includes the access type, and flags:

	PMAP_WIRED	the old `wired' boolean
	PMAP_CANFAIL	pmap_enter() is allowed to fail

If PMAP_CANFAIL is not specified, the pmap should behave as it always
has in the face of a drastic resource shortage: fall over dead.

Change the fault handler to deal with failure (which indicates resource
shortage) by unlocking everything, waiting for the pagedaemon to free
more memory, then retrying the fault.

Revision 1.18.4.3 / (download) - annotate - [select for diffs], Wed Aug 11 05:47:06 1999 UTC (24 years, 8 months ago) by chs
Branch: chs-ubc2
Changes since 1.18.4.2: +9 -9 lines
Diff to previous 1.18.4.2 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored) to selected 1.87 (colored)

add casts for trunc_page() and round_page() args.

Revision 1.18.4.2 / (download) - annotate - [select for diffs], Mon Aug 2 23:16:14 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.18.4.1: +32 -4 lines
Diff to previous 1.18.4.1 (colored) to branchpoint 1.18 (colored) to selected 1.87 (colored)

Update from trunk.

Revision 1.29 / (download) - annotate - [select for diffs], Sun Jul 25 06:30:36 1999 UTC (24 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-base
Branch point for: wrstuden-devbsize, thorpej_scsipi, fvdl-softdep
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored) to selected 1.87 (colored)

Turn the proclist lock into a read/write spinlock.  Update proclist locking
calls to reflect this.  Also, block statclock rather than softclock during
in the proclist locking functions, to address a problem reported on
current-users by Sean Doran.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jul 22 22:58:38 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.27: +30 -1 lines
Diff to previous 1.27 (colored) to selected 1.87 (colored)

Garbage collect thread_sleep()/thread_wakeup() left over from the old
Mach VM code.  Also nuke iprintf(), which was no longer used anywhere.

Add proclist locking where appropriate.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jul 8 18:11:03 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.26: +3 -4 lines
Diff to previous 1.26 (colored) to selected 1.87 (colored)

Change the pmap_extract() interface to:
	boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.

Revision 1.18.4.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:47:20 1999 UTC (24 years, 10 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.18: +39 -28 lines
Diff to previous 1.18 (colored) to selected 1.87 (colored)

Sync w/ -current.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Jun 17 15:47:22 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.25: +12 -4 lines
Diff to previous 1.25 (colored) to selected 1.87 (colored)

Make uvm_vslock() return the error code from uvm_fault_wire().  All places
which use uvm_vslock() should now test the return value.  If it's not
KERN_SUCCESS, wiring the pages failed, so the operation which is using
uvm_vslock() should error out.

XXX We currently just EFAULT a failed uvm_vslock().  We may want to do
more about translating error codes in the future.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Jun 17 05:57:33 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.24: +10 -3 lines
Diff to previous 1.24 (colored) to selected 1.87 (colored)

In uvm_useracc(), make sure we have a read lock on the map before
calling uvm_map_checkprot().

Revision 1.24 / (download) - annotate - [select for diffs], Thu Jun 17 00:24:10 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.23: +1 -12 lines
Diff to previous 1.23 (colored) to selected 1.87 (colored)

The i386 and pc532 pmaps are officially fixed.

Revision 1.23 / (download) - annotate - [select for diffs], Fri May 28 20:49:51 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored) to selected 1.87 (colored)

Make uvm_fault_unwire() take a vm_map_t, rather than a pmap_t, for
consistency.  Use this opportunity for checking for intrsafe map use
in this routine (which is illegal).

Revision 1.22 / (download) - annotate - [select for diffs], Wed May 26 01:05:26 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored) to selected 1.87 (colored)

Pass an access_type to uvm_vslock().

Revision 1.21 / (download) - annotate - [select for diffs], Wed May 26 00:33:52 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.20: +10 -4 lines
Diff to previous 1.20 (colored) to selected 1.87 (colored)

- uvm_fork()/uvm_swapin(): pass VM_PROT_READ|VM_PROT_WRITE access_type
  to uvm_fault_wire(), to guarantee that the kernel stacks will not
  cause even a mod/ref emulation fault.
- uvm_vslock(): pass VM_PROT_NONE until this function is updated.

Revision 1.20 / (download) - annotate - [select for diffs], Thu May 13 21:58:38 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.19: +7 -3 lines
Diff to previous 1.19 (colored) to selected 1.87 (colored)

Allow the caller to specify a stack for the child process.  If NULL,
the child inherits the stack pointer from the parent (traditional
behavior).  Like the signal stack, the stack area is secified as
a low address and a size; machine-dependent code accounts for stack
direction.

This is required for clone(2).

Revision 1.19 / (download) - annotate - [select for diffs], Fri Apr 30 21:23:50 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.18: +3 -6 lines
Diff to previous 1.18 (colored) to selected 1.87 (colored)

Pull signal actions out of struct user, make them a separate proc
substructure, and allow them to be shared.

Required for clone(2).

Revision 1.18 / (download) - annotate - [select for diffs], Fri Mar 26 21:58:39 1999 UTC (25 years ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored) to selected 1.87 (colored)

Add a new `access type' argument to pmap_enter().  This indicates what type of
memory access a mapping was caused by.  This is passed through from uvm_fault()
and udv_fault(), and in most other cases is 0.
The pmap module may use this to preset R/M information.  On MMUs which require
R/M emulation, the implementation may preset the bits and avoid taking another
fault.  On MMUs which keep R/M information in hardware, the implementation may
preset its cached bits to speed up the next call to pmap_is_modified() or
pmap_is_referenced().

Revision 1.17 / (download) - annotate - [select for diffs], Thu Mar 25 18:48:51 1999 UTC (25 years ago) by mrg
Branch: MAIN
Changes since 1.16: +1 -5 lines
Diff to previous 1.16 (colored) to selected 1.87 (colored)

remove now >1 year old pre-release message.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 15 07:55:19 1999 UTC (25 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.15: +1 -3 lines
Diff to previous 1.15 (colored) to selected 1.87 (colored)

remove a debugging printf.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Oct 19 22:21:19 1998 UTC (25 years, 6 months ago) by tron
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored) to selected 1.87 (colored)

Defopt SYSVMSG, SYSVSEM and SYSVSHM.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Sep 8 23:44:22 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.13: +18 -1 lines
Diff to previous 1.13 (colored) to selected 1.87 (colored)

Implement uvm_exit(), which frees VM resources when a process finishes
exiting.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Aug 13 02:11:00 1998 UTC (25 years, 8 months ago) by eeh
Branch: MAIN
Changes since 1.12: +15 -14 lines
Diff to previous 1.12 (colored) to selected 1.87 (colored)

Merge paddr_t changes into the main branch.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Aug 9 22:36:38 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored) to selected 1.87 (colored)

bzero->memset, bcopy->memcpy, bcmp->memcmp

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Thu Jul 30 14:04:10 1998 UTC (25 years, 8 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.11: +15 -14 lines
Diff to previous 1.11 (colored) next main 1.12 (colored) to selected 1.87 (colored)

Split vm_offset_t and vm_size_t into paddr_t, psize_t, vaddr_t, and vsize_t.

Revision 1.11 / (download) - annotate - [select for diffs], Sat May 9 15:04:40 1998 UTC (25 years, 11 months ago) by kleink
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.10: +9 -6 lines
Diff to previous 1.10 (colored) to selected 1.87 (colored)

Use size_t to pass the length of the memory region to operate on to chgkprot(),
kernacc(), useracc(), vslock() and vsunlock(); (unsigned) ints are not
adequate on all platforms.

Revision 1.10 / (download) - annotate - [select for diffs], Fri May 8 17:41:41 1998 UTC (25 years, 11 months ago) by kleink
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored) to selected 1.87 (colored)

Make uvm_vsunlock() actually use the proc * passed to it; per discussion
with Jason Thorpe.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Apr 30 06:28:59 1998 UTC (25 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.8: +6 -4 lines
Diff to previous 1.8 (colored) to selected 1.87 (colored)

Pass vslock() and vsunlock() a proc *, rather than implicitly operating
on curproc.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Apr 9 00:24:05 1998 UTC (26 years ago) by thorpej
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored) to selected 1.87 (colored)

Oops, fix a typo.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Apr 9 00:23:39 1998 UTC (26 years ago) by thorpej
Branch: MAIN
Changes since 1.6: +9 -26 lines
Diff to previous 1.6 (colored) to selected 1.87 (colored)

Allocate kernel virtual address space for the U-area before allocating
the new proc structure when performing a fork.  This makes it much
easier to abort a fork operation and return an error if we run out
of KVA space.

The U-area pages are still wired down in {,u}vm_fork(), as before.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Mar 9 00:58:56 1998 UTC (26 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.5: +315 -320 lines
Diff to previous 1.5 (colored) to selected 1.87 (colored)

KNF.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Feb 10 14:12:12 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.4: +3 -4 lines
Diff to previous 1.4 (colored) to selected 1.87 (colored)

- add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Feb 7 11:08:33 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored) to selected 1.87 (colored)

restore rcsids

Revision 1.3 / (download) - annotate - [select for diffs], Sat Feb 7 02:26:04 1998 UTC (26 years, 2 months ago) by chs
Branch: MAIN
Changes since 1.2: +8 -12 lines
Diff to previous 1.2 (colored) to selected 1.87 (colored)

add locking of kernel_map in uvm_kernacc().
check return value of uvm_fault_wire() in uvm_fork().
enable swappings.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 6 22:31:49 1998 UTC (26 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored) to selected 1.87 (colored)

RCS ID police.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Thu Feb 5 06:25:10 1998 UTC (26 years, 2 months ago) by mrg
Branch: CDC
CVS Tags: uvm980205
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored) to selected 1.87 (colored)

initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the UVM kernel code portion.


this will be KNF'd shortly.  :-)

Revision 1.1 / (download) - annotate - [select for diffs], Thu Feb 5 06:25:10 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Diff to selected 1.87 (colored)

Initial revision

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>