Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Aug 2009 13:28:02 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/arm/arm vm_machdep.c src/sys/kern kern_fork.c kern_kthread.c kern_proc.c kern_thr.c kern_thread.c src/sys/sys proc.h src/sys/vm vm_extern.h vm_glue.c
Message-ID:  <200908291329.n7TDT0c8009577@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
kib         2009-08-29 13:28:02 UTC

  FreeBSD src repository

  Modified files:
    sys/arm/arm          vm_machdep.c 
    sys/kern             kern_fork.c kern_kthread.c kern_proc.c 
                         kern_thr.c kern_thread.c 
    sys/sys              proc.h 
    sys/vm               vm_extern.h vm_glue.c 
  Log:
  SVN rev 196640 on 2009-08-29 13:28:02Z by kib
  
  Remove the altkstacks, instead instantiate threads with kernel stack
  allocated with the right size from the start. For the thread that has
  kernel stack cached, verify that requested stack size is equial to the
  actual, and reallocate the stack if sizes differ [1].
  
  This fixes the bug introduced by r173361 that was committed several days
  after r173004 and consisted of kthread_add(9) ignoring the non-default
  kernel stack size.
  
  Also, r173361 removed the caching of the kernel stacks for a non-first
  thread in the process. Introduce separate kernel stack cache that keeps
  some limited amount of preallocated kernel stacks to lower the latency
  of thread allocation. Add vm_lowmem handler to prune the cache on
  low memory condition. This way, system with reasonable amount of the
  threads get lower latency of thread creation, while still not exhausting
  significant portion of KVA for unused kstacks.
  
  Submitted by:   peter [1]
  Discussed with: jhb, julian, peter
  Reviewed by:    jhb
  Tested by:      pho
  MFC after:      1 week
  
  Revision  Changes    Path
  1.41      +0 -3      src/sys/arm/arm/vm_machdep.c
  1.307     +15 -10    src/sys/kern/kern_fork.c
  1.48      +1 -4      src/sys/kern/kern_kthread.c
  1.286     +0 -10     src/sys/kern/kern_proc.c
  1.76      +1 -1      src/sys/kern/kern_thr.c
  1.286     +13 -4     src/sys/kern/kern_thread.c
  1.536     +2 -4      src/sys/sys/proc.h
  1.87      +0 -2      src/sys/vm/vm_extern.h
  1.236     +95 -43    src/sys/vm/vm_glue.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908291329.n7TDT0c8009577>