Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2815760rdh; Wed, 27 Sep 2023 13:40:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXEuam2YgcuyTxv88srCHbqhLTG1nP5dogJDPnPY2G92VxnEsJgM2GEjbZ0XbiyWCMq3ds X-Received: by 2002:a05:6808:1a94:b0:3ad:ffa4:e003 with SMTP id bm20-20020a0568081a9400b003adffa4e003mr2980308oib.33.1695847242981; Wed, 27 Sep 2023 13:40:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695847242; cv=none; d=google.com; s=arc-20160816; b=K4d8TJNp3K9nAYPXmrW8VNhBEfnyz7TdPKk63ZD3KAaT1jKGTW+5ar/UXKNLYQNoXP jUck1vnMuYjviUEmw0j+EVHEyoe/TAvTRGjmTgREq3NIwYW4/wxBiQJdrq4VkR3anZRk 6ixakmmVLI8LM++kv9uL/4/LY7oUWnn52VRUSKNQ0Ueu/+KcZ2m6ObRjliQnbO7ENrOo kw3ER3No7ZqTEOmUeJInylcN5/H4qh0L7M8X//86pzpb426/9JbkEXKlZWzpsPd64FFs z2sI1xWRoCjB27mQtLn3EQOJk/OgUnoPFplwTw5VKb4xvZLXIpp4ZEpKW827PbZfP7Nu x3gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=G7dGvBd5JsvFwgK2DiyTTK5tZ9qMJXgbyFZhkcns0j8=; fh=tUsnpC/+oNrerrMi1DieOuTcUGGh0fil9KTgOw0rMMI=; b=B2q9DlfgbLfLOdmIbP8c+4wDwRcp8eDJSsn5UHa0m3p2p/Qp8Hd0gWmLLDm6k/s7HS uZsTKEoVACC0w/uCFSTzMREuPV31RWf8qvQwfYyae5xi5ncXoyZ+YfE3URFbbbmnMtQ2 BlWb8o1kKKwBIfl/qyIlCzQer6XaIoYoggbyeSNyv07iYNOLlwwKWSQg2GFKHybcEB5+ LuTjaLTjeJCdrCsbq6LMkxeZ/+QRVrZWtPLqBXLYaT72iru6jkfQXdMvrsjvf4PGTo9D jUQVxCnOUocj/2ZHAqSeve1wC2ApfHztKv8InVpbq0YctBlr07MxMiHJp6xEzjOKDg7p VESw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=jJLQRHOA; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=XuAhfabu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id cg10-20020a056a00290a00b00690f8063627si16397144pfb.38.2023.09.27.13.40.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 13:40:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=jJLQRHOA; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=XuAhfabu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9DDFD8292696; Wed, 27 Sep 2023 03:24:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231431AbjI0KYi (ORCPT + 99 others); Wed, 27 Sep 2023 06:24:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231404AbjI0KYP (ORCPT ); Wed, 27 Sep 2023 06:24:15 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8C9DCEE; Wed, 27 Sep 2023 03:21:56 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 4593832003D3; Wed, 27 Sep 2023 06:21:53 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 27 Sep 2023 06:21:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1695810112; x=1695896512; bh=G7 dGvBd5JsvFwgK2DiyTTK5tZ9qMJXgbyFZhkcns0j8=; b=jJLQRHOAPLDSOvLQqW WexvwtHRbbvyYZN4KpedDK9YccRpe43O8KW6HCHNmUOvgDytGvWCxRVlt2WRcWAI w7J2R1N8qolU3EvO62bbJOpcszJHsBP6Cstv29tacwiI4pv+fI3A1bsWk5TkAis3 lydKl3qhhTWR1SjJNPJePPSt9qTT7rYJCtozU60/KXpPiz2Xsk906JXVplRtaOis T7arKLWfu+xbmagOY9lGeFQgWtGeDY5iZTTGAkhu/Cmn9QUr8j26eodbL5hOb8Y2 JDZIDbFr4m6K/8jRSVM1L38P9P5lWtkrIDx41cwz3uXjStv22w78aagvfDMvaNIR 89mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1695810112; x=1695896512; bh=G7dGvBd5JsvFw gK2DiyTTK5tZ9qMJXgbyFZhkcns0j8=; b=XuAhfabudNl+kqZNOXcRIxfP89H1a KPFafcBWfDl/Scy7NW7BlMWmJZkxEc2tnHz9ed8U+0WsyVXygiEdK7lCzsSBfB69 XRsqdTGQ0MdyPVSIYtFUxltswAeKap/nWJQ6Kh1ZPIZcdMXCVdE219albEBWH073 Zvp8ASEatxFtRsRGheszk9lOFk3QMzscA5nXFxzx4ol9FL2V1yt5bu8ubqxHMaDH 2VD/4268cqPTilnXUFC+IPXIP1svuq4bwW7oZJkvUh/NzjOMH5I5kaFa55zRfxDv rl7hzJSbHtZtKSBHLbymF9gly5ei0S+T946ox6OuKBxVmD729kf2UY+Ig== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvjedrtdefucetufdoteggodetrfdotffvucfrrh hofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehrnhguuceu vghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrthhtvghrnh epvdefjeevfefhvdevjeeuheefieetvdduheeludevtdefhfekleduhfdvjedtieeinecu ffhomhgrihhnpehlfihnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprghrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id D0E99B60089; Wed, 27 Sep 2023 06:21:50 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-957-ga1ccdb4cff-fm-20230919.001-ga1ccdb4c MIME-Version: 1.0 Message-Id: In-Reply-To: <6n7o7p99-9pr2-9orq-6nq1-093n7n7n43o9@syhkavp.arg> References: <6n7o7p99-9pr2-9orq-6nq1-093n7n7n43o9@syhkavp.arg> Date: Wed, 27 Sep 2023 12:21:27 +0200 From: "Arnd Bergmann" To: "Nicolas Pitre" Cc: "Zhangjin Wu" , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, "Palmer Dabbelt" , "Paul Walmsley" , paulburton@kernel.org, "Paul E. McKenney" , "Thomas Bogendoerfer" , "Willy Tarreau" , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , "Tim Bird" , "Geert Uytterhoeven" Subject: Re: [PATCH v1 0/7] DCE/DSE: Add Dead Syscalls Elimination support, part1 Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 27 Sep 2023 03:24:47 -0700 (PDT) On Tue, Sep 26, 2023, at 22:49, Nicolas Pitre wrote: > On Tue, 26 Sep 2023, Arnd Bergmann wrote: > >> $ size build/tmp/vmlinux-* >> text data bss dec hex filename >> 754772 220016 71841 1046629 ff865 vmlinux-tinyconfig >> 717500 223368 71841 1012709 f73e5 vmlinux-tiny+nosyscalls >> 567310 176200 71473 814983 c6f87 vmlinux-tiny+gc-sections >> 493278 170752 71433 735463 b38e7 vmlinux-tiny+gc-sections+nosyscalls >> 10120058 3572756 493701 14186515 d87813 vmlinux-defconfig >> 9953934 3529004 491525 13974463 d53bbf vmlinux-defconfig+gc >> 9709856 3500600 489221 13699677 d10a5d vmlinux-defconfig+gc+nosyscalls >> >> This would put us at an upper bound of 10% size savings (80kb) for >> tinyconfig, which is clearly significant. For defconfig, it's >> still 2.0% or 275kb size reduction when all syscalls are dropped. > > I did something similar a while ago. Results included here: > > https://lwn.net/Articles/746780/ > > In my case, stubbing out all syscalls produced a 7.8% reduction which > was somewhat disappointing compared to other techniques. Of course it > all depends on what is your actual goal. Thanks for the link, I had forgotten about your article. With all the findings combined, I guess the filtering at the syscall table level is not all that promising any more. Going through the list of saved space, I ended up with 5.7% (47kb) in the best case after I left the 40 syscalls from the example in this thread. Removing entire groups of features using normal Kconfig symbols based on the remaining syscalls that have the largest size probably gives better results. I can see possible groups of syscalls that could be disabled under CONFIG_EXPERT, along with making their underlying infrastructure optional: - xattr - ptrace - adjtimex - splice/vmsplice/tee - unshare/setns - sched_* After those, one would quickly hit diminishing returns. Arnd