| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
When the main thread of a MT process dies, it doesn't matter at which
priority it gets awaken to do the lasts cleanups. Not using PUSER makes
it easier to understand the existing scheduler logic.
ok visa@
|
|
|
|
|
|
|
| |
could crash due to missing inp_ppcb. This happend when fstat(1)
was called often and TCP was aborted with reset. Protect the sysctl
path with the net lock.
OK mpi@
|
|
|
|
|
| |
if the packet has the M_TIMESTAMP csum_flag, ph_timestamp is added
to the boottime clock, otherwise it just uses microtime().
|
|
|
|
|
|
|
| |
variable that tracks when to send next SIGXCPU. This eases MP work and
prevents accidental alteration of shared resource limit structs.
OK mpi@ semarie@
|
|
|
|
|
|
|
|
|
|
|
|
| |
mlarkin@ noticed we would freeze while removing enormous files because
of the amount of work done to invalidate buffers on unlink. This adds
a temporary workaround to ensure we give up the lock and yield while
doing this.
The longer term answer will be to move these buffers to another list
and not do the work here.
ok deraadt@
|
| |
|
|
|
|
|
|
|
| |
missing from the SP variant of mtx_enter() and mtx_enter_try().
mtx_leave() was correct already.
Prompted by and OK patrick@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basically just make all the bintime routines look and behave more like
the timeradd(3) macros.
Switch to three-argument forms for structure math, introduce and use
bintimecmp(9), and rename the structure conversion routines to resemble
e.g. TIMEVAL_TO_TIMESPEC(3).
Document all of this in a new bintimeadd.9 page.
Code input from mpi@, manpage input from schwarze@.
code ok mpi@, docs ok schwarze@, docs probably still ok jmc@
|
|
|
|
|
|
|
|
|
| |
function is also a proper place for setting up the plimit pool.
While here, raise the IPL of the plimit pool to IPL_MPFLOOR, needed
in upcoming MP work.
OK claudio@
|
|
|
|
|
|
|
|
|
| |
It currently creates a lock ordering problem because SCHED_LOCK() is taken
by hardclock(). That means the "priorities" of a thread should be moved
out of the SCHED_LOCK() first in order to make progress.
Reported-by: syzbot+8e4863b3dde88eb706dc@syzkaller.appspotmail.com
via anton@ as well as by kettenis@
|
|
|
|
|
|
|
| |
Note that hardclock(9) still increments p_{u,s,i}ticks without holding a
lock.
ok visa@, cheloha@
|
|
|
|
|
|
|
| |
with the fields of struct proc. Make pl_refcnt unsigned for upcoming
atomic updating.
OK deraadt@ guenther@
|
|
|
|
|
|
|
| |
It is bad style to make a pointer point outside the object
so correct this to simply point to the last byte up front.
ok deraadt@
|
|
|
|
|
|
| |
realpath(2) have output filenames. Generate additional KTR_NAMEI
records upon success.
ok millert beck
|
| |
|
|
|
|
|
|
|
|
| |
I borrowed an example usage from __getcwd poorly to begin with
and then there was some other strangeness in there.
diagnosed with deraadt.
ok deraadt@
|
|
|
|
|
|
| |
was used to return the length of the path, when the actual return value is 0.
This would cause confusing results in ktrace.
Diagnosed with beck since __realpath() picked up the same odd behaviour
|
|
|
|
|
|
|
|
|
| |
tick boundary of schedlock().
This reduces the contention on the SCHED_LOCK() when the current thread
is already spinning.
Prompted by deraadt@, ok visa@
|
| |
|
| |
|
|
|
|
| |
long. Instead, use everything after the first /sys/ segment as the path.
|
|
|
|
|
|
|
|
| |
__attribute__((nonnull)); which the undefined behavior sanitizer in
clang is aware of. A new handler is therefore needed in order to compile
a kernel with kubsan enabled.
ok visa@
|
|
|
|
|
| |
socketpair. Do not wakeup receiver if there is no data available.
OK claudio@ anton@
|
|
|
|
|
|
|
| |
Call it "tc_list" instead of "timecounters", which is too similar to
the variable "timecounter" for my taste.
ok mpi@ visa@
|
|
|
|
|
|
|
| |
do word loads and stores and so partial updates should no longer be observed.
With this accessing global variables set by sysctl_int() should be mostly MP
save.
OK dlg@ mpi@
|
|
|
|
| |
ok mlarkin, otto (who both had the same diff)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The dummy counter is a stopgap during boot. It is not useful after a
real timecounter is attached and started and there is no reason to return
to using it.
So don't even offer it to the admin. This is easy: never add it to the
timecounter list. It will effectively cease to exist after the first real
timecounter is actived in tc_init().
In principle this means that we can have an empty timecounter list so we
need to check for that case in sysctl_tc_choice().
"I don't mind" mpi@, ok visa@
|
| |
|
|
|
|
|
|
|
|
|
|
| |
because now the error is detected before context switch.
The sleep code path eventually calls assertwaitok() in mi_switch(),
so the assertwaitok() in the SMR barrier function is somewhat redundant
and can be removed.
OK mpi@
|
|
|
|
|
|
|
|
| |
does not establish strong enough ordering between CPUs. Consequently,
smr_grace_wait() might incorrectly skip a CPU and invoke an SMR
callback too early.
Prompted by haesbaert@
|
|
|
|
| |
more ready to deal with the noise.
|
|
|
|
|
|
| |
checking done in taskq_barrier(9) and timeout_barrier(9).
OK mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want this so that we can stop allowing readlink() on traversed
vnodes in unveil().
This includes all the kernel side and the system call.
This is not yet used in libc for realpath, so nothing calls this yet.
The libc wrapper will be committed later.
Testing by many, and ports build by naddy@
ok deraadt@
|
|
|
|
|
|
|
|
|
|
| |
does not block the signal. If all threads block the signal, we
delivered it to the main thread. This does not conform to POSIX.
If any thread unblocks the signal, it should be delivered immediately
to this thread.
Mark such signals pending at the process instead of a single thread.
Then any thread can handle it later.
OK kettenis@ guenther@
|
|
|
|
|
| |
and incorrectly return EBADF when n>curlim.
ok millert guenther tedu
|
| |
|
|
|
|
|
|
|
|
| |
encountered a wxneeded binary that attempts correct operation when started
on a nowxallowed filesystem (it tries mprotect with RWX, notices ENOTSUP
and acts in a different way). So permit execution (but of course don't
allow W^X violating mappings)
ok sthen kettenis robert
|
|
|
|
| |
OK visa@, OK mpi@
|
|
|
|
|
|
|
|
| |
locks.
ok jturner@ visa@
Reported-by: syzbot+f9f13034fd656af6c48f@syzkaller.appspotmail.com
|
|
|
|
| |
ok kettenis
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reduces the worst-case error for for time values retrieved via the
microtime(9) functions from 10 ticks to 2 ticks. Being interrupted
for over a tick is unlikely but possible.
While here use C99 initializers.
From FreeBSD r303383.
ok mpi@
|
|
|
|
|
|
| |
instead of panicing
ok deraadt@, tedu@, mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allocations will recover some memory from the dma_constraint range.
The allocation still fails, the intent is to ensure that the
pagedaemon will free some memory to possibly allow a subsequent
allocation to succeed.
This also adds a UVM_PLA_NOWAKE flag to allow special cases in the
buffer cache to not wake up the pagedaemon until they want to.
ok kettenis@
|
|
|
|
|
|
|
|
|
| |
clock_settime(2)/settimeofday(2) still need KERNEL_LOCK for a moment
when resetting the RTC, as that's done periodically from a task under
KERNEL_LOCK. Not quite sure how to approach that one yet.
ok visa@ mpi@, "good stuff" tedu@,
"please wait until after [tree] unlock" deraadt@
|
|
|
|
|
| |
Noticed by me and otto@
ok tedu@
|
|
|
|
|
|
| |
current status and statistics and can be exported without super-user
rights via sysctl to make it easier for tools like systat to access those.
OK deraadt@, sashan@
|
|
|
|
| |
reported by kettenis
|
|
|
|
|
| |
let's see what falls out.
ok beck deraadt kettenis mpi
|
| |
|