From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 25 03:22:00 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 CA468106566B for ; Wed, 25 Jul 2012 03:22:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9425D8FC08 for ; Wed, 25 Jul 2012 03:22:00 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so698789pbb.13 for ; Tue, 24 Jul 2012 20:22:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=FIU594dX8hz5ddKLxGLQWVhimkBtnRjia690J8/vHhQ=; b=chpvi6ilBJDApvKZyZF6SkLDL3XU9t8QIZrkqyLM17SxlIsct8mlXI828XALbyoxQm hNaadN4tE56cECRUS7k01b2OgrowA0svaQar9lL1dzKJzs7oDKyqyosltPMpX8+QSVMr CNK7JxJQkheerAF5+G417a5ZZDsWT08yfWEWtVwVpLaqQ85+TkN4Dx6dz87rEDXJwvvZ 4F01KVPq9swUumNKPjhxRnLT4+ZGQ42H1/XoOg+fszxEwWEGX2QJzq3FYwNGaJ9hF+ia MNFJ2dld5IUE+fobCkjdI7h2FbiOl0wd3uUDO6++HrXq68pJ2B7IiJu2N1Sjd0v99qfl 45tg== Received: by 10.68.212.70 with SMTP id ni6mr49767103pbc.22.1343186520155; Tue, 24 Jul 2012 20:22:00 -0700 (PDT) Received: from [10.0.0.63] (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id og4sm13413013pbb.48.2012.07.24.20.21.58 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Jul 2012 20:21:59 -0700 (PDT) Sender: Warner Losh Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Tue, 24 Jul 2012 21:21:56 -0600 Content-Transfer-Encoding: 7bit Message-Id: <2177D7D9-A2F6-4CF0-BAF6-5018CD8A2374@bsdimp.com> References: <500CF526.7070708@gentoo.org> <20120723081646.GN2676@deviant.kiev.zoral.com.ua> To: Paul Ambrose X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQmdIrPyba/XKZA3AK3hN51ETc9zJHImW2Ze6aJtT1aMnJuUAxA4WJfJtZzmj7YJXdqekq/k 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 03:22:00 -0000 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"