Re: Kernel thread stack size

2012-07-24 Thread Paul Ambrose
Could you be more specific about "inefficient"? 在 2012-7-25 上午11:22,"Warner Losh" 写道: > > > On Jul 24, 2012, at 6:40 PM, Paul Ambrose wrote: > > > #define PAGE_SHIFT 12 > > #define PAGE_SIZE (1< > > > #define KSTACK_PAGES 2 > > #define KSTACK_GUARD_PAGES 2 > > > > I had a MIPS machine (Loongson 3A

Re: Kernel thread stack size

2012-07-24 Thread Warner Losh
On Jul 24, 2012, at 6:40 PM, Paul Ambrose wrote: > #define PAGE_SHIFT 12 > #define PAGE_SIZE (1< > #define KSTACK_PAGES 2 > #define KSTACK_GUARD_PAGES 2 > > I had a MIPS machine (Loongson 3A) with page size 16KB( could be 4KB, but > had to handle cache alias in OS), IMHO, define KSTACK_PAGE t

Re: Kernel thread stack size

2012-07-24 Thread Paul Ambrose
#define PAGE_SHIFT 12 #define PAGE_SIZE (1< > On Mon, Jul 23, 2012 at 02:54:30AM -0400, Richard Yao wrote: > > What is the default kernel thread stack size on FreeBSD? I am > > particularly interested in knowing about i386 and amd64, but knowing > > this for other architectures (such as MIPS) wou

Re: Kernel thread stack size

2012-07-23 Thread Konstantin Belousov
On Mon, Jul 23, 2012 at 02:54:30AM -0400, Richard Yao wrote: > What is the default kernel thread stack size on FreeBSD? I am > particularly interested in knowing about i386 and amd64, but knowing > this for other architectures (such as MIPS) would also be useful. > Look for the KSTACK_PAGES symbo

Re: Kernel Thread Lock Question

2009-10-05 Thread Julian Elischer
Tom Judge wrote: Do I need to hold the per thread lock here? (This is for 7.1) PROC_LOCK(p); //mtx_lock_spin(&sched_lock); breakout = 0; FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); if (!TD_ON_RUNQ(td) && !TD_IS_RUNNING(td) && !TD_IS_SLEEPING(td)) { breakou

Re: kernel thread

2002-06-11 Thread Ferruccio Vitale
Hiten Pandya wrote: > Ok, I cant find any man page called shutdown_kproc in either 4.3 or 4.4. > Anyway, he wants to destroy a "thread", and not an "internal" daemon/process. > > To destroy a kernel thread, you need to make use of the kthread_exit() > operation. It is prototyped as follows: > >

RE: kernel thread

2002-06-11 Thread Zhihui Zhang
I asked a very similar question a while ago (within at most two months I think). Try search for subject "kernel daemon cleanup". -Zhihui On Tue, 11 Jun 2002, John Baldwin wrote: > > On 10-Jun-2002 Ferruccio Vitale wrote: > > Hi, > > > > how can I destroy a kernel thread that I previously cre

RE: kernel thread

2002-06-11 Thread John Baldwin
On 10-Jun-2002 Ferruccio Vitale wrote: > Hi, > > how can I destroy a kernel thread that I previously created? > Regards, You need to signal the kthread (kproc) somehow and have it call kthread_exit() to commit suicide. -- John Baldwin <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/ "P

Re: kernel thread

2002-06-10 Thread Hiten Pandya
--- Andy Sporner <[EMAIL PROTECTED]> wrote: > My fault. I am using 5.0 > man shutdown_kproc Ok, I cant find any man page called shutdown_kproc in either 4.3 or 4.4. Anyway, he wants to destroy a "thread", and not an "internal" daemon/process. To destroy a kernel thread, you need to make use of

Re: kernel thread

2002-06-10 Thread Ferruccio Vitale
Andy Sporner wrote: > > man ktread_shutdown > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-hackers" in the body of the message I can't find any man pages about it; I searched on the net, grep'ed /usr/src entirely but any results. I've freebsd 4.6RC release. Any a

Re: kernel thread

2002-06-10 Thread Andy Sporner
My fault. I am using 5.0 Try this: man shutdown_kproc There was some name changes as shown: HISTORY The kproc_start() function first appeared in FreeBSD 2.2. The kproc_shutdown(), kthread_create(), kthread_exit(), kthread_resume(), kthread_suspend(), and kthread_suspend_check(

Re: kernel thread

2002-06-10 Thread Andy Sporner
Ferruccio Vitale wrote: >Hi, > >how can I destroy a kernel thread that I previously created? >Regards, > >Ferruccio > > >To Unsubscribe: send mail to [EMAIL PROTECTED] >with "unsubscribe freebsd-hackers" in the body of the message > > man ktread_shutdown To Unsubscribe: send mail to [EMAIL PR