Age | Commit message (Collapse) | Author |
|
callbacks needing a process context.
The function timeout_set_proc(9) has to be used instead of timeout_set(9)
when a timeout callback needs a process context.
Note that if such a timeout is waiting, understand sleeping, for a non
negligible amount of time it might delay other timeouts needing a process
context.
dlg@ agrees with this as a temporary solution.
Manpage tweaks from jmc@
ok kettenis@, bluhm@, mikeb@
|
|
this was part of the larger diff that was ok guenther@ mpi@, somehow I forgot
to commit this particular piece.
|
|
profiling framework.
Code patching is used to enable probes when entering functions. The
probes will call a mcount()-like function to match the behavior of a
GPROF kernel.
Currently only available on amd64 and guarded under DDBPROF. Support
for other archs will follow soon.
A new sysctl knob, ddb.console, need to be set to 1 in securelevel 0
to be able to use this feature.
Inputs and ok guenther@
|
|
This fixes the problem that long-running machines which were not
shut down properly would reboot with a badly offset system time.
hints and ok kettenis@
|
|
anymore, since it is now RO.
It is the bootloader's job to initialize it correctly. If the
bootloader fails to perform that, you silently lose. The road to
building an always-available rng is served by us depending on it :)
|
|
ok beck
|
|
Permanently holding /dev/console open in the kernel works only until
init(8) calls revoke(2). After that the console device vnode cannot
be used anymore. It still resulted in a hanging init(8) if it tried
to syslog(3) something. With the backout also dmesg -s works again.
|
|
started and before init(8) has opened the console, the kernel could
crash as the console device has not been initialized. Open
/dev/console in the kernel before starting init(8) and keep it open.
This way sendsyslog(2) can be called early in the system.
OK beck@ deraadt@
|
|
inside the sigcontext. sigreturn(2) checks syscall entry was from the
exact PC addr in the (per-process ASLR) sigtramp, verifies the cookie,
and clears it to prevent sigcontext reuse.
not yet tested on landisk, sparc, *88k, socppc.
ok kettenis
|
|
Use a new task that runs holding the KERNEL_LOCK to execute mp-unsafe
code. Our current goal is to progressively move input functions to the
unlocked task.
This gives a small performance boost confirmed by Hrvoje Popovski's
IPv4 forwarding measurement:
before: after:
send receive send receive
400kpps 400kpps 400kpps 400kpps
500kpps 500kpps 500kpps 500kpps
600kpps 600kpps 600kpps 600kpps
650kpps 650kpps 650kpps 640kpps
700kpps 700kpps 700kpps 700kpps
720kpps 640kpps 720kpps 710kpps
800kpps 640kpps 800kpps 650kpps
1.4Mpps 570kpps 1.4Mpps 590kpps
14Mpps 570kpps 14Mpps 590kpps
ok kettenis@, bluhm@, dlg@
|
|
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
|
|
|
similar to config_defer(9).
ok mikeb@, deraadt@
|
|
|
|
The routing table is not an optional component of the network stack
and initializing it inside the "routing domain" requires some ugly
introspection in the domain interface.
This put the rtable* layer at the same level of the if* level. These
two subsystem are organized around the two global data structure used
in the network stack:
- the global &ifnet list, to be used in process context only, and
- the routing table which can be read in interrupt context.
This change makes the rtable_* layer domain-aware and extends the
"struct domain" such that INET, INET6 and MPLS can specify the length
of the binary key used in lookups. This allows us to keep, or move
towards, AF-free route and rtable layers.
While here stop the madness and pass the size of the maximum key length
in *byte* to rn_inithead0().
ok claudio@, mikeb@
|
|
As a side effect there's no need to run if_attachdomain() after the
list of domains has been built.
ok claudio@, reyk@
|
|
for human sacrifices to get this fixed in a reasonably near future, and the
tree must build.
|
|
"shared reference pointers".
srp allows concurrent access to a data structure by multiple cpus
while avoiding interlocking cpu opcodes. it manages its own reference
counts and the garbage collection of those data structure to avoid
use after frees.
internally srp is a twisted version of hazard pointers, which are
a relative of RCU.
jmatthew wrote the bulk of a hazard pointer implementation and
changed bpf to use it to allow mpsafe access to bpfilters. however,
at s2k15 we were trying to apply it to other data structures but
the memory overhead of every hazard pointer would have blown out
significantly in several uses cases. a bulk of our time at s2k15
was spent reworking hazard pointers into srp.
this diff adds the srp api and adds the necessary metadata to struct
cpuinfo on our MP architectures. srp on uniprocessor platforms has
alternate code that is optimised because it knows there'll be no
concurrent access to data by multiple cpus.
srp is made available to the system via param.h, so it should be
available everywhere in the kernel.
the docs likely need improvement cos im too close to the implementation.
ok mpi@
|
|
the problems it tickled by working outside the biglock on archs
with mutex and clock interaction have been fixed, as evidenced by
the softnet taskq.
ok deraadt@
|
|
|
|
delete coredump_trad(), uvm_coredump(), cpu_coredump(), struct md_coredump,
and various #includes that are superfluous.
This leaves compat_linux processes without a coredump callback. If that
ability is desired, someone should update it to use coredump_elf32() and
verify the results...
ok kettenis@
|
|
|
|
archs and this is the only interesting diff in the window.
|
|
now that idle pool pages are timestamped we can tell how long theyve
been idle. this adds a task that runs every second that iterates
over all the pools looking for pages that have been idle for 8
seconds so it can free them.
this idea probably came from a conversation with tedu@ months ago.
ok tedu@ kettenis@
|
|
setting up process0, 'cause I'm sick of forgetting to update main()
when touching process_new()
ok blambert@ miod@
|
|
vm_minsaddr or vm_maxsaddr, depending upon the direction the stack goes in.
This should have no effect on the existing behaviourrr.
ok kettenis@ deraadt@
|
|
|
|
initialized. Calling malloc(9) at that point is not a good idea. So
initialize consbuf later.
Fixes dmesg -s on sparc64 (and probably a few other architectures).
ok miod@, deraadt@
|
|
|
|
before you, to see their files reduced to ashes, to see those who
love them shrouded in tears, and to gather into your API all their
invocations.
In other words, workq is no more. There is only taskq.
ok kettenis@ dlg@ (creator of taskq) jmc@
|
|
doesn't have all the values and therefore can't be used everywhere.
ok deraadt@ kettenis@
|
|
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt
|
|
eliminating the must-be-kept-in-sync UVM_INH_* macros
ok deraadt@ tedu@
|
|
|
|
Regression spotted by tobiasu@.
XXX I wonder if the page zeroing thread shouldn't perform explicit
XXX pmap_update(pmap_kernel()) calls after each page zeroing... but that
XXX might not be enough.
|
|
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
|
|
causes a deadlock between reaper and zerothread I am currently investigating.
|
|
introduce a new sysctl, hw.perfpolicy, that governs the policy.
when set to anything other than manual, hw.setperf then becomes read only.
phessler was heading in this direction, but this is slightly different. :)
|
|
|
|
|
|
enabled by setting hw.setperf=-1. some other bugs preventing this from
going in before have been fixed. my thanks to phessler for keeping the
diff alive in the mean time. tested by several to not regress.
|
|
way we can do some useful kernel lock in parallel with other things and create
a reservoir of zeroed pages ready for use elsewhere. This should reduce
latency. The thread runs at the absolutel lowest priority such that we don't
keep other kernel threads or userland from doing useful work.
Can be easily disabled by disabling the kthread_create(9) call in main().
Which perhaps we should do for non-MP kernels.
ok deraadt@, tedu@
|
|
|
|
Remember initprocess instead of initproc.
ok matthew@ blambert@
|
|
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
|
|
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@
|
|
and FORK_SYSTEM as a flag to set them. This eliminates needing to
peek into other processes threads in various places. Inspired by NetBSD
ok miod@ matthew@
|
|
to avoid possible use-after-free references when swapping ids in threaded
processes. "Do I have the right creds?" checks are always made with the
threads creds.
Inspired by FreeBSD and NetBSD
"right time" deraadt@
|
|
any context if they feel like it.
ok deraadt@, guenther@
(who both suggested we could probably grab it even earlier)
|