summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2013-08-13regenPhilip Guenther
2013-08-13Switch time_t, ino_t, clock_t, and struct kevent's ident and dataPhilip Guenther
members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
2013-08-12The ps flags are split between thread and process. It is usefulAlexander Bluhm
for ddb to show both. So or them together in the ps overview and list them explicitly for the specific thread. Also sync the ddb bit names with the define names. OK miod@
2013-08-08Uncomment kprintf format attributes for sys/kernSylvestre Gallon
tested on vax (gcc3) ok miod@
2013-08-08Drop the retval argument from do*at() functions which don't use it.Philip Guenther
ok kettenis@ mpi@ deraadt@ millert@ miod@ matthew@ beck@
2013-08-07After a panic, do not fill up the dmesg with splassert messages.Alexander Bluhm
They scroll away the important information. Disable splassert in panic(). OK deraadt@ uebayasi@ sthen@
2013-08-06Make it possible to have multiple clonable devices per major.Mark Kettenis
2013-08-03Delete variable left over from the diagnostic code removed by previous commitPhilip Guenther
pointed out by Artturi Alm (artturi.alm (at) gmail.com)
2013-07-30The previous change was made while chasing nfs performance issuesBob Beck
on Theo's servers - however this was in the context of the buffer flipper changes and this is now suspect in a continues performance issue with NFS so back it out for now
2013-07-29Do a proper cleanup in the error path when opening a clonable device fails.Mark Kettenis
ok guenther@
2013-07-09back out the cache flipper temporarily to work out of tree.Bob Beck
will come back soon. ok deraadt@
2013-07-04now that free(null) is safe, delete checksTed Unangst
2013-07-04permit free(NULL) to work. ok deraadtTed Unangst
2013-07-04Format string fixes:Stefan Fritsch
f_count is long ok kettenis@ Change esm_sensor_map.arg to int ok deraadt@
2013-07-03don't use empty format stringStefan Fritsch
this is necessary to enable -Wformat or -Wno-error=format ok deraadt@
2013-07-03add support for %td for ptrdiff_t in kernel printfStefan Fritsch
this also adds support in gcc 4.x kprintf format checks ok kettenis@
2013-07-02Cast to time_t before the final multiplication to prevent overflow inPhilip Guenther
2038. This'll last for another 4083 years or so... ok deraadt@
2013-07-02Use time_t for storing time_t values, duhPhilip Guenther
ok deraadt@
2013-06-27B_WANTED is set when we want a B_BUSY buffer - Therefore we should alwaysBob Beck
check and awaken B_WANTED sleepers when clearing B_BUSY. ok guenther@
2013-06-25allow kernel to compile with MALLOC_DEBUG.syl
ok miod@
2013-06-24Manipulating buffers after sleeping is dangerous. Instead of attemptingBob Beck
to cheat and VOP_BWRITE a buffer, restart the vinvalbuf if we have to wait for a busy buffer to complete ok tedu@ guenther@
2013-06-17Add support for the _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME options,Philip Guenther
including CLOCK_{PROCESS,THREAD}_CPUTIME_ID constants and {clock,pthread}_getcpuclockid() functions. Worked out at t2k13 with help from tedu@ and matthew@ and testing by aja@ ok matthew@
2013-06-13beck would prefer to keep things just as they were for a while longer.Ted Unangst
undo style changes.
2013-06-11sprinkle knf fairy dust over new buf codeTed Unangst
2013-06-11High memory page flipping for the buffer cache.Bob Beck
This change splits the buffer cache free lists into lists of dma reachable buffers and high memory buffers based on the ranges returned by pmemrange. Buffers move from dma to high memory as they age, but are flipped to dma reachable memory if IO is needed to/from and high mem buffer. The total amount of buffers allocated is now bufcachepercent of both the dma and the high memory region. This change allows the use of large buffer caches on amd64 using more than 4 GB of memory ok tedu@ krw@ - testing by many.
2013-06-11final removal of daddr64_t. daddr_t has been 64 bit for a long enoughTheo de Raadt
test period; i think 3 years ago the last bugs fell out. ok otto beck others
2013-06-11replace bcopy with memcpy in m_defrag. this is safe because theDavid Gwynne
memory we're copying between is guaranteed to be non-overlapping since the target is newly allocated. ok kettenis@ henning@ tedu@
2013-06-11convert some easy bcopy to memcpy and clean up fdexpand a bit.Ted Unangst
ok kettenis
2013-06-11return ENOBUFS on failure from m_defrag and m_tag_copy_chain.David Gwynne
m_foo functions that return errors are now consistent as far as i can tell. ok bluhm@
2013-06-10Switch from timeval to timespec introduced format error; fix by preppingPhilip Guenther
for big time_t and casting to long long ok deraadt@
2013-06-09arguments to bcopy/memmove are reversed. put on thinking cap, then commit.Ted Unangst
2013-06-09regenMiod Vallat
2013-06-09Constify the mib argument of sysctl().Miod Vallat
ok matthew@ millert@
2013-06-09change a bcopy to memmove (mainly to catch platforms that don't offer it)Ted Unangst
2013-06-06Prevent idle thread from being stolen on startup.Christiano F. Haesbaert
There is a race condition which might trigger a case where two cpus try to run the same idle thread. The problem arises when one cpu steals the idle proc of another cpu and this other cpu ends up running the idle thread via spc->spc_idleproc, resulting in two cpus trying to cpu_switchto(idleX). On startup, idle procs are scaterred around different runqueues, the decision for scheduling is: 1 look at my runqueue. 2 if empty, look at other dudes runqueue. 3 if empty, select idle proc via spc->spc_idleproc. The problem is that cpu0's idle0 might be running on cpu1 due to step 1 or 2 and cpu0 hits step 3. So cpu0 will select idle0, while cpu1 is in fact running it already. The solution is to never place idle on a runqueue, therefore being only selectable through spc->spc_idleproc. This race can be more easily triggered on a HT cpu on virtualized environments, where the guest more often than not doesn't have the cpu for itself, so timing gets shuffled. ok tedu@ guenther@ go ahead after t2k13 deraadt@
2013-06-05Move FHASLOCK from f_flag to f_iflags, freeing up a bit for passingPhilip Guenther
O_* flags and eliminating an XXX comment. ok matthew@ deraadt@
2013-06-05factor out pid allocation to functions. add a small cache of recentlyTed Unangst
exited pids that won't get recycled. ok deraadt
2013-06-05blow up sooner rather than later for double pool_putTed Unangst
ok deraadt
2013-06-03When creating a thread, don't add it to the process's thread listPhilip Guenther
until it's fully built, so that it can't get a signal from realitexpire(), as seen by sthen@ and espie@ in ports builds. Exact bits moved down worked out with tedu@, ok deraadt@
2013-06-03Convert some internal APIs to use timespecs instead of timevalsPhilip Guenther
ok matthew@ deraadt@
2013-06-03changes for isc fuse support. not enabled. ok beck deraadt.Ted Unangst
from Sylvestre Gallon ccna.syl gmail.com
2013-06-02Use long long and %lld for printing tv_sec valuesPhilip Guenther
ok deraadt@
2013-06-02Coredumping is now single-threaded, so update comment about lockingPhilip Guenther
2013-06-01cleanup and consolidate the spinlock_lock (what a name!) code.Ted Unangst
it's now atomic_lock to better reflect its usage, and librthread now features a new spinlock that's really a ticket lock. thrlseep can handle both types of lock via a flag in the clock arg. (temp back compat hack) remove some old stuff that's accumulated along the way and no longer used. some feedback from dlg, who is concerned with all things ticket lock. (you need to boot a new kernel before installing librthread)
2013-06-01Work around stack smash protector getting confused because we switchedMike Larkin
stacks by not returning (ever) from hibernate_unpack_image.
2013-06-01Change return codes in various hibernate functions to be able to laterMike Larkin
distinguish one failure path from another. Comment the same. Also removed some extraneous comments regarding pmap_activate.
2013-06-01regenTed Unangst
2013-06-01always implement stub utrace syscall, but keep the body #ifdef KTRACETed Unangst
ok guenther matthew
2013-06-01As found by kurt, there's a twisty race between exit1 and fork1Ted Unangst
with threaded processes. Fix this by checking for an attempt to go single threaded in fork1 and account for the new thread as well. ok espie guenther kurt
2013-06-01regenMiod Vallat