From owner-svn-src-all@freebsd.org Tue Aug 4 14:01:09 2015 Return-Path: Delivered-To: svn-src-all@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 E67CA9B23F3 for ; Tue, 4 Aug 2015 14:01:09 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) (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 8DE1B2F0 for ; Tue, 4 Aug 2015 14:01:09 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by wijp15 with SMTP id p15so7423595wij.0 for ; Tue, 04 Aug 2015 07:01:02 -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:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=yOF4FhAah6ErqnTh7n7YQzJz8aHzjYASoLiQWUAvfzA=; b=VaJ/0i6RZ8+UFUCiwA4M/zPz3ha9WSjqohrLdHgFTxzLXTs8br9kdV6dyiZtL1LkdQ GPTQDvUeyWz3wKJIEdN+X8IdeLJlAy5NszpcmHRI7wRMMHr4EsjS98jRHK+ImxfQh5eN A/50zrJn41kaZKMiYcht3UYAK3KDX1hCruj1ZFM0g0/I7EWduLoBXW2hArmO5yCrP/eH klbLi/V9cplrwxYZyy3HoQ8krUqJhYbLPzpEvy2otFupzFlUvmxkb/LJkAeTU6Yd+DJd BR4PkiS4wiplUZEqhPhjxCla/dLXlwgrwhwGPSmX5j5CHcVDlA4SmsKafIx0cAmTTDxh 6Fyw== X-Gm-Message-State: ALoCoQlnIn9YtywiM6eGnI/Uf+5ru4EC4uctpLQ12UIXIjPP73Sb//bgP1+OPovwjQqqOSkWocxG X-Received: by 10.194.191.164 with SMTP id gz4mr8460401wjc.21.1438696862393; Tue, 04 Aug 2015 07:01:02 -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 yu4sm1992817wjc.43.2015.08.04.07.01.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Aug 2015 07:01:01 -0700 (PDT) Subject: Re: svn commit: r286288 - in head/sys/i386: i386 include To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201508041350.t74DoraL020588@repo.freebsd.org> From: Steven Hartland Message-ID: <55C0C59B.5040906@multiplay.co.uk> Date: Tue, 4 Aug 2015 15:00:59 +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: <201508041350.t74DoraL020588@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2015 14:01:10 -0000 This effects other platforms arm and mips spring to mind from when I last checked. Would you like me to backout the checks I added to the ZFS module once all the platforms are addressed? Regards Steve On 04/08/2015 14:50, Konstantin Belousov wrote: > Author: kib > Date: Tue Aug 4 13:50:52 2015 > New Revision: 286288 > URL: https://svnweb.freebsd.org/changeset/base/286288 > > Log: > Give large kernel stack to the initial thread . Otherwise, ZFS > overflows the stack during root mount in some configurations. > > Tested by: Fabian Keil (previous version) > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > > Modified: > head/sys/i386/i386/genassym.c > head/sys/i386/i386/locore.s > head/sys/i386/i386/machdep.c > head/sys/i386/include/param.h > > Modified: head/sys/i386/i386/genassym.c > ============================================================================== > --- head/sys/i386/i386/genassym.c Tue Aug 4 13:42:44 2015 (r286287) > +++ head/sys/i386/i386/genassym.c Tue Aug 4 13:50:52 2015 (r286288) > @@ -103,6 +103,7 @@ ASSYM(V_SYSCALL, offsetof(struct vmmeter > 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); > > Modified: head/sys/i386/i386/locore.s > ============================================================================== > --- head/sys/i386/i386/locore.s Tue Aug 4 13:42:44 2015 (r286287) > +++ head/sys/i386/i386/locore.s Tue Aug 4 13:50:52 2015 (r286288) > @@ -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 */ > > Modified: head/sys/i386/i386/machdep.c > ============================================================================== > --- head/sys/i386/i386/machdep.c Tue Aug 4 13:42:44 2015 (r286287) > +++ head/sys/i386/i386/machdep.c Tue Aug 4 13:50:52 2015 (r286288) > @@ -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 > > Modified: head/sys/i386/include/param.h > ============================================================================== > --- head/sys/i386/include/param.h Tue Aug 4 13:42:44 2015 (r286287) > +++ head/sys/i386/include/param.h Tue Aug 4 13:50:52 2015 (r286288) > @@ -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 < 4 > +#define TD0_KSTACK_PAGES 4 > +#else > +#define TD0_KSTACK_PAGES KSTACK_PAGES > +#endif > > /* > * Ceiling on amount of swblock kva space, can be changed via >