From owner-freebsd-arch@freebsd.org Fri Jan 25 20:48:32 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 080AD14C277E for ; Fri, 25 Jan 2019 20:48:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 5D06C71DD3 for ; Fri, 25 Jan 2019 20:48:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: by mailman.ysv.freebsd.org (Postfix) id 2062214C277C; Fri, 25 Jan 2019 20:48:31 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EB9914C2779 for ; Fri, 25 Jan 2019 20:48:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 401E371DD1; Fri, 25 Jan 2019 20:48:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id A38393D5B3B; Sat, 26 Jan 2019 07:48:20 +1100 (AEDT) Date: Sat, 26 Jan 2019 07:48:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Rodney W. Grimes" cc: Baptiste Daroussin , arch@freebsd.org Subject: Re: Importing mksh in base In-Reply-To: <201901251936.x0PJaepi089796@pdx.rh.CN85.dnsmgr.net> Message-ID: <20190126065429.F872@besplex.bde.org> References: <201901251936.x0PJaepi089796@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=kMf0utG4AAAA:8 a=B6_9Qa4dz8oX0Z2X-sQA:9 a=CjuIK1q_8ugA:10 a=of2mfszF-hMA:10 a=TTWE1O2ssfbasxdXZsrT:22 X-Rspamd-Queue-Id: 401E371DD1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.90)[-0.896,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2019 20:48:32 -0000 On Fri, 25 Jan 2019, Rodney W. Grimes wrote: >> I would like to import mksh in base, https://www.mirbsd.org/mksh.htm >> And make it the default root shell (not necessary in one step) >> >> Why: >> 1/ it is tiny 400k (in the packaged version) all other shells fitting the >> expectation are bigger > It is more than twice the size of our current /bin/sh, and giving up > 200k on the nano/tiny/wifi BSD is hard to justify. 400k is near the > size of tcsh. That is only the dynamically linked size. It is much larger and slower than indicated by that. Statically linked /bin/sh is now about 15 times larger than in FreeBSD-1 (~1300K text instead of ~90K). Dynamical linkage costs more in runtime than the memory size expansion. E.g., /bin/echo in a shell loop is about 60% slower in -current than it was in FreeBSD-~5.2 using a CPU that is about twice as fast in -current and 8 CPUs instead of 1 (this should be good for CPU affinity of the shell process). Dynamic linkage alone is enough to give this slowdown. Static linkages seems to give a relatively smaller advantage in -current Bruce