From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 378DFC433B4 for ; Thu, 6 May 2021 12:54:32 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C5D5B610E9 for ; Thu, 6 May 2021 12:54:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5D5B610E9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.123485.232946 (Exim 4.92) (envelope-from ) id 1ledWI-00058k-PV; Thu, 06 May 2021 12:54:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 123485.232946; Thu, 06 May 2021 12:54:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ledWI-00058d-MO; Thu, 06 May 2021 12:54:22 +0000 Received: by outflank-mailman (input) for mailman id 123485; Thu, 06 May 2021 12:54:20 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ledWG-00058U-Rl for xen-devel@lists.xenproject.org; Thu, 06 May 2021 12:54:20 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ledWG-0008MU-0S; Thu, 06 May 2021 12:54:20 +0000 Received: from [54.239.6.186] (helo=a483e7b01a66.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ledWF-0004ra-QI; Thu, 06 May 2021 12:54:19 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=1f8VE+gKWT1fXlZMtDLksPX2illJCsUSfiLEZL/+XNE=; b=wURuQ3NztQECS5UDV9e2mllNeF 2o8abmnlOReTAwkpDzcZy4fgKuQp8us6SL/j1dEiX0Aq6isGH32Bs5POAu6UxguqNGo990RjWhKNm f8LBk3VaWbRSQmb0K8mTtxVKPCvhkvlh4Wc5bxXzd/GePqr75A9qFqoV9cefINJoxL8g=; Subject: Re: [PATCH v4 3/3] unzstd: make helper symbols static To: Jan Beulich Cc: Andrew Cooper , George Dunlap , Ian Jackson , Stefano Stabellini , Wei Liu , "xen-devel@lists.xenproject.org" References: <12054cba-4386-0dbf-46fd-41ace0344f8e@suse.com> <759c8524-cc01-fac8-bc62-0ba6558477bd@suse.com> <1696e5f2-481a-5a7f-258d-b2a0679b041f@suse.com> From: Julien Grall Message-ID: Date: Thu, 6 May 2021 13:54:16 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Hi Jan, On 06/05/2021 07:21, Jan Beulich wrote: > On 05.05.2021 19:35, Julien Grall wrote: >> >> >> On 29/04/2021 14:26, Jan Beulich wrote: >>> On 29.04.2021 13:27, Julien Grall wrote: >>>> On 21/04/2021 11:22, Jan Beulich wrote: >>>>> While for the original library's purposes these functions of course want >>>>> to be externally exposed, we don't need this, and we also don't want >>>>> this both to prevent unintended use and to keep the name space tidy. >>>>> (When functions have no callers at all, wrap them with a suitable >>>>> #ifdef.) This has the added benefit of reducing the resulting binary >>>>> size - while this is all .init code, it's still desirable to not carry >>>>> dead code. >>>> >>>> So I understand the desire to keep the code close to Linux and removing >>>> the dead code. However I am still not convinced that the approach taken >>>> is actually worth the amount of memory saved. >>>> >>>> How much memory are we talking about here? >>> >>> There are no (runtime) memory savings, as is being said by the >>> description. There are savings on the image and symbol table sizes >>> (see below - .*.0/ holding files as produced without the patch >>> applied, while .*.1/ holding output with it in place), the image >>> size reduction part of which is - as also expressed by the >>> description - a nice side effect, but not the main motivation for >>> the change. >> >> Thanks for the providing the information. I have misunderstood your >> original intention. >> >> Reading them again, I have to admit this doesn't really change my view >> here. You are trading a smaller name space or prevent unintended use >> (not clear what would be wrong to call them) to code >> maintenability/readability. > > Well, I mean mainly the usual issue of us, short of having Linux-like > section reference checking, being at risk of calling __init functions > from non-__init code. Right, we are rely on the review to not mix the tow. In the past, I have successfully used the Linux script on Xen binary. It might be a good idea to import a cut-down version in Xen. Cheers, -- Julien Grall