aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2018-08-04 20:45:43 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2018-08-04 20:45:43 +0000
commita70e9a1388d4aa928158fc9204553a89ee9c6332 (patch)
tree7f797a596632ea89f1a5a6c7646eda8f28f56731 /sys/sys
parent9f21643182a8c77df8949e8a3a425d6e5dc24baa (diff)
downloadsrc-a70e9a1388d4aa928158fc9204553a89ee9c6332.tar.gz
src-a70e9a1388d4aa928158fc9204553a89ee9c6332.zip
Swap in WKILLED processes.
Swapped-out process that is WKILLED must be swapped in as soon as possible. The reason is that such process can be killed by OOM and its pages can be only freed if the process exits. To exit, the kernel stack of the process must be mapped. When allocating pages for the stack of the WKILLED process on swap in, use VM_ALLOC_SYSTEM requests to increase the chance of the allocation to succeed. Add counter of the swapped out processes to avoid unneeded iteration over the allprocs list when there is no work to do, reducing the allproc_lock ownership. Reviewed by: alc, markj (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D16489
Notes
Notes: svn path=/head/; revision=337330
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/proc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 2d393435b35d..d5351dd043c1 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -1050,6 +1050,7 @@ struct proc *proc_realparent(struct proc *child);
void proc_reap(struct thread *td, struct proc *p, int *status, int options);
void proc_reparent(struct proc *child, struct proc *newparent);
void proc_set_traced(struct proc *p, bool stop);
+void proc_wkilled(struct proc *p);
struct pstats *pstats_alloc(void);
void pstats_fork(struct pstats *src, struct pstats *dst);
void pstats_free(struct pstats *ps);