summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2007-12-23protect the disk statistics with a mutex.David Gwynne
ok tedu@ kettenis@
2007-12-20Remove an obsolete nfs kludge, spotted by Frank Denis (many thanks), also ↵Charles Longeau
there in NetBSD and FreeBSD trees. Tested by thib@ who found that it shaved 18min wall clock time of coping a 20G file. Been in snaps for some time "looks ok" markus@ "makes sense" blambert@ ok claudio@ thib@
2007-12-16panic on negative blkno or size; ok kettenis@ deraadt@Otto Moerbeek
2007-12-13replace calls to ltsleep with tsleepBret Lambert
remove PNORELOCK flag, as PNORELOCK is used for msleep ok art@ thib@
2007-12-13use a mutex to protect workq. incidentally, this removes the additionalTed Unangst
creation of threads which may have caused multile syswq threads to start. ok dlg
2007-12-12regenThordur I. Bjornsson
2007-12-12Garbage collect a few members of the vnodeop_desc structure,Thordur I. Bjornsson
they where used to keep "offsets" of arguments too the VOP's for use by bypass routines, these have been unused now for quite some time; Tested on sparc64/amd64 (shaves about 1k of GENERIC). ok beck@
2007-12-11Don't store arguments and environment in the space reserved for stackgap onMark Kettenis
machines where the stack grows up. Fixes systrace(1) on hppa. ok deraadt@
2007-12-11remove an overlooked simple_lock everybody likes to point out to me.Ted Unangst
2007-12-11release the pool mutex if we may sleep in the backendTed Unangst
2007-12-09big patch to simplify pool code.Ted Unangst
remove pool_cache code. it was barely used, and quite complex. it's silly to have both a "fast" and "faster" allocation interface. provide a ctor/dtor interface, and convert the few cache users to use it. no caching at this time. use mutexes to protect pools. they should be initialized with pool_setipl if the pool may be used in an interrupt context, without existing spl protection. ok art deraadt thib
2007-11-30Fix msleep.Owain Ainsworth
Since mutexes mess around with spl levels, and the sched-lock isn't a mutex, we need to make sure to fix the IPL when msleep does the locking. ok art.
2007-11-28Add msleep. This is identical to tsleep but it takes a mutex as aOwain Ainsworth
parameter. The mutex is unlocked just before sleep and relocked after unless P_NORELOCK is in flags, in which case it is left unlocked. ok art@.
2007-11-28g/c mfs_mountroot() and mfs_initminiroot(). We don't support root onTodd C. Miller
mfs. OK deraadt@
2007-11-28a few more places where getmicrotime is good enough. ok miodTed Unangst
2007-11-28When updating the timestamps on pipes, use getnanotime() instead of moreMiod Vallat
accurate but more expensive nanotime(), the loss of precision shouldn't matter. Inspired from the other *BSD which did a similar change. ok tedu@ millert@ henning@ deraadt@
2007-11-28remove the DIRECTOK flag. the caller semantics were too weird, and it's aTed Unangst
bad idea to have functions that react unpredictably.
2007-11-28syncTheo de Raadt
2007-11-28COMPAT_09 uname is only used by freebsd compat, so move it to the right placeTheo de Raadt
2007-11-27regenArtur Grabowski
2007-11-27Mark getpid as NOLOCK just for testing.Artur Grabowski
2007-11-27Add possibility to add flags to syscalls in syscalls.master to markArtur Grabowski
syscalls as NOLOCK and MPSAFE. The flags have slightly different semantics: NOLOCK - the syscall doesn't grab any locks whatsoever. MPSAFE - the syscall deals with its own locking. What this means in practice is that NOLOCK syscalls can always be done without the biglock. The MPSAFE syscalls can be done without the biglock on CPUs that don't handle interrupts that require biglock (to preserve lock ordering). deraadt@ ok
2007-11-27make the deceptively complicated leading and trailing space into functions.Ted Unangst
this reduces kernel size quite a bit. ok claudio
2007-11-27typos; ok jmc@Martynas Venckus
sys/dev/pci/pciide.c from naddy@
2007-11-27Only checksum the NMEA sentence if it as GPRMC message.Marc Balmer
suggested by otto.
2007-11-26Degrade the timedelta if the GPS reports a warning condition for more thanMarc Balmer
ten minutes (or if a serial GPS is disconnect and we get no NMEA sentences at all). ok otto
2007-11-26Move the implementation of __mp_lock (biglock) into machine dependentArtur Grabowski
code. At this moment all architectures get the copy of the old code except i386 which gets a new shiny implementation that doesn't spin at splhigh (doh!) and doesn't try to grab the biglock when releasing the biglock (double doh!). Shaves 10% of system time during kernel compile and might solve a few bugs as a bonus. Other architectures coming shortly. miod@ deraadt@ ok
2007-11-26Remove some dead code that is confusing my greps.Artur Grabowski
2007-11-25convert crypto thread to workq. add WQ_DIRECTOK flag to workq.Ted Unangst
combined, this lets us use crypto before the thread is running and therefore cryptoraid can attach nice and early. ok/testing deraadt mbalmer marco
2007-11-23Since the devices that we detach may have children we cannot rely on theMark Kettenis
"previous" device still being there, so if we detach a device, we really have to start from scratch again (like the comment on this code actually says we should). Simplifies the code as a bonus. ok dlg@, deraadt@
2007-11-19Don't overwrite a core file owned by a different user. Makes the codeTodd C. Miller
match the comment. OK deraadt@
2007-11-16er, the newline is wrong. dissapointing.Theo de Raadt
2007-11-15newline before syncing disks is way prettierTheo de Raadt
2007-11-09Make disklabel aware of NTFS.Joel Sing
ok miod@ krw@
2007-11-03Fix LKM support for amd64.Mike Belopuhov
ok deraadt weingart
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.