From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 25 06:25:10 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9C921065670 for ; Wed, 25 Jul 2012 06:25:10 +0000 (UTC) (envelope-from ambrosehua@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 55DB08FC0C for ; Wed, 25 Jul 2012 06:25:10 +0000 (UTC) Received: by weyx56 with SMTP id x56so296658wey.13 for ; Tue, 24 Jul 2012 23:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=a7kYwuX0wmS6XgbBc0XC8esQ1X3c3pB/wTdNFoHI5ms=; b=RtBGn6KmnBsVjjB/128Xmn5bdNySwxyn4Y/yTTV8GtLKI59zJ0oF8b85X+QymRaZFi nw7KNU1BQlhB42kSLI+5AaZTFQ5LVZTYzgVuM759YLuglVQSycZT1IKEIhXaHNZ4zUEC AoQzwXrEj4ORP5sPu6VJeWDA3WriIq3uKts4RvaQt6rglmcZupilHhUXTLsfLpBCwtzb 7T1qx4jMZ65UhrPkPnTteVC3GrHz+oiWXwaNqlSAZAHuTj/PcCdEpj16OXyB1QYntA+H ZiP5xiUUeuJv/Qory/sRFb3Ty3F/trTtph5ydOYwp++N+gzYhJbe3G8hdnuFOdhMyt3h PL6Q== MIME-Version: 1.0 Received: by 10.216.27.7 with SMTP id d7mr1612082wea.187.1343197509442; Tue, 24 Jul 2012 23:25:09 -0700 (PDT) Received: by 10.223.144.216 with HTTP; Tue, 24 Jul 2012 23:25:09 -0700 (PDT) Received: by 10.223.144.216 with HTTP; Tue, 24 Jul 2012 23:25:09 -0700 (PDT) In-Reply-To: <2177D7D9-A2F6-4CF0-BAF6-5018CD8A2374@bsdimp.com> References: <500CF526.7070708@gentoo.org> <20120723081646.GN2676@deviant.kiev.zoral.com.ua> <2177D7D9-A2F6-4CF0-BAF6-5018CD8A2374@bsdimp.com> Date: Wed, 25 Jul 2012 14:25:09 +0800 Message-ID: From: Paul Ambrose To: Warner Losh Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Konstantin Belousov , Richard Yao , "hackers@FreeBSD.org" Subject: Re: Kernel thread stack size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2012 06:25:10 -0000 Could you be more specific about "inefficient"=A3=BF =D4=DA 2012-7-25 =C9=CF=CE=E711:22=A3=AC"Warner Losh" =D0= =B4=B5=C0=A3=BA > > > 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 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 > > > >> 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//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" > could you be more specific about "inefficient"=A3=BF