Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp286294lql; Mon, 11 Mar 2024 02:39:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWaTy5BAU0EE27Os/WYYCrdZSEO/poDKrWQqFSl6IguLN+twxq+TpX/0DPGIVIqrt+TjJrKspsBF82zGgsAF2vLKJX8F7LnoRJTo44fDA== X-Google-Smtp-Source: AGHT+IHCBOSa1kVNXmMrOELkWUqPeVWX1bUfNc+Ovr60bv0NiSbZ1FdcaPx4ThbJVbSxLyymnOlj X-Received: by 2002:a05:622a:104e:b0:42e:7e4d:9b68 with SMTP id f14-20020a05622a104e00b0042e7e4d9b68mr11362676qte.18.1710149966640; Mon, 11 Mar 2024 02:39:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710149966; cv=pass; d=google.com; s=arc-20160816; b=k2XQWu7Vr1e1xqwt1pn8L7NI9z6VAV+njW8TnyXyBjV/M66HeMZwD99nWJRD+d61Of 6QjSBvgSZlXGTlRVRsKGbPV99ZEokMcl9JDfYzybU7XFuToujWZTFVBMul7RQahKADLM ZU0VNpoiQdTTzIhe8UtwOkuohIT6bcxN6j5yLsBvoO2BezZUmYay8epmTpf9yNLCWzxt qMSjcAtZsVTkbrJ+laZJTvtTzFCl2uNHGUXWm/qTQO9Auqlo8yHQm0UNXQrNhHvhlHrF XJhxzAFn+BOtqfDPILjmulysWEYZpJvXyFIkXXMUeUmeI0TABdfmIC/6bcy84EXMlKqe 8XZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=oIpI1/LHhx1JtD2wqVHA1FtGHLMwNAcOIr7qGp5L3YY=; fh=4PRMki0+9LL94sJqEAzC36B+1LaDtVHFaGr9gIaeOg8=; b=C+aehvDVjV7a62OowvEZyczya/N+Vwb6ABuwmaCrn2UtBehoeo+0F2IxcxgMUhtZ45 zfl12lfoEtCekqtST5lbWq5MnbCZP0QPk62BuIENImbkCQZqVhml470f20/+yebg/q/U SrOsQ/LG/sKZulCYwZslVKwSmqWp+ePTAiBFBsqG8xBManTHNQxw4QjlhuoEFYT7KZJc noJUgLVPCBPcjK7O5nb+UNzXc2CAXMoj4EbYp2EqWA7K80kvffndn/oyAIxo4Ow9SpCZ dx0DDrL694PVKtRN+LuHFz3ZTCam5HzqMOPxWziByFp+cAff77xO/5wKyDnizRevQ4lV CXAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-98639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98639-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g8-20020ac87d08000000b0042ef3d97869si5114228qtb.347.2024.03.11.02.39.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 02:39:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-98639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98639-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5C8861C21035 for ; Mon, 11 Mar 2024 09:39:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC39818C01; Mon, 11 Mar 2024 09:39:19 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5407012B7F for ; Mon, 11 Mar 2024 09:39:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710149959; cv=none; b=eB/YRhSr+h76Qf+h3mLVKmg3Uudggoc+GiB3vb5i0/NNpsKK2/ceuUVntxTaIOm3F89GysOzvKapHzRZ2ohTazi04HKoJyb352/CO4hpTrpYOJDUBdqA0FZFyMulmqEHIicvz+1wkjwb+6WJCanhFOYNFPtKgZrYC1h5ZbVw6Mw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710149959; c=relaxed/simple; bh=MYutdIjb/N7Yx3CRS+y5HbEnA1UZT5yZzKO7IjnGQik=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=GqF6PQ/Qdc4L1zwx+eHT3rzTpv3ABuB4Fyj7B0YIZoM8JNErHY8btx2VduIh/Au7h+wslOILAQuXDGKMqa6swzXYGI4zUe0irNo/JGFaQt8sn3jHYb2ZaO/IgS8CfW+bWCUp2Ku5UuvAo+BxDCqEucedN5Zo/Es1OfCF+RESrmk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4TtWrM5qnXzwPQM; Mon, 11 Mar 2024 17:36:51 +0800 (CST) Received: from dggpemd100004.china.huawei.com (unknown [7.185.36.20]) by mail.maildlp.com (Postfix) with ESMTPS id AC1AC14044F; Mon, 11 Mar 2024 17:39:14 +0800 (CST) Received: from [10.67.109.211] (10.67.109.211) by dggpemd100004.china.huawei.com (7.185.36.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Mon, 11 Mar 2024 17:39:14 +0800 Message-ID: <79b87ef0-77c4-45a9-aae2-1754f1b407fe@huawei.com> Date: Mon, 11 Mar 2024 17:39:14 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH-next v2] arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION Content-Language: en-US To: Geert Uytterhoeven CC: Arnd Bergmann , , , Ard Biesheuvel , Fangrui Song , Russell King , Andrew Davis , Andrew Morton , "Kirill A. Shutemov" , Geert Uytterhoeven , Jonathan Corbet , Mike Rapoport , Rob Herring , Thomas Gleixner , Linus Walleij , References: <20240307151231.654025-1-liuyuntao12@huawei.com> <58cc1053-7208-4b22-99cb-210fdf700569@app.fastmail.com> <42892794-7668-4eb0-8d2f-c78ca0daf370@huawei.com> <2a90581c-f1df-4d6b-8f0b-8e7cbf150ed9@app.fastmail.com> <346e15e5-49e9-4a7f-b163-c3316225baab@huawei.com> From: "liuyuntao (F)" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemd100004.china.huawei.com (7.185.36.20) On 2024/3/11 17:14, Geert Uytterhoeven wrote: > Hi Yuntao, > > On Sat, Mar 9, 2024 at 2:24 PM liuyuntao (F) wrote: >> On 2024/3/9 16:20, Arnd Bergmann wrote: >>> On Sat, Mar 9, 2024, at 07:14, liuyuntao (F) wrote: >>>> On 2024/3/8 21:15, Arnd Bergmann wrote: >>>>> On Thu, Mar 7, 2024, at 16:12, Yuntao Liu wrote: >>>> >>>> Thanks for the tests, CONFIG_LD_DEAD_CODE_DATA_ELIMINATION and >>>> CONFIG_TRIM_UNUSED_KSYMS do indeed result in a significant improvement. >>>> I found that arm32 still doesn't support CONFIG_LTO_CLANG. I've done >>>> some work on it, but without success. I'd like to learn more about the >>>> CONFIG_LTO_CLANG patch. Do you have any relevant links? >>> >>> I did not try to get it to boot and gave up when I did not see >>> any size improvement. I think there were previous attempts to >>> do it elsewhere, which I did not try to find. >>> >> >> I tested this patch, the size improvement was only about one >> ten-thousandth, and the compilation time had increased by about a quarter, >> and the kernel did not boot. >> >> Strangely, LTO has actually increased the compilation time >> significantly, which seems contrary to its purpose. > > The purpose of LTO is to reduce code size. Doing so requires more > processing, hence the total build time increases. > > Gr{oetje,eeting}s, > > Geert > Thanks, Geert, I got it.