Date: Tue, 24 Jul 2012 21:21:56 -0600 From: Warner Losh <imp@bsdimp.com> To: Paul Ambrose <ambrosehua@gmail.com> Cc: Konstantin Belousov <kostikbel@gmail.com>, Richard Yao <ryao@gentoo.org>, "hackers@FreeBSD.org" <hackers@freebsd.org> Subject: Re: Kernel thread stack size Message-ID: <2177D7D9-A2F6-4CF0-BAF6-5018CD8A2374@bsdimp.com> In-Reply-To: <CAMwoQQ5JfTpa_fnt3QuRCqmgS%2BsMsQghDhNAOQ02X7Hd4pd-fA@mail.gmail.com> References: <500CF526.7070708@gentoo.org> <20120723081646.GN2676@deviant.kiev.zoral.com.ua> <CAMwoQQ5JfTpa_fnt3QuRCqmgS%2BsMsQghDhNAOQ02X7Hd4pd-fA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 24, 2012, at 6:40 PM, Paul Ambrose wrote: > #define PAGE_SHIFT 12 > #define PAGE_SIZE (1<<PAGE_SHIFT) > > #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 to 1 is enough, > what is your opinion? Well, the PTE has two entries, so having just one page would be inefficient. Warner > 2012/7/23 Konstantin Belousov <kostikbel@gmail.com> > >> 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 symbol defined in sys/<arch>/include/param.h. >> It defines _default_ number of pages allocated for kernel stack of >> new thread. >> >> We have 4 pages for amd64, and 2 pages for i386, AFAIR. Look up the MIPS >> yourself. >> > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2177D7D9-A2F6-4CF0-BAF6-5018CD8A2374>