summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2009-08-03timeout_add -> timeout_add_msecBret Lambert
ok dlg@
2009-08-02Dynamic buffer cache support - a re-commit of what was backed outBob Beck
after c2k9 allows buffer cache to be extended and grow/shrink dynamically tested by many, ok oga@, "why not just commit it" deraadt@
2009-07-30We enable POOL_DEBUG (except in a release)Theo de Raadt
2009-07-21Handle the case where so_pcb is NULL.Todd C. Miller
2009-07-19Hook up "text" (executable) output and implement for fuser too.Todd C. Miller
Man page bits adapted from FreeBSD. OK miod@
2009-07-19clalloc() can't fail, so there's no need to handle failure cases.Bret Lambert
Change to void function. Also, no need to have global tty stats pointer, so just return it from clalloc, as the caller frees it immediately anyway. ok miod@
2009-07-09Remove the VREF() macro and replaces all instances with a call to verf(),Thordur I. Bjornsson
which is exactly what the macro does. Macro's that are nothing more then: #define FUNCTION(arg) function(arg) are almost always pointless and should go away. OK blambert@ Agreed by many.
2009-06-25backout the buf_acquire() does the bremfree() since all callersThordur I. Bjornsson
where doing bremfree() befure calling buf_acquire(). This is causing us headache pinning down a bug that showed up when deraadt@ too cvs to current, and will have to be done anyway as a preperation for backouts. OK deraadt@
2009-06-24Remove a semicolon at the end of an if statement that made the threadJonathan Gray
waiting for all the workqs to die wakeup more often than it should have. ok dlg@ tedu@
2009-06-24Remove extra psignal/wakeup in exit1() which can cause the parent toKurt Miller
receive SIGCHLD twice if scheduled before the reaper runs. diff by guenther@ and myself. okay guenther@ deraadt@
2009-06-24turn off POOL_DEBUG as we go into release; pointed out by mpfTheo de Raadt
2009-06-22sync m_inithdr() with m_gethdr() after theThordur I. Bjornsson
addition of rdomain to struct pkthdr. "Doh!" claudio@ ok henning@
2009-06-17Revert bufq's. this is inline with the major midlayer reverts thatThordur I. Bjornsson
have been going on. this appears to bring us back to stable state. lots of testing by oga and ariane and my self.
2009-06-16Backout all changes to uvm after pmemrange (which will be backed outOwain Ainsworth
separately). a change at or just before the hackathon has either exposed or added a very very nasty memory corruption bug that is giving us hell right now. So in the interest of kernel stability these diffs are being backed out until such a time as that corruption bug has been found and squashed, then the ones that are proven good may slowly return. a quick hitlist of the main commits this backs out: mine: uvm_objwire the lock change in uvm_swap.c using trees for uvm objects instead of the hash removing the pgo_releasepg callback. art@'s: putting pmap_page_protect(VM_PROT_NONE) in uvm_pagedeactivate() since all callers called that just prior anyway. ok beck@, ariane@. prompted by deraadt@.
2009-06-15No you cannot remove a sysctl mib once you add it. It becomes ABI. ThatTheo de Raadt
is how sysctl finds them, so it can *never* be renumbered again, and must stay
2009-06-15syncTheo de Raadt
2009-06-15Back out all the buffer cache changes I committed during c2k9. This reverts ↵Bob Beck
three commits: 1) The sysctl allowing bufcachepercent to be changed at boot time. 2) The change moving the buffer cache hash chains to a red-black tree 3) The dynamic buffer cache (Which depended on the earlier too). ok on the backout from marco and todd
2009-06-14Don't mess with the bounds in the lp if *partoffp is non-NULL, since thisTheo de Raadt
indicates that writedisklabel is trying to find the location for writing the label. If the lp is messed with, an invalid checksum is written. done with miod and kettenis, lots of moaning and gnashing of teeth, etc
2009-06-12rework pool_get() a bit so that if you call if with a constructor setOwain Ainsworth
*and* PR_ZERO in flags, you will no longer zero our your nicely constructed object. Instead, now if you have a contructor set, and you set PR_ZERO, you will panic (it's invalid due to how constructor work). ok miod@ deraadt@ on earlier versions of the diff. ok tedu@ after he pointed out a couple of places I messed up. Problem initally noticed by ariane@ a while ago.
2009-06-09Fix userland regression tests by providing a #define for pool_setipl()Owain Ainsworth
(just a noop since that doesn't matter in userland). Pointed out by a couple of people, thanks.
2009-06-08must calculate iovlen or ktrace panics the machine; diff from blambertTheo de Raadt
and it is pretty critical so commiting it now. Any more fallout from the code 'simplication'?
2009-06-08some vnodes have a NULL mountpoint, so strlcpy of the f_mntonname if not advisedTheo de Raadt
2009-06-07Add KERN_FILE2 sysctl analogous to KERN_PROC2 but for file structures,Todd C. Miller
along with vnode type-specific info to make it more useful for fstat(1). OK deraadt@
2009-06-06We need miod's no-coredumps-on-ramdisks diff, because we have grown theTheo de Raadt
media just a wee bit too much.
2009-06-06All caller of buf_acquire were doing bremfree before the call.Artur Grabowski
Just put it in the buf_acquire function. oga@ ok
2009-06-05abort any time adjustment in progress if the clock is set with settimeofdayChris Kuethe
ok millert
2009-06-05Dynamic buffer cache sizing.Bob Beck
This commit won't change the default behaviour of the system unless the buffer cache size is increased with sysctl kern.bufcachepercent. By default our buffer cache is 10% of memory, which with this commit is now treated as a low water mark. If the buffer cache size is increased, the new size is treated as a high water mark and the buffer cache is permitted to grow to that percentage of memory. If the page daemon is invoked, the page daemon will ask the buffer cache to relenquish pages. if the buffer cache has more than the low water mark it will relenquish pages allowing them to be consumed by uvm. after a short period the buffer cache will attempt to re-grow back to the high water mark. This permits the use of a large buffer cache without penalizing the available memory for other purposes. Above the low water mark the buffer cache remains entirely subservient to the page daemon, so if uvm requires pages, the buffer cache will abandon them. ok art@ thib@ oga@
2009-06-05%zu is not meant for size_t in the kernel. Change to %lu.Ray Lai
OK miod
2009-06-05Clamp the ending bound to the size of the disk. This makes disklabel -ATheo de Raadt
still do the right thing if the MBR has a lie in it
2009-06-05Initial support for routing domains. This allows to bind interfaces toClaudio Jeker
alternate routing table and separate them from other interfaces in distinct routing tables. The same network can now be used in any doamin at the same time without causing conflicts. This diff is mostly mechanical and adds the necessary rdomain checks accross net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6. input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@
2009-06-04obvious shrinkage.Owain Ainsworth
ok krw@, miod@.
2009-06-04Recycle four ancient fields in the disklabel structure, replacing them withTheo de Raadt
bounds information, ie. the zone of the disk that OpenBSD can use. Have each pre-disklabel parser (MBR, DPME, or per-arch MD disklabel parsers) figure out this area and pass it up to userland. Then, delete all the same disk parsing code from disklabel(8) since the kernel passes it up. Lots and lots of - signs in the disklabel(8) code. Tested on as many platforms as possible, the fallout will be repaired as time goes on. To test, use disklabel -d <drive> and validate that the bounds do not overlap any boot blocks. This same information is used by disklabel -A... OK for the concept from krw, miod, and drahn
2009-06-04add $OpenBSD$ tagThordur I. Bjornsson
2009-06-04POOL_DEBUG and DIAGNOSTIC should be better friendsTheo de Raadt
2009-06-04the POOL_DEBUG checks needed to be more friendly with DIAGNOSTICTheo de Raadt
2009-06-04enable POOL_DEBUG again just for the hackathon.Owain Ainsworth
slackers now get more bugs to fix, yay! discussed with deraadt@.
2009-06-04unfuck msleep - fixed by art and ariane after much horror and teeth gnashingBob Beck
over why the processes were being woken up at splvm after the page daemon ran - and probably also had the page daemon running at splvm after the first pass through the loop. ok art@ weingart@ oga@ ariane@
2009-06-04don't use splvm ourselves, use pool_setipl on the pool we're allocatingOwain Ainsworth
from and it will do it for us. ok miod@
2009-06-04Put readv/writev changes back in, as they no longer hang ckuethe's ntpd.Bret Lambert
Special thanks to ckuethe's ntpd for noticing the problem. ok deraadt@
2009-06-03add a flexible buffer queue (bufq) api, based on the never usedThordur I. Bjornsson
one by tedu@. It doesn't do anything smart yet, it just uses plain old disksort. we also keep the old method of queueing bufs since some miods have crazy MD drivers that need some love. ok beck@, art@ tested by many on many archs.
2009-06-03add kern.bufcachepercent sysctl to allow adjusting the buffer cacheBob Beck
size on a running system. ok art@, oga@
2009-06-03xfs -> nnpfsThordur I. Bjornsson
2009-06-03syncJanne Johansson
2009-06-03remove bad #ifdef from syscall.masterJanne Johansson
2009-06-03Arla client rename from xfs to nnpfs for later upgrades. Tested on various ↵Janne Johansson
arches. ok todd@ beck@
2009-06-03Add a callback specifically for softraid. If you touch this kittens willMarco Peereboom
be murdered and theo will visit with a 2x4. ok deraadt
2009-06-03Change bufhash from the old grotty hash table to red-black trees hangingBob Beck
off the vnode. ok art@, oga@, miod@
2009-06-03Revert readv/writev changes, as they trigger an apparent file descriptorBret Lambert
deadlock for ckuethe@ "if you have to revert, you have to revert" deraadt@
2009-06-03remove the never used bufq_ code.Thordur I. Bjornsson
ok oga@ 'dance for me' blambert@
2009-06-02Change the wait-channel type to 'const volatile void *', eliminatingPhilip Guenthe
the need for casts when calling tsleep(), msleep(), and wakeup(). "I guess so" oga@ "it's masturbation" art@