| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
We did not reach a consensus about using SMR to unlock single_thread_set()
so there's no point in keeping this change.
|
|
|
|
|
|
|
| |
Currently all iterations are done under KERNEL_LOCK() and therefor use
the *_LOCKED() variant.
From and ok claudio@
|
|
|
|
| |
ok patrick@, mpi@
|
|
|
|
|
|
|
|
|
|
| |
of resource limit structs has been done between processes. By applying
copy-on-write also between threads, threads can read rlimits in
a nearly lock-free manner.
Inspired by code in DragonFly BSD and FreeBSD.
OK mpi@, agreement from jmatthew@ and anton@
|
|
|
|
|
|
|
|
|
|
|
| |
physio(9) to prevent another thread from unmapping the memory and triggering
an assertion or even corruption random physical memory pages.
ok deraadt@
Should fix:
Reported-by: syzbot+b8e7faf688f8c9d341b1@syzkaller.appspotmail.com
Reported-by: syzbot+b6a9255faa0605669432@syzkaller.appspotmail.com
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
|
| |
It doesn't compile und hasn't been working during the last decade.
ok kettenis@, deraadt@
|
|
|
|
|
|
|
|
| |
The distinction between preempt() and yield() stays as it is usueful
to know if a thread decided to yield by itself or if the kernel told
him to go away.
ok tedu@, guenther@
|
|
|
|
|
|
| |
necessary
ok deraadt@ jsing@
|
|
|
|
|
|
| |
the reaper spending more than half its time in uvm_pause. we want the
system to be interactive, but we want throughput too. this seems like a
decent balance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new sysctl KERN_PROC_VMMAP, which returns an array of VM map
entries of a specified process. This prevents debuggers from iterating
vm_map_entry RB tree via kvm(3).
The name KERN_PROC_VMMAP and struct kinfo_vmentry are chosen from the same
function in FreeBSD. struct kinfo_vmentry is revised to reduce size, because
OpenBSD does not keep track of filepaths. The semantic is also changed to
return max buffer size as a hint, and start iteration at the specified base
address.
Much valuable input from deraadt@, guenther@, tedu@
OK tedu@ deraadt@
|
|
|
|
|
|
|
| |
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h.
PROT_MASK is introduced as the one true way of extracting those bits.
Remove UVM_ADV_* wrapper, using the standard names.
ok doug guenther kettenis
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
on the 2nd of February 2011 in NetBSD.
http://marc.info/?l=netbsd-source-changes&m=129658899212732&w=2
http://marc.info/?l=netbsd-source-changes&m=129659095515558&w=2
http://marc.info/?l=netbsd-source-changes&m=129659157916514&w=2
http://marc.info/?l=netbsd-source-changes&m=129665962324372&w=2
http://marc.info/?l=netbsd-source-changes&m=129666033625342&w=2
http://marc.info/?l=netbsd-source-changes&m=129666052825545&w=2
http://marc.info/?l=netbsd-source-changes&m=129666922906480&w=2
http://marc.info/?l=netbsd-source-changes&m=129667725518082&w=2
|
|
|
|
|
|
|
|
|
|
| |
to the process's vmspace and filedescs. struct proc continues to
keep copies of the pointers, copying them on fork, clearing them
on exit, and (for vmspace) refreshing on exec.
Also, make uvm_swapout_threads() thread aware, eliminating p_swtime
in kernel.
particular testing by ajacoutot@ and sebastia@
|
| |
|
|
|
|
|
|
| |
uvm_uarea_alloc()
function name from NetBSD; arm testing by miod@
|
|
|
|
| |
emphatic ok usual suspects, grudging ok miod
|
|
|
|
|
|
|
| |
reaper from hogging the cpu. it will do the kernel lock twiddle trick to
allow other CPUs a chance to run, and also checks if the reaper has been
running for an entire timeslice and should be preempted.
ok deraadt
|
| |
|
|
|
|
|
|
|
| |
of per-rthread. Handling of per-thread tick and runtime counters
inspired by how FreeBSD does it.
ok kettenis@
|
|
|
|
|
|
|
| |
(uvm_atopg) and use it in uvm_km_doputpage to replace some handrolled
code. Shrinks the kernel a trivial amount.
ok beck@ and miod@ (who suggested i name it uvm_atopg not uvm_atop)
|
|
|
|
| |
an uninitialized variable to uvm_km_free().
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix error handling so that we free stuff on error.
- We use the mappings to keep track of which pages need to be
freed so don't unmap before freeing (this is theoretically
incorrect and will be fixed soon).
This makes fsck happy on bigmem machines (it doesn't leak all
dma:able memory anymore).
beck@, drahn@, oga@ ok
|
|
|
|
|
|
| |
UVM_PLA_WAITOK as it will not fail; Rather assert that it didn't fail.
ok tedu@, oga@
|
|
|
|
| |
ok tedu@, oga@
|
| |
|
|
|
|
|
|
|
|
|
| |
Just like normal vs{,un}lock, but in case the pages we get are not dma
accessible, we bounce them, if they are dma acessible, the functions behave
exactly like normal vslock. The plan for the future is to have fault_wire
allocate dma acessible pages so that we don't need to bounce (especially
in cases where the same buffer is reused for physio over and over again),
but for now, keep it as simple as possible.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
inline the loop in the one place it exists, and remove it from uvm
adjust a comment mentioning it accordingly
originally inspired by a diff fixing a comment from oga@
ok art@ beck@ miod@ oga@
|
|
|
|
|
|
|
| |
K&R function declarations, so switch them all over to ansi-style, in
accordance with the prophesy.
"go for it" art@
|
| |
|
|
|
|
| |
deraadt@ dlg@.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
should never be referenced outside the context of the process to which
this stack belongs unless we do the PHOLD/PRELE dance. Loads of code
doesn't follow the rules here. Instead of trying to track down all
offenders and fix this hairy situation, it makes much more sense
to not swap kernel stacks.
From art@, tested by many some time ago.
|
|
|
|
|
| |
defined; from NetBSD. Currently only used on xscale arm to use the mini data
cache for u area mappings instead of the main data cache.
|
|
|
|
|
| |
done in uvm_swapin(). Looks like this was a mistake made while editing. No
response from art@. deraadt@, miod@, pedro@ ok
|
|
|
|
|
|
|
| |
one case fixed here).
miod@ "appears to be harmless"
markus@ ok
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
everyone for the prompt review and ok of this work ;-) Yeah, that includes me
too, or maybe especially me. I am sorry.
Change the sched_lock to a mutex. This fixes, among other things, the infamous
"telnet localhost &" problem. The real bug in that case was that the sched_lock
which is by design a non-recursive lock, was recursively acquired, and not
enough releases made us hold the lock in the idle loop, blocking scheduling
on the other processors. Some of the other processors would hold the biglock though,
which made it impossible for cpu 0 to enter the kernel... A nice deadlock.
Let me just say debugging this for days just to realize that it was all fixed
in an old diff noone ever ok'd was somewhat of an anti-climax.
This diff also changes splsched to be correct for all our architectures.
|
|
|
|
| |
all architectures but arm, where it is needed.
|
|
|
|
| |
ok millert@
|
|
|
|
| |
ok millert@ henning@ markus@ drahn@
|
|
|
|
|
| |
Tested by mickey@, henning@, ericj@, and beck@.
ok mickey@
|
|
|
|
| |
eventually not used anymore. Conforming to art@'s evil plans.
|
| |
|
|
|
|
| |
noticed by aaron@, recommended by deraadt@
|
| |
|
|
|
|
|
|
|
|
|
| |
machines or some configurations or in some phase of the moon (we actually
don't know when or why) files disappeared. Since we've not been able to
track down the problem in two weeks intense debugging and we need -current
to be stable, back out everything to a state it had before UBC.
We apologise for the inconvenience.
|
|
|
|
|
|
| |
Today we add a pmap argument to pmap_update() and allocate map entries for
kernel_map from kmem_map instead of using the static entries. This should
get rid of MAX_KMAPENT panics. Also some uvm_loan problems are fixed.
|
|
|
|
| |
Contains also support for page coloring.
|