Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2073299imm; Thu, 23 Aug 2018 13:41:59 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxEnHYCjM7bWdAwQlhK9YP05mnf0y5VXUNKFaOh/gmebeke/2we+gD/B9IhGK21qPPsCgUc X-Received: by 2002:a17:902:4324:: with SMTP id i33-v6mr58979067pld.43.1535056919255; Thu, 23 Aug 2018 13:41:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535056919; cv=none; d=google.com; s=arc-20160816; b=sFKv50xCsYsfeZ8/wfw25dhFcSoSuIQdLg6d+PvLIRNRrIDIgU+vrBkI37GbuYwUNP Bh5sMbzfA+5sBDEHlFOmEQgCqPrhYj4aE/SeY1WfTxyGCxR7NajQvuhQpRdF0WFXbYTp lxz9px7atFRnscYpxumeQwWFmxp4XtINt1BtHGttsddUh5IpFgA13uWh8AUDRxiP+ejI pL8/Og++IZyEhhX7qEXueBBTPIYCUKwy3EY0qQdG80v2ouZ/687w+aOqMRDDbAtsn+17 2e1WVLkATUh6Wv83ZgZbQoaGLRp8mEz8/lE/053lY92qwgeeaUrhC/S8grm7322uOOOM QZvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date:arc-authentication-results; bh=oR3dSFRuk1ogK/DXQqSPZNN49t8Ovb7P3LAzhVppxnU=; b=VreP1BUrsZ/L29DJMKZ2RHr5SojHmbrAfvgMYobBYP4v9qElia/htajRMiTqNrZFPv c1lxAeQgMFDQ5ZfEkFXv6eQ+B4mcRJY8b6py6Ie9XAumF/4MZuV7SjIx6gxtFPsWZxTB 2XydCrYTKBpJVM/6Jmai6N7jQ5x1ifgLBdY/pwn7CUjvk8RCymlDg84b3WVOdNgsxDbI 7tBXs9XI4JEjqkl5FphXIxBWsYMdkqHrWWRdDLnUIGigIgwULMg+XCU8af1vOb4fYWgk O1kVsWoabV4XcvYf6Y+yehXAxjSnwff1kYmANT9SN71qYpBa3bgmeQcfD/mdN+Xxt12i zLzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o8-v6si4290734pgq.88.2018.08.23.13.41.43; Thu, 23 Aug 2018 13:41:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727562AbeHXALG (ORCPT + 99 others); Thu, 23 Aug 2018 20:11:06 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50436 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726473AbeHXALG (ORCPT ); Thu, 23 Aug 2018 20:11:06 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7NKdOTq188764 for ; Thu, 23 Aug 2018 16:39:42 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0b-001b2d01.pphosted.com with ESMTP id 2m22ggc33u-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 23 Aug 2018 16:39:42 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 Aug 2018 16:39:41 -0400 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 23 Aug 2018 16:39:39 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7NKdcdU3277120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 23 Aug 2018 20:39:38 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A119FB2066; Thu, 23 Aug 2018 16:38:42 -0400 (EDT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 81ECDB205F; Thu, 23 Aug 2018 16:38:42 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.159]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 23 Aug 2018 16:38:42 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id D06A516C374D; Thu, 23 Aug 2018 13:39:38 -0700 (PDT) Date: Thu, 23 Aug 2018 13:39:38 -0700 From: "Paul E. McKenney" To: Josh Triplett Cc: Adam Borowski , nicolas.pitre@linaro.org, linux-kernel@vger.kernel.org Subject: Re: Kernel-only deployments? Reply-To: paulmck@linux.vnet.ibm.com References: <20180823174359.GA13033@linux.vnet.ibm.com> <20180823185417.y3ung3b553f2d24a@angband.pl> <20180823191604.GB3243@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180823191604.GB3243@localhost> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18082320-0060-0000-0000-000002A3520F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009599; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01077839; UDB=6.00555746; IPR=6.00857812; MB=3.00022893; MTD=3.00000008; XFM=3.00000015; UTC=2018-08-23 20:39:41 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18082320-0061-0000-0000-000046451F7C Message-Id: <20180823203938.GW4225@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-23_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=960 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808230213 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 23, 2018 at 12:16:04PM -0700, Josh Triplett wrote: > On Thu, Aug 23, 2018 at 08:54:17PM +0200, Adam Borowski wrote: > > On Thu, Aug 23, 2018 at 10:43:59AM -0700, Paul E. McKenney wrote: > > > The mkinitramfs approach results in about 40MB of initrd, and dracut > > > about 10MB. Most of this is completely useless for rcutorture, which > > > isn't interested in mounting filesystems, opening devices, and almost > > > all of the other interesting things that mkinitramfs and dracut enable. > > > > > > Those who know me will not be at all surprised to learn that I went > > > overboard making the resulting initrd as small as possible. I started > > > by throwing out everything not absolutely needed by the dash and sleep > > > binaries, which got me down to about 2.5MB, 1.8MB of which was libc. > > > This situation of course prompted me to create an initrd containing > > > a statically linked binary named "init" and absolutely nothing else > > > (not even /dev or /tmp directories), which weighs in at not quite 800KB. > > > This is a great improvement over 10MB, to say nothing of 40MB, but 800KB > > > for a C-language "for" loop containing nothing more than a single call to > > > sleep()? > > > > .globl _start > > .data > > req: .8byte 999999999, 999999999 > > .text > > _start: > > mov $35, %rax # syscall: nanosleep > > mov $req, %rdi > > xor %rsi, %rsi > > syscall > > jmp _start > > > > > > as sl.s -o sl.o > > ld sl.o -o init > > > > 'Ere you go, no libc needed. If your arch is not amd64, just say so. > > "pause" ($34) would also suffice, and would not require an argument or a > .data section. Cute! ;-) Thanx, Paul