Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
ordering regions mapped executable, so remove those permissions.
ok deraadt@
|
|
isnt descriptive enough for me.
ok deraadt@
|
|
later on
ok deraadt@
|
|
|
|
|
|
gets only allocated when needed. This way struct socket shrinks
from 472 to 392 bytes on amd64. When splicing gets active, another
88 bytes are allocated for struct sosplice.
OK dlg@
|
|
|
|
ok doug tedu
|
|
ok deraadt, kettenis
|
|
|
|
|
|
|
|
|
|
doesn't need to hold an extra reference during the call
ok deraadt@ millert@
|
|
causes a deadlock between reaper and zerothread I am currently investigating.
|
|
Both sys_mkfifo(2) and sys_mkfifoat(2) could be replace by libc wrappers
using mknodat(2) at a later date if we desire. OK guenther@
|
|
|
|
redundant copies of the same information. No functional change.
Also add some comments as to how these globals are used.
|
|
construct ELF executables for which ep_daddr ends up not being properly
aligned. Sanitize the addresses before setting up the address space for the
new executable. Should fix the panic discovered by Alejandro Hernandez.
ok miod@
|
|
MD code needs excess #ifndef SMALL_KERNEL
|
|
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. :)
|
|
hibernate anymore.
|
|
|
|
|
|
tweaks and ok millert@ deraadt@
|
|
i couldnt measure a significant performance difference with or
without it. this is likely a function of the memory involved being
close to bits that are already being touched, the implemention being
simple macros that mean registers can stay hot, and a lack of
conditionals that would cause a cpu pipeline to crash.
this means we're unconditionally poisoning the first two u_longs
of pool items on all kernels. i think it also makes the code easier
to read.
discussed with deraadt@
|
|
|
|
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.
|
|
previously they were ints, but this bumps them to long sized words.
in the pool item headers they were followed by the XSIMPLEQ entries,
which are basically pointers which got long word alignment. this
meant there was a 4 byte gap on 64bit architectures between the
magic and list entry that wasnt being poisoned or checked.
this change also uses the header magic (which is sourced from
arc4random) with an xor of the item address to poison the item magic
value. this is inspired by tedu's XSIMPLEQ lists, and means we'll
be exercising memory with more bit patterns.
lastly, this takes more care around the handling of the pool_debug
flag. pool pages read it when theyre created and stash a local copy
of it. from then on all items returned to the page will be poisoned
based on the pages local copy of the flag. items allocated off the
page will be checked for valid poisoning only if both the page and
pool_debug flags are both set.
this avoids a race where pool_debug was not set when an item is
freed (so it wouldnt get poisoned), then gets set, then an item
gets allocated and fails the poison checks because pool_debug wasnt
set when it was freed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ok deraadt@ dlg@ phessler@
|
|
to see if we've hogged the cpu for >1 second.
okay miod@
|
|
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@
|
|
coordinate with other mbufs so you can add all the pointers without
taking the extref lock.
looks good deraadt@
|
|
snuck in.
someone who knows how cpp/cc works can explain to me why this
compiled.
|
|
of pools mpsafe too.
this calles pool_setipl(IPL_NET) against the mbuf and cluster pools,
and removes the use of splnet().
the other locking done in the mbuf layer is for external cluster
references. again, they relied on splnet to serialise these operations.
because there is no shared memory associated with external clusters
(except the cluster itself, which is completely dedicated to data
payload, not meta info like a refcount or lock), this has been
replaced with a single mutex that all reference ops are serialised
with.
tested by me, jmatthew@, bcook@, and phessler@
|
|
|
|
and km_free(9) calls.
ok tedu@, mlarkin@
|
|
ok dlg
|
|
|
|
deep down in the suspend path, where it is really hard to recover from
allocation failure. So allocate the piglet early on in the suspend path.
Also change the piglet and piglet allocation functions to use km_alloc(9)
instead of doing pmemrange magic. This removes a bunch of code which, in the
case of the piglet allocation, is broken since it results in a NULL pointer
dereference. Also switch the piglet allocation to not wait. If we can't
allocate 16MB of phys contig memory on a halfway modern machine we're almost
certainly under a lot of memory pressure and we're better off not trying to
hibernate anyway.
ok mlarkin@
|
|
in pool_setlowat.
this was stopping arm things from getting spare items into their
pmap entry pools, so things that really needed them in a delicate
part of boot were failing.
reported by rapha@
co-debugging with miod@
|