summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-06-14 23:23:55 +0000
committeralc <alc@FreeBSD.org>2003-06-14 23:23:55 +0000
commit83f108b04dd3280195b5f0cf6bc2af10630e5f75 (patch)
tree5b005cceb283a32d0b4cb30493fc1a788fe8a46b /sys/ia64
parentcf4a22224f432bfbaaa9bceff6eee597501588ef (diff)
downloadFreeBSD-src-83f108b04dd3280195b5f0cf6bc2af10630e5f75.zip
FreeBSD-src-83f108b04dd3280195b5f0cf6bc2af10630e5f75.tar.gz
Migrate the thread stack management functions from the machine-dependent
to the machine-independent parts of the VM. At the same time, this introduces vm object locking for the non-i386 platforms. Two details: 1. KSTACK_GUARD has been removed in favor of KSTACK_GUARD_PAGES. The different machine-dependent implementations used various combinations of KSTACK_GUARD and KSTACK_GUARD_PAGES. To disable guard page, set KSTACK_GUARD_PAGES to 0. 2. Remove the (unnecessary) clearing of PG_ZERO in vm_thread_new. In 5.x, (but not 4.x,) PG_ZERO can only be set if VM_ALLOC_ZERO is passed to vm_page_alloc() or vm_page_grab().
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/pmap.c47
-rw-r--r--sys/ia64/include/param.h1
2 files changed, 1 insertions, 47 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c
index dd6ba1d..77effaa 100644
--- a/sys/ia64/ia64/pmap.c
+++ b/sys/ia64/ia64/pmap.c
@@ -765,53 +765,6 @@ pmap_track_modified(vm_offset_t va)
return 0;
}
-/*
- * Create the KSTACK for a new thread.
- * This routine directly affects the fork perf for a process/thread.
- */
-void
-pmap_new_thread(struct thread *td, int pages)
-{
-
- /* Bounds check */
- if (pages <= 1)
- pages = KSTACK_PAGES;
- else if (pages > KSTACK_MAX_PAGES)
- pages = KSTACK_MAX_PAGES;
- td->td_kstack = (vm_offset_t)malloc(pages * PAGE_SIZE, M_PMAP,
- M_WAITOK);
- td->td_kstack_pages = pages;
-}
-
-/*
- * Dispose the KSTACK for a thread that has exited.
- * This routine directly impacts the exit perf of a process/thread.
- */
-void
-pmap_dispose_thread(struct thread *td)
-{
-
- free((void*)td->td_kstack, M_PMAP);
- td->td_kstack = 0;
- td->td_kstack_pages = 0;
-}
-
-/*
- * Allow the KSTACK for a thread to be prejudicially paged out.
- */
-void
-pmap_swapout_thread(struct thread *td)
-{
-}
-
-/*
- * Bring the KSTACK for a specified thread back in.
- */
-void
-pmap_swapin_thread(struct thread *td)
-{
-}
-
/***************************************************
* Page table page management routines.....
***************************************************/
diff --git a/sys/ia64/include/param.h b/sys/ia64/include/param.h
index 2548fa6..1b3bf0c 100644
--- a/sys/ia64/include/param.h
+++ b/sys/ia64/include/param.h
@@ -135,6 +135,7 @@
#define SINCR 1 /* increment of stack/NBPG */
#define KSTACK_PAGES 4 /* pages of kernel stack */
+#define KSTACK_GUARD_PAGES 0 /* pages of kstack guard; 0 disables */
#define UAREA_PAGES 1 /* pages of u-area */
/*
OpenPOWER on IntegriCloud