Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp238276rdb; Sat, 30 Sep 2023 02:32:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNwISMrISV+327Qh87mfs7t2EG7xlxdSTi6nH7c+TsXc2UDCjS8NDuaN+1zxm8MTI3dEQk X-Received: by 2002:a17:90b:358c:b0:278:fb87:43e3 with SMTP id mm12-20020a17090b358c00b00278fb8743e3mr6437757pjb.12.1696066325751; Sat, 30 Sep 2023 02:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696066325; cv=none; d=google.com; s=arc-20160816; b=ZYfR860su1D67zdhURLxmMx53ZFzBd0/4OcSzwTsGD5JA2Qx+Knr5FK3PJyvJuVAWY 6hA3WQGQcuepLLhXryjQYxNFmESiwaZ1nALCIyvTKITv1PWzt28gpFYdxepb4va3FxWN RD2ZRp3O/6bPdiLdZsuG1r/G7QntnZE0o2gz9c1rll58ZCVGUnJYYZq3/4FZSn5dPT5r l7ujKLDHnv10c/s3h8rXEwDJ5izd0MInUgow8RzQCh/I4CEmbOIKwhkZezVyWKmOmD2S kTOcnyVD8Du75teuGCyX3vZNeY6RmhGl3U0YWbuBiAzUUeEAWOYLVUISeUCIWc9UjmKn 0qzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=u81go0NO7ycf5K37+eWYOZYnqfKZvi/Yky8r+TiJL5I=; fh=0+oGC+gt+D1WbR83mwD7sMW+rYx/cxqAR+7GvzudPaQ=; b=VtqaWTBSNHMBs5AdjPK4IRA3fomKYJSrxrh0KCp8Lx49dvcnRJJ+s/eK/K52YUkkT3 /f/g9IEjgLSMuTB9RmP9CUN0rvhJWxPbDu4ZaKm9Jk+YR9UrPq6lnCoYwTMn5B6Utz75 5xtiy7RCy2DMl2DfXs8xWDsSLW0ayct5OB8BQ8RdXqFxzZd+66gpKtL5Rxwl/5L7orQG MLAaQNQ5rozV7miG3af0mo7hGjC09mMpevLJi0i3c5PXNEPxcvtSt2rdJULNRUWn/oNp zdYA55WfTjCka7dmkP4rJFFfdqSiUYMoyo+H+XhTBf9w9PNDHuUK2Radsk0sn//rJj/R o1SQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id w14-20020a17090a8a0e00b00274ac850fbbsi3254791pjn.132.2023.09.30.02.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 02:32:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 140EA81653B7; Sat, 30 Sep 2023 02:32:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233987AbjI3Jbx (ORCPT + 99 others); Sat, 30 Sep 2023 05:31:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233926AbjI3Jbw (ORCPT ); Sat, 30 Sep 2023 05:31:52 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6764DD; Sat, 30 Sep 2023 02:31:48 -0700 (PDT) X-QQ-mid: bizesmtp80t1696066296thr4pjsz Received: from main2-ubuntu.tail147f4.ts.net ( [202.201.15.117]) by bizesmtp.qq.com (ESMTP) with id ; Sat, 30 Sep 2023 17:31:33 +0800 (CST) X-QQ-SSF: 01200000000000B06000000A0000000 X-QQ-FEAT: znfcQSa1hKbcYxqfol5fP9hy+d5iapd9bWXb81pkq2JorFRHt2ASdRq962bXO Eyl4InpEH2CpYAFUV9l2NYqPU+ovjnAGXlV6VuKPT6l5hIoGbwACL65IFYfcAOI9R5vxSxh ZVK2QI8L8KAdq3fCDHpMUKqg5zwNrhJUoqciQm/r0agtEM+FpE3cQOMFpaybcCKzl0E4XwZ 9z4sDnmlMVDXzTD5KCn1+nfGuufGJHuDtn28ZndGAGAbYBESgzNcHQM4gRGtRIqZuNd1nW1 fMB4ZZVjW7hiEYljO5IhyEo5/GJCihu7WTCh7i2Ah7wj3qRXX4Mzy/96toY/0Q8o16OgfJV 7p7T0l6pCJRY2QycXGEvTE4JwG19BRfLV6CaVq6Zbm9SizxlAc= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 15485949091047528839 From: Yuan Tan To: falcon@tinylab.org Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux@weissschuh.net, palmer@rivosinc.com, paul.walmsley@sifive.com, paulburton@kernel.org, paulmck@kernel.org, tim.bird@sony.com, tsbogend@alpha.franken.de, w@1wt.eu Subject: Re: [PATCH v1 0/7] DCE/DSE: Add Dead Syscalls Elimination support, part1 Date: Sat, 30 Sep 2023 17:31:32 +0800 Message-Id: <20230930093132.2166-1-tanyuan@tinylab.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Sat, 30 Sep 2023 02:32:03 -0700 (PDT) I don't know why linux-kernel@vger.kernel.org reject my email send out by thunderbird. So here I am resending this mail with git send-email. Here is a test result about DEAD_CODE_DATA_ELIMINATION (DCE) and dead syscalls elimination (DSE). It's based on config[1] and a simple hello.c initramfs. In the DSE test, we set CONFIG_SYSCALLS_USED="sys_write sys_exit sys_reboot," which is used by hello.c to simply print "Hello" then exit and shut down qemu. | | syscall remain | vmlinux size | vmlinux after strip | | ---------------------------------- | -------------- | ---------------- | ------------------- | | disable DCE | 236 | 2559632 | 1963400 | | enable DCE | 208 | 2037384 (-20.4%) | 1485776 (-24.3%) | | enable DCE and DSE(SHE_GROUP) | 3 | 1856640 (-27.6%) | 1354424 (-31.0%) | | enable DCE and DSE(SHE_LINK_ORDER) | 3 | 1856664 (-27.6%) | 1354424 (-31.0%) | It shows that dead syscalls elimination can save 7% of space based on DCE. [1]: https://pastebin.com/KG4fd7aT