From owner-svn-src-all@freebsd.org Mon Dec 11 10:26:27 2017 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 0C612E8C710; Mon, 11 Dec 2017 10:26:27 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 91E3A7ABC1; Mon, 11 Dec 2017 10:26:25 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBBAQGRT004372 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2017 11:26:17 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: kostikbel@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBBAQCCp022715; Mon, 11 Dec 2017 17:26:12 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Konstantin Belousov , Conrad Meyer References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <5A2E5D44.9030904@grosbein.net> Date: Mon, 11 Dec 2017 17:26:12 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20171211091943.GF2272@kib.kiev.ua> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 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: Mon, 11 Dec 2017 10:26:27 -0000 On 11.12.2017 16:19, Konstantin Belousov wrote: > On Mon, Dec 11, 2017 at 04:32:37AM +0000, Conrad Meyer wrote: >> Author: cem >> Date: Mon Dec 11 04:32:37 2017 >> New Revision: 326758 >> URL: https://svnweb.freebsd.org/changeset/base/326758 >> >> Log: >> i386: Bump KSTACK_PAGES default to match amd64 > i386 is not amd64, the change is wrong. > > i386 has the word size two times smaller than amd64, which makes typical > frame smaller by 30-40% over same code on amd64. Also i386 has much > smaller available KVA size (tens of MB) and KVA fragmentation is both > more severe and more fatal due to this. I expect that your change will > make any non-trivial load which creates enough threads to either fail > randomly or deadlock. > > If somebody tries to fit large load onto i386 machine, he must know what to > do and how to configure the kernel to adapt to the load (which does not > require the recompilation). Its very easy to get kernel stack overflow with 11-STABLE/i386 without any significant load due to abuse of kernel stack in many kernel subsystems as shown in the https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219476 Contrary, "enough threads" seems to be very non-trivial number of threads and pretty unusual load pattern for i386 as I run several such systems with kern.kstack_pages=4 for quite long time and have no problems. No random fails, no deadlocks. And with 2 pages only 11-STABLE/i386 is just unusable if one utilizes SCTP, IPv6, some WiFi connectivity, IPSEC or even very small ZFS pool. I still wonder if there is really such load pattern that creates "enough threads" for i386 to make 4-pages stack troublesome. Eugene Grosbein