summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2004-08-15protect code dealing with the vnode sync list with splbio(). fixes thePedro Martelletto
'fsync failed' panic on amd64. discussed with and ok'd by art@, tedu@ and deraadt@. tested by many (thanks).
2004-08-06provide md USPACE_ALIGN zero on all but mips; deradat@ pefo@ okMichael Shalayeff
2004-08-05Fix typos. Found by Dries SchellekensArtur Grabowski
2004-08-05don't attempt to put processes back in a directory after unmount.Ted Unangst
it could never always work, and worse, may cause other bugs/crashes.
2004-08-04hardclock detects if ITIMER_VIRTUAL and ITIMER_PROF have expired andArtur Grabowski
sends SIGVTALRM and SIGPROF to the process if they had. There is a big problem with calling psignal from hardclock on MULTIPROCESSOR machines though. It means we need to protect all signal state in the process with a lock because hardclock doesn't obtain KERNEL_LOCK. Trying to track down all the tentacles of this quickly becomes very messy. What saves us at the moment is that SCHED_LOCK (which is used to protect parts of the signal state, but not all) happens to be recursive and forgives small and big errors. That's about to change. So instead of trying to hunt down all the locking problems here, just make hardclock not send signals. Instead hardclock schedules a timeout that will send the signal later. There are many reasons why this works just as good as the previous code, all explained in a comment written in big, friendly letters in kern_clock. miod@ ok noone else dared to ok this, but noone screamed in agony either.
2004-08-04Uninline vputonfreelist.Artur Grabowski
2004-08-04Even when we have timecounters we still have to do the check for secondaryArtur Grabowski
cpus calling hardclock and the statclock emulation. Move some ifdef __HAVE_TIMECOUNTER code.
2004-08-04- Match time_second and time_uptime prototypes.Artur Grabowski
- Less chatty.
2004-08-04better commentsPedro Martelletto
2004-08-03Fix a minor bug where indirect config crashes the kernelPer Fogelstrom
when match verbose is turend on.
2004-08-03NFS commit coalescion: instead of sending a commit for each block, coalescemarius eriksen
these into larger ranges wherever possible. this should speed up NFS writes quite a bit. ok art@ millert@ pedro@ tedu@
2004-08-03Print more diagnostics on fsync failure in sched_sync.Artur Grabowski
2004-08-02- check for LK_NOWAIT on vget()Pedro Martelletto
- use ltsleep() instead of the unlock + sleep combo ok art@, inspiration from free/net
2004-08-01leave space for stackgap on growsuppersMichael Shalayeff
2004-07-29proper condition for freeing a page and fix a comment appropriately; art@ ↵Michael Shalayeff
tedu@ ok
2004-07-29put the scheduler in its own file. reduces clutter, and logically separatesTed Unangst
"put this process to sleep" and "find a process to run" operations. no functional change. ok art@
2004-07-28This touches only MI code, and adds new time keeping code. TheThorsten Lockert
code is all conditionalized on __HAVE_TIMECOUNTER, and not enabled on any platforms. adjtime(2) support exists, courtesy of nordin@, sysctl(2) support and a concept of quality for each time source attached exists. High quality time sources exists for PIIX4 ACPI timer as well as some AMD power management chips. This will have to be redone once we actually add ACPI support (at that time we need to use the ACPI interfaces to get at these clocks). ok art@ ken@ miod@ jmc@ and many more
2004-07-28Call dom_dispose() for any SCM_RIGHTS message that went through theTodd C. Miller
read path rather than recv. Previously, if an fd was passed via sendmsg() but was consumed by the receiver via read() the ref count was incremented and never decremented and so the ref count would never reach zero even when there was no long any processes holding the file open (this was especially bad for locked fds). OK markus@ and art@
2004-07-25move db_show_all_procs to kern_proc.c, proc_printit goes in DDB too.Ted Unangst
shuffle functions around so that scheduler is all together. no real functional changes. ok art@ testing miod@
2004-07-22SIMPLELOCK -> mutex for the lock around deadproc list.Artur Grabowski
Also move the whole deadproc infrastructure to kern_exit, it's only used there. miod@ ok
2004-07-22fix cases when m_dup1() returned mbuf chain (instead of single mbuf).Jun-ichiro itojun Hagino
yamt@netbsd
2004-07-22remove p arg from fdplockTed Unangst
2004-07-21In pipe_read, when the pipelock fails (most likely because we catch aArtur Grabowski
signal), don't jump to unlocked_error: and do things that we don't need to do (including messing up the internal state of the pipe). Just return. ok niklas@ miod@
2004-07-21I was wrong. The assymetry created by the proc argument to rw_enter_writeArtur Grabowski
is horrible and doesn't add anything. Remove it. XXX - the fdplock macro will need a separate cleanup. niklas@ markus@ ok
2004-07-20ifdef DDB a few functions only used (or usable) from DDB.Artur Grabowski
2004-07-20The timeout wheels are manipulated by hardclock that's not protected withArtur Grabowski
biglock. We need to protect them with a mutex.
2004-07-20protect printf with a mutex instead of SIMPLELOCK.Artur Grabowski
2004-07-20Introducing mutexes - cpu-owned spinning locks with spl semantics.Artur Grabowski
This is the MI (slightly inefficient and not MP safe) implementation. deraadt@ ok Tested by many. (this and following commits)
2004-07-18return EINVAL if ftruncate(2) is passed a negative offsetAnil Madhavapeddy
ok millert@, miod@, marius@
2004-07-15syncTheo de Raadt
2004-07-153 functions had inexact types; millert okTheo de Raadt
2004-07-15regenTodd C. Miller
2004-07-15Rename structs oipc_perm, omsqid_ds, osemid_ds, oshmid_ds to ipc_perm23,Todd C. Miller
etc to avoid confusion and for consistency with the *35 ones. Remove *n2o functions that don't belong outside of compat.
2004-07-14regen for new {msg,sem,shm}ctl syscalls.Todd C. Miller
2004-07-14Because mode_t is used in struct ipc_perm we need new versions ofTodd C. Miller
the msgctl, semctl, and shmctl system calls. This moves the old versions to COMPAT_35 and adds new ones. WARNING: While this fixes things like shared memory in the X server for old (pre-mode_t change) binaries, it will break binaries that use shared memory built between the time of the mode_t change (Jul 13th) and now. If you rebuild X during that interval you will need to do it again after updating the rest of userland.
2004-07-14Move the guts of the {sem,msg,shm}ctl system calls into a new functionTodd C. Miller
which also takes two function pointers for copyin/copyout. For the real syscalls these are just the normal copyin/copyout functions. For the compat routines, these are funtions that convert between the new and old foo_ds structs automagically. OK deraadt@
2004-07-14regenTodd C. Miller
2004-07-14fhstat(2) uses struct stat too and so needs replacing as well.Todd C. Miller
OK miod@
2004-07-13regen after stat/mode_t/nlink_t changesTodd C. Miller
2004-07-13Change mode_t and nlink_t from 16bit to 32bit. This allows us toTodd C. Miller
use mode_t in syscalls.master and to use mode_t in more places in the kernel. It also makes lint much more useful on kernel code. I've also added a placeholder for st_birthtime to make a UFS2 import easier at some future date. Requested by and OK deraadt@
2004-07-11save an (eventually existent) namei process context when going overPedro Martelletto
symbolic links. fixes pr 3842, ok tedu@, art@
2004-07-09regenTodd C. Miller
2004-07-09Rename ostat -> stat43 to disambiguate from upcoming struct stat changes.Todd C. Miller
Idea from NetBSD, OK deraadt@
2004-07-09go away staticsNiklas Hallqvist
2004-07-07fix an issue when scripts are exec'd under systrace wheremarius eriksen
the argv[0] would be normalized, and hence break scripts that depend on how they were called. this fixes an issue in the ports builds. ok provos@ deraadt@; lots of testing during hackathon sturm@ naddy@
2004-07-04proc_stop needs sched_lock locked. From art, verified with NetBSD.Niklas Hallqvist
2004-07-03if vinvalbuf() fails, unlock the vnode and release it. ok marius@Pedro Martelletto
2004-06-28splhigh around ec_count fetches -- sorry art; ok aaronTheo de Raadt
2004-06-28Add new, generic ``evcount'' event counter API to the kernel. From art@,Aaron Campbell
with modifications from me. Includes code for generic interrupt counter fetching via sysctl. deraadt@ tholo@ drahn@ millert@ ok
2004-06-26Don't sleep forever on short nanosleeps.Thomas Nordin