| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
| |
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
|
|
|
|
|
|
|
|
|
| |
PS_{ZOMBIE,EMBRYO} on the process instead of peeking into the process's
thread data. This eliminates the need for the thread-level SDEAD state.
Change kvm_getprocs() (both the sysctl() and kvm backends) to report the
"most active" scheduler state for the process's threads.
tweaks kettenis@
feedback and ok matthew@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pulled by <uvm/uvm_extern.h> and turn uvm_total() into a private
function.
The preferred way to get memory stats is through the VM_UVMEXP
sysctl(3) since VM_METER is just a wrapper on top of it. In the
kernel, use `uvmexp' directly instead of uvm_total().
This change does not remove <sys/vmmeter.h> from <uvm/uvm_extern.h>
to give some more time to port maintainers to fix their ports.
ok guenther@ as part of a larger diff.
|
| |
|
|
|
|
|
|
|
|
| |
make it a list of processes, and change P_NOZOMBIE and P_STOPPED from thread
flags to process flags. Add allprocess list for the code that just wants
to see processes.
ok tedu@
|
|
|
|
|
|
| |
can be further simplified.
ok kettenis@
|
|
|
|
| |
and mnt_stat.f_ctime is long long, too
|
|
|
|
| |
ok deraadt@
|
|
|
|
| |
ok matthew@ deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the special provided when the mount was requested. This may be the same as
the special that was actually used for the mount (e.g. in the case of a
device node) or it may be different (e.g. in the case of a DUID).
Whilst here, change f_ctime to a 64 bit type and remove the pointless
f_spare members.
Compatibility goo courtesy of guenther@
ok krw@ millert@
|
|
|
|
|
|
|
|
|
|
|
| |
_PC_PRIO_IO, and _PC_SYNC_IO names in VOP_PATHCONF(), as they're
fs-independent for us. Since we don't support latter three on any
fs, we can also define the related _POSIX_{ASYNC,PRIO,SYNC}_IO
symbols in <unistd.h> (via sys/unistd.h) with value -1.
Also, zap pointless tty-only values from procfs(!).
ok beck@, deraadt@
|
|
|
|
|
|
|
|
|
|
|
| |
- Avoid using copyinstr() without checking the return value.
- sys_mount() has already copied the path in, so pass this to the
filesystem mount code so that it does not have to copy it in again.
- Avoid copyinstr()/bzero() dance when we can simply bzero() and strlcpy().
ok krw@
|
|
|
|
|
|
| |
to diff against FreeBSD's.
From Brad; no object file change on amd64.
|
|
|
|
|
|
|
|
| |
count processes instead of threads. New sysctl()s KERN_NTHREADS and
KERN_MAXTHREAD count and limit threads. The nprocs and maxproc kernel
variables are replaced by nprocess, maxprocess, nthreads, and maxthread.
ok tedu@ mikeb@
|
|
|
|
|
|
|
| |
of per-rthread. Handling of per-thread tick and runtime counters
inspired by how FreeBSD does it.
ok kettenis@
|
|
|
|
| |
the main thread exiting. c.f. regress/sys/kern/main-thread-exited/
|
|
|
|
|
|
|
|
|
|
| |
- move the P_TRACED and P_INEXEC flags, and p_oppid, p_ptmask, and
p_ptstat member from struct proc to struct process
- sort the PT_* requests into those that take a PID vs those that
can also take a TID
- stub in PT_GET_THREAD_FIRST and PT_GET_THREAD_NEXT
ok kettenis@
|
|
|
|
|
|
|
|
| |
and extending it to support rthreads would be a waste of time. Also, don't
show rthreads in the process listing in procfs.
Reassurances that compat_linux doesn't need this from ajacoutot@
ok kettenis@
|
|
|
|
|
|
|
|
| |
and return EOPNOTSUPP directly from the VOP_* functions.
Filesystems should, at some point fill in every function
in the vop_default struct so we can get rid of the 'if'
statements in VOP_*.
|
|
|
|
|
|
| |
that you can't evade the checks by doing the dirty work in an rthread
ok blambert@, deraadt@
|
|
|
|
|
|
| |
unrelated, and his alpha is much happier now.
OK deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
| |
fail it is still good practise to either check the return value or to
provide a flag that won't (to avoid copy pasted code that gets it
wrong).
So change LK_EXCLUSIVE to LK_EXCLUSIVE | LK_RETRY, removing the one
caller of vn_lock in the tree that doesn't either pass LK_RETRY or check
the return value.
ok thib@, jsing@ as part of a larger diff.
|
|
|
|
| |
have been resolved.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vector setup that has questionable features (that have, as far as I can
tell never been used in practice, atleast not in OpenBSD), remove all
the gunk and favor a simple struct full of function pointers that get
set directly by each of the filesystems.
Removes gobs of ugly code and makes things simpler by a magnitude.
The only downside of this is that we loose the vnoperate feature so
the spec/fifo operations of the filesystems need to be kept in sync
with specfs and fifofs, this is no big deal as the API it self is pretty
static.
Many thanks to armani@ who pulled an earlier version of this diff to
current after c2k10 and Gabriel Kihlman on tech@ for testing.
Liked by many. "come on, find your balls" deraadt@.
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
prodded by and ok thib@
agreed by art@ and blambert@
|
|
|
|
|
|
| |
same diff as before, with the uninitalized variable fixed.
ok toby@
|
|
|
|
|
|
|
|
|
|
|
| |
which is exactly what the macro does.
Macro's that are nothing more then:
#define FUNCTION(arg) function(arg)
are almost always pointless and should go away.
OK blambert@
Agreed by many.
|
|
|
|
|
| |
by Antoine Jacoutot. back out for oga to look at when he gets back in
touch with earth.
|
|
|
|
| |
ok deraadt@
|
| |
|
|
|
|
|
|
| |
the superuser. access(2) will now only indicate success for X_OK on
non-directories if there is at least one execute bit set on the file.
OK deraadt@ thib@ otto@
|
| |
|
|
|
|
|
|
| |
with eopnotsupp() instead;
ok blambert@
|
|
|
|
|
|
|
| |
init the op array functions with whatever the define was set
too.
ok dlg@,blambert@
|
|
|
|
| |
ok gilles
|
|
|
|
|
|
|
|
| |
version for i386
more architectures and ctob() replacement is being worked on
prodded by and ok miod
|
|
|
|
| |
ok pedro@ thib@
|
|
|
|
| |
no binary change
|
|
|
|
|
| |
"ap = v" comments in under 8 seconds, so it must be ok. and it compiles
too.
|
|
|
|
|
|
|
|
|
|
|
|
| |
it's a good idea to use atomic.h operations on it. This mechanic
change updates all bit operations on p_flag to atomic_{set,clear}bits_int.
Only exception is that P_OWEUPC is set by MI code before calling
need_proftick and it's automatically cleared by ADDUPC. There's
no reason for MD handling of that flag since everyone handles it the
same way.
kettenis@ ok
|
| |
|
|
|
|
|
|
|
|
|
|
| |
should never be referenced outside the context of the process to which
this stack belongs unless we do the PHOLD/PRELE dance. Loads of code
doesn't follow the rules here. Instead of trying to track down all
offenders and fix this hairy situation, it makes much more sense
to not swap kernel stacks.
From art@, tested by many some time ago.
|
|
|
|
| |
ok pedro@, miod@
|
| |
|
|
|
|
|
|
|
| |
out of procfs and gets a ptrace request PT_{READ,WRITE}_{I,D} as argument;
also procfs_checkioperm() becomes process_checkioperm().
From art@ some time ago; ok kettenis@ pedro@
|
|
|
|
|
|
| |
of panics and bugfixes. Access curproc directly, do not expect a process
pointer as an argument. Should fix many "process context required" bugs.
Incentive and okay millert@, okay marc@. Various testing, thanks.
|