aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/proc.h
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2020-04-26 20:08:57 +0000
committerMark Johnston <markj@FreeBSD.org>2020-04-26 20:08:57 +0000
commitf13fa9df054827c00e1ab90d7437fafc25c46001 (patch)
treecdf6d1aff582f5049312ed56e4b80dce0043d6bc /sys/sys/proc.h
parent1130dff9d26aed381fa75fd10a455657410af169 (diff)
downloadsrc-f13fa9df054827c00e1ab90d7437fafc25c46001.tar.gz
src-f13fa9df054827c00e1ab90d7437fafc25c46001.zip
Use a single VM object for kernel stacks.
Previously we allocated a separate VM object for each kernel stack. However, fully constructed kernel stacks are cached by UMA, so there is no harm in using a single global object for all stacks. This reduces memory consumption and makes it easier to define a memory allocation policy for kernel stack pages, with the aim of reducing physical memory fragmentation. Add a global kstack_object, and use the stack KVA address to index into the object like we do with kernel_object. Reviewed by: kib Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24473
Notes
Notes: svn path=/head/; revision=360354
Diffstat (limited to 'sys/sys/proc.h')
-rw-r--r--sys/sys/proc.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 3ccfe772f29b..fecc422797da 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -348,7 +348,6 @@ struct thread {
/* LP64 hole */
struct callout td_slpcallout; /* (h) Callout for sleep. */
struct trapframe *td_frame; /* (k) */
- struct vm_object *td_kstack_obj;/* (a) Kstack object. */
vm_offset_t td_kstack; /* (a) Kernel VA of kstack. */
int td_kstack_pages; /* (a) Size of the kstack. */
volatile u_int td_critnest; /* (k*) Critical section nest level. */