From owner-svn-src-head@freebsd.org Mon Dec 11 15:33:11 2017 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 E012FE95629; Mon, 11 Dec 2017 15:33:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C59D46AC2A; Mon, 11 Dec 2017 15:33:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBBFX8NJ081790; Mon, 11 Dec 2017 07:33:08 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBBFX8sl081789; Mon, 11 Dec 2017 07:33:08 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712111533.vBBFX8sl081789@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326758 - in head/sys/i386: conf include In-Reply-To: <20171211152219.GL2272@kib.kiev.ua> To: Konstantin Belousov Date: Mon, 11 Dec 2017 07:33:08 -0800 (PST) CC: rgrimes@freebsd.org, Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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, 11 Dec 2017 15:33:12 -0000 > On Mon, Dec 11, 2017 at 07:09:10AM -0800, Rodney W. Grimes wrote: > > The current comment about a pcb, I thought that code was changed > > so we only put the pointer to a pcb on the stack. > > pcb is on top of the stack, followed by the userspace FPU registers save > area. I do not see any sense in existence of pcb in modern kernel, it is > a remnant of the user area that was swappable. Currently pcb is swappable > as well, but the value of this is much less then the overhead we pay by > the stack space reduction. How about KSTACK_PAGES should be KSTAKE_BYTES/PAGESIZE, and we need a much better formula for define of KSTACK_BYTES so that these facts are more accurately defined? And a compile time assert if this ever growes to something unreasonable that would cause other issues. I fully agree with you that just bumping KSTACK_PAGES is very much the wrong way to fix the i386 issue of certain code not running, it is that code that should be examined for over usage of the stack. I can assert that the base i386 system is very usable for tons of things without this change, I have at least 30 VM's running FreeBSD 11.1/i386 in some very small footprints, typically 64MB, that have zero issues. But then they are not using any of the code that sited as problem areas. > FPU save area is the on of the problem which makes us increase the amd64 > stack size, AVX or even AVX512 make the things much worse. It is unlikely > that somebody would run 32bit kernel on machine capable of that extensions, > i.e. Haswell or Skylake. Your igonoring the virutalization world, host is a skylake or haswell, guest is i386 as it has small memory needs and no use to waste half of all pointers. We need to break the developers model that i386 is dead and that i386 is not running on extremly modern hardware due to the factor of virtualization. Output from one of my VM's running inside bhyve: # uname -a FreeBSD filestore.dnsmgr.net 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 04:10:47 UTC 2017 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 # dmesg | head -24 Copyright (c) 1992-2017 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0) VT(vga): resolution 640x480 info: [drm] Initialized drm 1.1.0 20060810 CPU: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz (2494.39-MHz K8-class CPU) Origin="GenuineIntel" Id=0x306a9 Family=0x6 Model=0x3a Stepping=9 Features=0xbfebfbff Features2=0x7fbae3bf AMD Features=0x28100800 AMD Features2=0x1 Structured Extended Features=0x281 XSAVE Features=0x1 VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID TSC: P-state invariant, performance statistics real memory = 12884901888 (12288 MB) avail memory = 12114096128 (11552 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs -- Rod Grimes rgrimes@freebsd.org