summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2009-04-19Add a new EX_FILLED flag to make extent_create() create an extent map thatMark Kettenis
has all space allocated such that we can make holes in it using extent_free(). ok miod@
2009-04-17Remove unused function proc_isunder()Bret Lambert
"go for it" tedu@
2009-04-15Misplaced comment.Artur Grabowski
From Kirill Timofeev
2009-04-14Some tweaks to the cpu affinity code.Artur Grabowski
- Split up choosing of cpu between fork and "normal" cases. Fork is very different and should be treated as such. - Instead of implicitly choosing a cpu in setrunqueue, do it outside where it actually makes sense. - Just because a cpu is marked as idle doesn't mean it will be soon. There could be a thundering herd effect if we call wakeup from an interrupt handler, so subtract cpus with queued processes when deciding which cpu is actually idle. - some simplifications allowed by the above. kettenis@ ok (except one bugfix that was not in the intial diff)
2009-04-10Add EX_CONFLICTOK flag that allows an allocation to conflict with existingMark Kettenis
allocations, making sure that the union of all space is allocated. ok deraadt@
2009-04-04Make extent_print() use printf to avoid the pagination that db_printfMark Kettenis
provides, while keeping this behaviour for extent_print_all() which is only called by ddb. Based on a diff from deraadt@.
2009-04-03Make sure that sys_reboot runs on the primary cpu. Won't hurt when notArtur Grabowski
needed, but some machines seem to work much better with it.
2009-04-03sched_peg_curproc_to_cpu() - function to force a proc to stay on a cpuArtur Grabowski
forever.
2009-04-03Fix SEM_UNDO handling for rthreads: use the struct process* insteadPhilip Guenthe
of the struct proc* as the identifier for SEM_UNDO tracking and only call semexit() from the original thread, once the process as a whole is exiting ok tedu@
2009-03-30bzero -> PR_ZEROBret Lambert
ok art@, henning@
2009-03-28use a static and unique string as the disk lock name, so if we're waitingDavid Gwynne
on the disk lock we can find that code rather than wondering where "sd0" gets passed to tsleep. ok deraadt@
2009-03-26Remove cpu_wait(). It's original use was to be called from the reaper soOwain Ainsworth
MD code would free resources that couldn't be freed until we were no longer running in that processor. However, it's is unused on all architectures since mikeb@'s tss changes on x86 earlier in the year. ok miod@
2009-03-25ntfs was the last user, LK_SLEEFAIL can die now.Owain Ainsworth
ok blambert@
2009-03-24Only copy out the revents field, not the whole pollfd structure. ThisKurt Miller
allows threaded programs to concurrently update the events field while a thread is blocked in poll(2). okay deraadt@ millert@
2009-03-24only apply the strict limit on F_SETLK; ok deraadt@ fgsch@Otto Moerbeek
2009-03-23fix buffer cache pending writs statistic so it does not go negative.Bob Beck
this ensures we ignore counting any buffers returning through biodone() for which B_PHYS has been set - which should be set on all transfers that manually do raw io bypassing the buffer cache by setting up their own buffer and calling strategy.. ok thib@, todd@, and now that he is a buffer cache and nfs hacker oga@
2009-03-23Processor affinity for processes.Artur Grabowski
- Split up run queues so that every cpu has one. - Make setrunqueue choose the cpu where we want to make this process runnable (this should be refined and less brutal in the future). - When choosing the cpu where we want to run, make some kind of educated guess where it will be best to run (very naive right now). Other: - Set operations for sets of cpus. - load average calculations per cpu. - sched_is_idle() -> curcpu_is_idle() tested, debugged and prodded by many@
2009-03-23advisory locks should return ENOLCK if we're out of locks.Otto Moerbeek
ok deraadt@ fgs@
2009-03-15Introduce splsoftassert(), similar to splassert() but for soft interruptMiod Vallat
levels. This will allow for platforms where soft interrupt levels do not map to real hardware interrupt levels to have soft ipl values overlapping hard ipl values without breaking spl asserts.
2009-03-12regenPhilip Guenthe
2009-03-12threxit() can't return, so its return type is really voidPhilip Guenthe
"probably does not need a crank, so perhaps just go for it" deraadt@
2009-03-09Clarify comment in namei(): the code commented doesn't check if theBret Lambert
path being looked up *is* a symlink, it checks if it *is not* a symlink and returns the vnode looked up in that case. ok thib@
2009-03-08If a session leader exists s_leader is set to NULL, so don't dereference itMark Kettenis
unconditionally. ok miod@
2009-03-05Make ELF platforms generate ELF core dumps. Somewhat based on code fromMark Kettenis
NetBSD. ok kurt@, drahn@, miod@
2009-03-03put back r1.25 (poisoning chain pointers after removing items from theMiod Vallat
wheel). This was safe, except for osiop bugs.
2009-03-02the packet length passed to m_clget is a u_int, print it with %u not %d inDavid Gwynne
the panic string.
2009-02-22Don't enforce a minimum size for nkmempages by default; if the computedMiod Vallat
value (based on physmem) is below NKMEMPAGES_MIN, we are on a low memory machine and can not afford more anyway. ok deraadt@ tedu@
2009-02-22fix PR 6082: do not create more fd's than will fit in the message onOtto Moerbeek
the receiving side when passing fd's. ok deraadt@ kettenis@
2009-02-17ensure all pi_magic checks are inside DIAGNOSTICTheo de Raadt
2009-02-16at tedu's request, bring back the basic single "first word" PI_MAGIC checkTheo de Raadt
since it is essentially free. To turn on the checking of the rest of the allocation, use 'option POOL_DEBUG' ok tedu
2009-02-16Disable pool debug stuff for the release (it has a performance hit, butTheo de Raadt
between releases we may want to turn it on, since it has uncovered real bugs) ok miod henning etc etc
2009-02-13use nitems(); dunnoseriously@gmailTheo de Raadt
2009-02-10Sync with current MI tree.Alexander Yurchenko
ok miod@
2009-02-09Don't panic if m_copyback() is working on a M_READONLY() mbuf. The old versionClaudio Jeker
did not care either and with this packets from drivers with external buffers (e.g. wpi(4)) would trigger this panic through pf(4). Found the hard way by Tim van der Molen tbvdm (at) xs4all (dot) nl
2009-02-09two more consistency checks for a disklabel, to prevent havoc laterOtto Moerbeek
on; prompted by Thorsten Glaser; ok miod@ krw@
2009-02-04Make m_copyback() a lot smarter. Make it use all of the last mbufClaudio Jeker
(M_TRAILINGSPACE()) and allocate one cluster if needed (instead of chaining many mbufs). Somewhat needed for the rl(4) fix to ensure that the ethernet header is in one mbuf for sure. Tested by landry@ and myself
2009-01-29Remove KASSERT() that could trigger when an rthread in sigwait()Philip Guenthe
got multiple signals before tsleep() could wakeup. Also, POSIX says that sigwait() should never return EINTR, so map that to ERESTART. ok kurt@, tedu@ fixes the panic encountered by ariane@ with kaffe
2009-01-29Switch struct stat's timespec members to the names standardized inPhilip Guenthe
POSIX 1003.1-2008, with compatibility macros for the names used in previous version of OpenBSD. Update all the references in the kernel to use the new, standard member names. ok'ed by miod@, otto@; ports build test by naddy@
2009-01-27make drivers tell the mclgeti allocator what their maximum ring size isDavid Gwynne
to prevent the hwm growing beyond that. this allows the livelock mitigation to do something where the hwm used to grow beyond twice the rx rings size. ok kettenis@ claudio@
2009-01-26Remove unneeded brackets that where left over from when these were macros.Claudio Jeker
OK dlg@
2009-01-24propagate the O_EXCL flag down to the file systems, by settingThordur I. Bjornsson
VA_EXCLUSIVE. Handle this in NFS, also in NFS use arc4random() for the create verifier instead of an uninitialized long and the address of the first interface (which is likely to be lo0). Lifted from NetBSD with small tweaks; "looks good", miod@ OK blambert@
2009-01-21Pass the new pointer to sysctl_clockrate(), so that trying to change theMiod Vallat
value of kern.clockrate with sysctl(3) correctly sets errno on failure. PR #6040, ok tedu@
2009-01-15Fix a memory leak in in the case where semget() is called with aOwain Ainsworth
non-private key and flags of IPC_CREAT. Before, if we found an existing semaphore, we jumped to the return and forgot the free the preallocated semaphore. Instead, free it before we jump. Bug reported by Roland Bramm; thanks! ok miod@.
2009-01-15Surround WEHOLDIT() macro with braces to make it more safe.Alexander Yurchenko
No binary change. ok otto@
2009-01-14correct test when checking the default operation entry.Federico G. Schwindt
from patrick keshishian <sidster at boxsoft dot com>
2009-01-13Change sbreserve() to return 0 on success, 1 on failure, as god intended.Bret Lambert
This sort of breaking with traditional and expected behavior annoys me. "yes!" henning@
2009-01-12make compile with #define MSTS_DEBUG; ok mbalmer@Kevin Steves
2009-01-121) remove invalid comment since first field is not message typeKevin Steves
in msts 2) modify debug string to not print first field (which is not the sentence message type) ok mbalmer@
2009-01-12comment should be epoch not midnight; ok mbalmer@Kevin Steves
2009-01-11backout revision 1.109Owain Ainsworth
"keep b_proc set to the process, thats doing the io as advertised" This broke dvd playing on my laptop (page fault trap in vmapbuf in the physio path). thib's cookie privileges are hereby suspended until further notice.