From owner-svn-src-head@freebsd.org Mon Aug 3 13:49:29 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F7E49B2055 for ; Mon, 3 Aug 2015 13:49:29 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A1FA31D48 for ; Mon, 3 Aug 2015 13:49:28 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by wibud3 with SMTP id ud3so136995323wib.1 for ; Mon, 03 Aug 2015 06:49:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=TV2W63je99BmkPByO4ycqYByDJzR9GBu5Gt/6UDFgoY=; b=m9Vzy1k3ImBHC6ufGuGbiqPXLrMdwXu2zcXcIO+sTSQ/52QPk9zxAyzVr/cWLHjGmi FZX95rKHaeH5RTpbIbkE9IruY85gfVAi/tou9X2cbWHO5BXX+GYBXd5+GsjdPCTUnAek QMNU3t56ElyggEdjMra+Xwt2uPAwwO9FfSsAN/DiWa14c+ogqVlvyA0ar/xYRpOCRrr8 cSpfmEcz4GvXPol/oa9OpFaB+uZtDo62p3Ufbf7PJSWcRkSOoc2i27BipJVZWwq8FgFI AO7UVVb/U3fx8DGEemTpRjan13CL5XZgzbksbA1BDZRvfdTuvut+B+rOr6stvdWTJ1JN V7Ew== X-Gm-Message-State: ALoCoQnCUDs9NmlVvAwbgtdFb1yviv3xSYzXKoMtmken1xriwGGHRisypgMyvTXO2NIlj5Mn/Cac X-Received: by 10.180.36.169 with SMTP id r9mr33363447wij.40.1438609761424; Mon, 03 Aug 2015 06:49:21 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by smtp.gmail.com with ESMTPSA id ev2sm13688483wib.21.2015.08.03.06.49.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 06:49:20 -0700 (PDT) Subject: Re: svn commit: r286223 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Konstantin Belousov References: <201508030934.t739YAkT026668@repo.freebsd.org> <20150803094730.GA24698@zxy.spb.ru> <55BF431E.3020601@freebsd.org> <2757800.HIDNx1G49O@overcee.wemm.org> <20150803111942.GB2072@kib.kiev.ua> <55BF557B.60009@multiplay.co.uk> <20150803120359.GC2072@kib.kiev.ua> Cc: Peter Wemm , svn-src-all@freebsd.org, Slawa Olhovchenkov , svn-src-head@freebsd.org, src-committers@freebsd.org From: Steven Hartland Message-ID: <55BF7167.1090900@multiplay.co.uk> Date: Mon, 3 Aug 2015 14:49:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150803120359.GC2072@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2015 13:49:29 -0000 On 03/08/2015 13:03, Konstantin Belousov wrote: > On Mon, Aug 03, 2015 at 12:50:19PM +0100, Steven Hartland wrote: >> For this change I don't want to get into fixing the thread0 stack size, >> which can be done later, just >> to provide a reasonable warning to the user that smaller values could >> cause a panic. > Hmm, is it limited to the thread0 only ? I.e., would only increasing > the initial thread stack size be enough to boot the kernel ? The zfs > threads do request larger stack size, I know this. > > Can somebody test the following patch in the i386 configuration which > does not boot ? > > diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c > index 7a00740..6a00d23 100644 > --- a/sys/i386/i386/genassym.c > +++ b/sys/i386/i386/genassym.c > @@ -103,6 +103,7 @@ ASSYM(V_SYSCALL, offsetof(struct vmmeter, v_syscall)); > ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); > /* ASSYM(UPAGES, UPAGES);*/ > ASSYM(KSTACK_PAGES, KSTACK_PAGES); > +ASSYM(TD0_KSTACK_PAGES, TD0_KSTACK_PAGES); > ASSYM(PAGE_SIZE, PAGE_SIZE); > ASSYM(NPTEPG, NPTEPG); > ASSYM(NPDEPG, NPDEPG); > diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s > index 5bf7944..4d8e22f 100644 > --- a/sys/i386/i386/locore.s > +++ b/sys/i386/i386/locore.s > @@ -731,7 +731,7 @@ no_kernend: > movl %esi,R(IdlePTD) > > /* Allocate KSTACK */ > - ALLOCPAGES(KSTACK_PAGES) > + ALLOCPAGES(TD0_KSTACK_PAGES) > movl %esi,R(p0kpa) > addl $KERNBASE, %esi > movl %esi, R(proc0kstack) > @@ -800,7 +800,7 @@ no_kernend: > > /* Map proc0's KSTACK in the physical way ... */ > movl R(p0kpa), %eax > - movl $(KSTACK_PAGES), %ecx > + movl $(TD0_KSTACK_PAGES), %ecx > fillkptphys($PG_RW) > > /* Map ISA hole */ > diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c > index 2be5dbc..76790f0 100644 > --- a/sys/i386/i386/machdep.c > +++ b/sys/i386/i386/machdep.c > @@ -2445,7 +2445,7 @@ init386(first) > #endif > > thread0.td_kstack = proc0kstack; > - thread0.td_kstack_pages = KSTACK_PAGES; > + thread0.td_kstack_pages = TD0_KSTACK_PAGES; > > /* > * This may be done better later if it gets more high level > diff --git a/sys/i386/include/param.h b/sys/i386/include/param.h > index b3fd85f..bc79c20 100644 > --- a/sys/i386/include/param.h > +++ b/sys/i386/include/param.h > @@ -114,6 +114,11 @@ > #define KSTACK_PAGES 2 /* Includes pcb! */ > #endif > #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ > +#if KSTACK_PAGES < 3 > +#define TD0_KSTACK_PAGES 4 > +#else > +#define TD0_KSTACK_PAGES KSTACK_PAGES > +#endif > > /* > * Ceiling on amount of swblock kva space, can be changed via I don't have a reproduction box here I'm afraid, might be an idea to post the patch to the following bug reports to see if one of the reporters can test: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201859 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=189355 Regards Steve