summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2009-05-06endrun(4) - EndRun Technologies native time-of-day message timedeltaKevin Steves
sensor. Based on msts(4). Tested with Praecis Ct (http://www.endruntechnologies.com/network-time-source.htm). help and feedback mbalmer 'no problem with this sensor going in' deraadt
2009-05-06remove erroneous fldcnt test. fldcnt can never be 13 here. this isKevin Steves
apparently a leftover from tty_nmea.c
2009-05-03Discovering an extended MBR partition and setting 'wander' to 1Kenneth R Westerback
should not stop the spoofing process. Setting 'wander' means when we are done with this MBR, read the next one. Problem noted and fix tested by Nick Guenther. ok weingart@ (I think), deraadt@
2009-04-26don't zero sensor .value and .flags immediately after the allocation w/ ↵Constantine A. Murenin
M_ZERO; ok deraadt
2009-04-24Change format strings to allow 64 bit addresses to display properly,Jonathan Gray
and add a missing argument to one of the printf calls. ok art@
2009-04-22Make the interactions in allocating buffers less confusing.Artur Grabowski
- getnewbuf dies. instead of having getnewbuf, buf_get, buf_stub and buf_init we now have buf_get that is smaller than some of those functions were before. - Instead of allocating anonymous buffers and then freeing them if we happened to lose the race to the hash, always allocate a buffer knowing which <vnode, block> it will belong to. - In cluster read, instead of allocating an anonymous buffer to cover the whole read and then stubs for every buffer under it, make the first buffer in the cluster cover the whole range and then shrink it in the callback. now, all buffers are always on the correct hash and we always know their identity. discussed with many, kettenis@ ok
2009-04-22When starting up idle, explicitly set p_cpu and the peg flag for theArtur Grabowski
idle proc. p_cpu might be necessary in the future and pegging is just to be extra safe (although we'll be horribly broken if the idle proc ever ends up where that flag is checked).
2009-04-22initialise the constructor and destructor function pointers to NULLDavid Gwynne
in pool_init so you the pool struct doesn't have to be zeroed before you init it.
2009-04-20Make pegging a proc work when there are idle cpus that are looking forArtur Grabowski
something to do. Walk the highest priority queue looking for a proc to steal and skip those that are pegged. We could consider walking the other queues in the future too, but this should do for now. kettenis@ guenther@ ok
2009-04-19Count number of cpus found (potentially not attached) and store thatTheo de Raadt
in sysctl hw.ncpufound; ok miod kettenis
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@