summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2010-08-12Nuke extra (typoed) extern declaration and a spare newline from the lastOwain Ainsworth
commit. "fix it -- free commit" beck@
2010-08-11Make the number of vnodes to correspond to the number of buffers inBob Beck
buffer cache - we grow them dynamically, but do not attempt to shrink them if the buffer cache shrinks after growing. Tested by very many for a long time. ok oga@ todd@ phessler@ tedu@
2010-08-06Every time you ignore uiomove() return value, $DEITY kills a littleMiod Vallat
$ADORABLE_FELINE. ok deraadt@ matthew@
2010-08-03matthew did not commit the diff he passed around for us to inspect...Theo de Raadt
repair that situation. Darn newbies...
2010-08-03If an asynchronous request invalidates a buf, then we might remove itMatthew Dempsky
from its vnode's buffer cache in an interrupt context. Therefore we need interrupt protection when searching the buffer red-black tree. ok deraadt@, thib@, art@
2010-08-02Fix knote handling for exiting processes: when triggering a NOTE_EXITPhilip Guenthe
knote, remove it from the process's klist; after handling those, remove and drop any remaining knotes from the process's klist. Ban attaching knotes to processes that have started exiting or attaching them via the pid of a thread other than the main thread. ok tedu@, deraadt@
2010-07-28Add a dummy kqueue filter similar to seltrue and use it for anythingNicholas Marriott
using seltrue for poll. Based on code from NetBSD. Also remove a stray duplicate lpt entry from loongson, from deraadt. ok tedu deraadt
2010-07-28more #ifdef needed for the case of not pegging on a non-MP kernelTheo de Raadt
2010-07-28It's pretty pointless to peg ourselves to the primary CPU if that's theMark Kettenis
only one we have. ok krw@, deraadt@
2010-07-26Correct the links between threads, processes, pgrps, and sessions,Philip Guenthe
so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
2010-07-24struct emul's e_arglen member is expected to count in units ofPhilip Guenthe
sizeof(char *), not in bytes, so we've been allocating and copying around four or eight times as many bytes as we needed to ok kettenis@ deraadt@
2010-07-23Make sure the u area of new processes is zero-filled; this got lost inMiod Vallat
1.119.
2010-07-22We have this nice KMEMSTATS option to control when we use kmemstats,Matthew Dempsky
so no point in reserving space for kmemstats unless it's enabled. ok thib@, deraadt@
2010-07-21ptm needs no read/write, just use enodev.Nicholas Marriott
ok deraadt
2010-07-19Rollback the allproclk and fileheadlk addition. When grabbing anPhilip Guenthe
rwlock, the thread will release biglock if it sleeps, means that atomicity from before the rw_enter() to after it is not guaranteed. The change didn't address those, so pulling it until it does. "go for it" tedu@
2010-07-19Avoid interleaving of mutexes that would leave is with the wrong spl afterMark Kettenis
calling bufq_quiesce(). Problem spotted by matthew@. ok matthew@, thib@
2010-07-15m_getptr(m, 0, ...) may return an mbuf different from m -- if m has noClaudio Jeker
data in it. m_getptr() hops over empty buffers and points to the first allocated data byte. Because of this the m_dup_pkthdr() call done by m_copym0() can panic because not the first mbuf is passed. Found the hard way by myself, diff by blambert@ commiitting for him since he is not around. Tested and OK myself
2010-07-15limit the pools from 14 bits down. We cannot use PAGE_SIZE because itTheo de Raadt
is a variable on sparc. This should be revisited... after the arguments for pagesize vs 4K complete :)
2010-07-14Eliminate some unused malloc(9) type defines. Also get rid of theMatthew Dempsky
mysterious and unused mbtypes[] array in mbuf.h. ok tedu@, deraadt@
2010-07-14oops; Fred CrowsonTheo de Raadt
2010-07-13dma_alloc() and dma_free(). This is a thin shim on top of a bag ofTheo de Raadt
pools, sized by powers of 2, which are constrained to dma memory. ok matthew tedu thib
2010-07-10A process on the zombie list can have a NULL p_pgrp if it sleeps whenPhilip Guenthe
grabbing allproclk in proc_zap(); skip such processes in sysctl(KERN_PROC*) and handle the NULL pointer in ddb's ps. ok tedu@
2010-07-09need sysctl.h to compile with GPROF; Luis HenriquesTheo de Raadt
2010-07-08dont count requeued io as outstanding io. there is a 1:1 mappingDavid Gwynne
between calls to bufq_enqueue and bufq_done calls, but bufq_requeue can be called multiple times on an io in between the enqueue and done. if you keep incrementing outstanding you'll never stop sleeping for suspend. bufq_requeue can be called via interrupts, so we cannot sleep there. the problems fixed by this diff were never hit cos the adapters people are testing/running with do not cause bufq_requeue to be called. thanks to thib@ for helping me understand the code better ok thib@ deraadt@ kettenis@ tedu@
2010-07-08Devices which don't have read or write functionality should not returnTheo de Raadt
enodev to poll, because this returns an errno of 19 in revents. Oops. Use seltrue where needed, and use a new selfalse function for those which don't know if the next op will be non-blocking Mostly discussed with guenther and miod
2010-07-07minor whitespace tweaks and clean up extra ;David Gwynne
2010-07-05remove compat_bsdos supportTed Unangst
2010-07-03Fix the naming of interfaces and variables for rdomains and rtablesPhilip Guenthe
and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
2010-07-03no need for syncdelay to be a time_t, make it it an int. unstatic variablesThordur I. Bjornsson
so I can twiddle them from ddb (not that I will mess with the hashmask, but static burns). ok tedu@
2010-07-03replace 0 with equivalent allocation flag. ok thibTed Unangst
2010-07-03explicitly specify flags to malloc and pool_get instead of relying on 0.Ted Unangst
This is more clear, and as thib pointed out, the default in softraid was wrong. ok thib.
2010-07-02remove support for compat_sunos (and m68k4k). ok deraadt guentherTed Unangst
2010-07-02Since fill_eproc() is no longer called from coredump(), it can be droppedPhilip Guenthe
from small kernels "yes" deraadt@
2010-07-02Move common code for waking up writers on a tty into a function.Nicholas Marriott
ok deraadt matthew millert
2010-07-02timeout_add -> timeout_add_msecBret Lambert
ok claudio@ krw@
2010-07-02m_copyback can fail to allocate memory, but is a void fucntion so gymnasticsBret Lambert
are required to detect that. Change the function to take a wait argument (used in nfs server, but M_NOWAIT everywhere else for now) and to return an error ok claudio@ henning@ krw@
2010-07-02add an align argument to uvm_km_kmemalloc_pla.Artur Grabowski
Use uvm_km_kmemalloc_pla with the dma constraint to allocate kernel stacks. Yes, that means DMA is possible to kernel stacks, but only until we've fixed all the scary drivers. deraadt@ ok
2010-07-02structure copy the unp_connid to the other socketTheo de Raadt
2010-07-01regenTed Unangst
2010-07-013.5 compat is old, but relied upon by other compats still in tree. theTed Unangst
fhstat syscall, however, isn't needed and can go away. ok deraadt
2010-07-01Oops. Lost the < 0 check on file position I had in the circulatedKenneth R Westerback
diff. A bit of paranoia suggested by beck@.
2010-07-01Implement vs{,un}lock_device and use it for physio.Artur Grabowski
Just like normal vs{,un}lock, but in case the pages we get are not dma accessible, we bounce them, if they are dma acessible, the functions behave exactly like normal vslock. The plan for the future is to have fault_wire allocate dma acessible pages so that we don't need to bounce (especially in cases where the same buffer is reused for physio over and over again), but for now, keep it as simple as possible.
2010-07-01constrain malloc to only grab pages from dma reachable memory.Thordur I. Bjornsson
Do this by calling uvm_km_kmemalloc_pla with the dma_constraint. ok art@ (ofcourse, he eats his cereal and okeys everything). OK beck@, deraadt@
2010-07-01pool setconstraints must be called immediately after pool_init, otherwiseBob Beck
if we allocate memory before applying constraints we get memory outside the constraints allocated in the pool. this is bad. ok claudio@
2010-07-01SO_PEERCRED should return ENOTCONN when the sockets are not connectedTheo de Raadt
2010-07-01Return EINVAL if the file position is greater than LONG_MAX, sinceKenneth R Westerback
otherwise truncation will occur on archs where LONG LONG and LONG are not the same. Noticed at n2k10. Error return suggested by deraadt@. ok beck@ millert@ deraadt@ guenther@
2010-07-01another day, another compat gets removed. today is ibcs2's turnTed Unangst
2010-07-01SO_PEERCRED should pass out the main pid, not the "pid" of the currentTheo de Raadt
thread. Discussion with guenther.
2010-07-01Call bufq_done at the top of biodone, so we don't call it onThordur I. Bjornsson
a freed buf as that causes problems...
2010-07-01Always identify threads with THREAD_PID_OFFSET, so that there's noPhilip Guenthe
way a kill() intended for a thread can result in a separate process getting the signal. ok tedu@ art@