summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2007-10-29For fd passing, at externalize time we are dealing with int[] not pointer[],Theo de Raadt
so we need to correct the mbuf length using CMSG_LEN() not CMSG_SPACE() test case was sparc64 sending 2 (or more) descriptors ok millert thib
2007-10-29MALLOC/FREE -> malloc/freeCharles Longeau
replace an hard coded value with M_WAITOK ok krw@
2007-10-29get rid of the unused cond_predicate_t typedef.David Gwynne
ok miod@ deraadt@ krw@
2007-10-21This QUEUE_DEBUG should really be DIAGNOSTIC - we need these checksBob Beck
normally. ok deraadt@ tedu@ otto@
2007-10-18Correct possible spl problem in buffer cleaning daemon - the buffer cleaningBob Beck
daemon requires splbio when doing dirty buffer queue manipulation. Since version 1.88 of vfs_bio.c, it was possible to break out of the processing loop when the cleaner had been running long enough, and this early exit would mean a future pass through would manipulate the buffer queues not at splbio. This change corrects this. ok krw@, deraadt@, tedu@, thib@
2007-10-16more remove unneeded declarations that shadows existing vars; ok by many.Federico G. Schwindt
2007-10-14remove tests for EIDRM and ENOMSG existence now that they're in the tree.Federico G. Schwindt
miod@ ok.
2007-10-11sched_lock_idle and sched_unlock_idle are obsolete now.Artur Grabowski
2007-10-10Make context switching much more MI:Artur Grabowski
- Move the functionality of choosing a process from cpu_switch into a much simpler function: cpu_switchto. Instead of having the locore code walk the run queues, let the MI code choose the process we want to run and only implement the context switching itself in MD code. - Let MD context switching run without worrying about spls or locks. - Instead of having the idle loop implemented with special contexts in MD code, implement one idle proc for each cpu. make the idle loop MI with MD hooks. - Change the proc lists from the old style vax queues to TAILQs. - Change the sleep queue from vax queues to TAILQs. This makes wakeup() go from O(n^2) to O(n) there will be some MD fallout, but it will be fixed shortly. There's also a few cleanups to be done after this. deraadt@, kettenis@ ok
2007-10-08Introduce %z for printf(9), like %z for printf(3). Used to printRay Lai
size_t and ssize_t variables. OK miod and cthulhu.
2007-09-26provide m_inithdr(), which takes an mbuf and gives an initialized M_PKTHDRHenning Brauer
mbuf back. for fixing PR5563 in a few, tested janjaap@stack.nl, ok claudio
2007-09-19instead of relying on mbuf.h to include pool.h and declareBret Lambert
mclpool as an extern, do so explicitly ok henning@ claudio@
2007-09-15Allow to pull out an usb stick with ffs filesystem while mountedAlexander Bluhm
and a file is written onto the stick. Without these fixes the machine panics or hangs. The usb fix calls the callback when the stick is pulled out to free the associated buffers. Otherwise we have busy buffers for ever and the automatic unmount will panic. The change in the scsi layer prevents passing down further dirty buffers to usb after the stick has been deactivated. In vfs the automatic unmount has moved from the function vgonel() to vop_generic_revoke(). Both are called when the sd device's vnode is removed. In vgonel() the VXLOCK is already held which can cause a deadlock. So call dounmount() earlier. ok krw@, I like this marco@, tested by ian@
2007-09-15replace ctob and btoc with ptoa and atop respectivelyMartin Reindl
help and ok miod@ thib@
2007-09-10Introduce a md pmap hook, pmap_remove_holes(), which is supposed to markMiod Vallat
the holes a MMU may have from a given vm_map. This will be automagically invoked for newly created vmspaces. On platforms with MMU holes (e.g. sun4, sun4c and vax), this prevents mmap(2) hints which would end up being in the hole to be accepted as valid, causing unexpected signals when the process tries to access the hole (since pmap can not fill the hole anyway). Unfortunately, the logic mmap() uses to pick a valid address for anonymous mappings needs work, as it will only try to find an address higher than the hint, which causes all mmap() with a hint in the hole to fail on vax. This will be improved later.
2007-09-08Sync description of lookup() a bit more to reality.Hans-Joerg Hoexer
ok thib@
2007-09-07Use M_ZERO in a few more places to shave bytes from the kernel.Artur Grabowski
eyeballed and ok dlg@
2007-09-07Add the long requested M_ZERO flag to malloc(9).Artur Grabowski
But the reason for this isn't some kind of "we can make it use the pre-zeroed pages and zero the freelist in the idle loop and OMG I can has optimisatiuns" which would require tons of infrastructure and make everything slower. The reason is that it shrinks other code. And that's good. dlg@ ok, henning@ ok (before he read the diff)
2007-09-03unsupported ioctl's should be returned with ENOTTYThordur I. Bjornsson
not -1; ok miod@
2007-09-01replace the machine dependant bytes-to-clicks macro by the MI ptoa()Martin Reindl
version for i386 more architectures and ctob() replacement is being worked on prodded by and ok miod
2007-09-01Remove support for ddb-only %r, %z, and the ddb-specific handling of %n fromMiod Vallat
the kernel printf. This will allow support for the real %z in the near future.
2007-08-30Fix lock ordering problems when updating mount points, in someThordur I. Bjornsson
cases we could end up releasing an unlocked lock. fixes pr's 5534 and 5564, confirmed by submitters. thanks!. ok art@
2007-08-16I don't really know what I was thinking when I wrote this. Not only does theArtur Grabowski
"array" index start at 1, the code also abused index 0 to detect that we were doing a KERN_POOL_NPOOLS. Just look at *name == KERN_POOL_NPOOLS instead of using index == 0 for that. deraadt@ ok
2007-08-09be more consistent in memcpy usage; no md5 change in .o; ok deraadt@Constantine A. Murenin
2007-08-07Correctly deal with EOF on pipe wrt kqueue. Based on a fix presentTodd C. Miller
in FreeBSD and NetBSD. OK art@ beck@
2007-08-07fix the "double-path" errors seen with getcwd by saving the orignalThordur I. Bjornsson
buffer position in vfs_getcwd_getcache() and restoring it on error. Use u_int32_t for the componentname hash, use the same type in the diagnostic code in relookup() to prevent unsigned vs signed errors. help, testing & ok kurt@ ok millert@, art@
2007-08-07 A few changes to deal with multi-user performance issues seen. thisBob Beck
brings us back roughly to 4.1 level performance, although this is still far from optimal as we have seen in a number of cases. This change 1) puts a lower bound on buffer cache queues to prevent starvation 2) fixes the code which looks for a buffer to recycle 3) reduces the number of vnodes back to 4.1 levels to avoid complex performance issues better addressed after 4.2 ok art@ deraadt@, tested by many
2007-08-06Fix error path in sys_fhopen() if VOP_ADVLOCK fails. Spotted by aaron@Todd C. Miller
2007-08-05Move some printf's about disklabel disksize and RAW_PART size/offsetKenneth R Westerback
under #ifdef DEBUG. Adjust the verbiage. Some minor tweaks while in the area. ok deraadt@
2007-08-05Use d_partitions[DISKPART(dev)] rather that d_partitions +Kenneth R Westerback
DISKPART(dev). Thus making the idiom the same everywhere. pointed out by deraadt@
2007-08-04Allow ddb>ps to print the full name of the wait state. Things likeChris Kuethe
"flt_noram1" would get truncated otherwise. ok deraadt
2007-07-25Back out the tracking of procs in struct selinfo. There's one seriousArtur Grabowski
bug in the code, but as soon as I try to fix it, it seems to trigger some other bugs. Instead of trying to figure out what's going on while everyone suffers, it's better to back out and figure out the bugs outside the tree.
2007-07-20Remove the MFREE() macro and replace it with a call to m_free().Claudio Jeker
Also remove the _MEXTREMOVE macro which was only used by MFREE. This time with the uipc_mbuf.c change that I missed last time.
2007-07-09Do not allow clustering read for filesystems which block size is smallerMiod Vallat
than the hardware page size, as was the case in the old clustering code. This fixes vnd reads on alpha and sparc64 On behalf of pedro@, ok art@
2007-07-03fix a memory leak that was introduced in r1.20 on 2007-06-24T05Z; ok dlgConstantine A. Murenin
2007-06-25use daddr64_t for size in bounds_check_with_label(); prompted by miod@;Otto Moerbeek
ok deraadt@
2007-06-24rework sensor tasks to use the kernels generic workq rather than a specialDavid Gwynne
kernel thread of its own. the api has changed (which will be fixed in the manpage shortly) so all the users of sensor tasks that i can find have been fixed too. noone tested, so its going in to force people to run with it. "put it in" deraadt@
2007-06-21english, okay jmc@Pedro Martelletto
2007-06-20b_cylinder does not need to be set on the callpath down into drivers.Theo de Raadt
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
2007-06-18ansify/de-register.Jasper Lievisse Adriaanse
no binary change
2007-06-17de-registerJasper Lievisse Adriaanse
ok thib@
2007-06-17significantly simplified disklabel infrastructure. MBR handling becomes MITheo de Raadt
to support hotplug media on most architectures. disklabel setup and verification done using new helper functions. Disklabels must *always* have a correct checksum now. Same code paths are used to learn on-disk location disklabels, to avoid new errors sneaking in. Tested on almost all cases, testing help from todd, kettenis, krw, otto, dlg, robert, gwk, drahn
2007-06-14Forgotten hackton diff: bounds check for seek on special devicesOtto Moerbeek
with a disklabel. Original diff from pedro@; ok pedro@ deraadt@
2007-06-11kill unneeded include;Thordur I. Bjornsson
(stdarg.h, leftover from the vararg's idea). ok tedu@
2007-06-10when we change fields in the label to version 1, fix the checksum (but onlyTheo de Raadt
if it was ok beforehands)
2007-06-10Add netbt files to common files for "make tags"Uwe Stuehler
2007-06-09blocks/sectors != blocks/blocks. Fix calculation of b_cylinder inKenneth R Westerback
bounds_check_with_label(). Tweak error path to eliminate duplicate code.
2007-06-09The differences in the last non-homogeneous bounds_check_with_label()Kenneth R Westerback
routines (alpha, vax) prove to be not worth keeping. Move bounds_check_with_label() into the MI world. Eliminate unreliable and almost certainly useless checks for overwriting a disklabel. After discussion with deraadt@
2007-06-09silently whack wrong-sized C partitionsTheo de Raadt
2007-06-09Protect access to 'bufhead' with splbio(), okay art@ millert@ marco@Pedro Martelletto