From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 07DD2A009E for ; Sun, 27 Oct 2019 12:47:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 344421BEBE; Sun, 27 Oct 2019 12:47:49 +0100 (CET) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id 4D01E1B203 for ; Sun, 27 Oct 2019 12:47:48 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id DCD0A754E; Sun, 27 Oct 2019 07:47:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 27 Oct 2019 07:47:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=fAaTZG2L8BydNc2YpfK7q6BJ9K0dXw/0ANR2US6EHlo=; b=gKV2ay0EhfJC TV5x1NlfgtDnx6+hFlvPJ/EJu3Lb59MGmR2YAUa6l3oXvmPfF7b6/zX8HVH0+vKA FZeaV0tPFD6WxztgLMnPPRQe0ncPKcambsC6oirpnJmkAjo1tJC4M9rIgmog4HBN +khj6+aE2wqakIiDQG4buBk2BTDeuVM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=fAaTZG2L8BydNc2YpfK7q6BJ9K0dXw/0ANR2US6EH lo=; b=dUXz/AubD0c4i9TF10dzFgxgW6umnMWiwIbqgEtpDgDYq4A0whzE5ZKve 93hMfhXYEMrJN0fInS8wOdy2dNdYIHYWRISR+wa7PsMpoOd6nVDSBit32ukpRdP/ CDtbyFTpkQO6jNmhnO3/CAzWDnA+QgTlCBXU8F8FigdWnXWgTMU3nmAjzBJksmGt KpXQVZOdO0L8STrS068tQ0K6C3Yy2s97pZT2gLahclmN7vZn6YWIv1axt3LkNP8x gvP3K5z/MDmtqI4BHbzEXCbzK4OAKlKTfx1RDIPjhLXi94ABzSw6O12IrHSghrLN rBuMSNYiGY8/YkmLihn1zhg92nQjQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrleejgdefhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 875FD8005C; Sun, 27 Oct 2019 07:47:45 -0400 (EDT) From: Thomas Monjalon To: Andrzej Ostruszka Cc: dev@dpdk.org, Aaron Conole , Michael Santana , John McNamara , Marko Kovacevic , David Hunt , Bruce Richardson , Vladimir Medvedkin , Robert Sanford , Erik Gabriel Carrillo , mattias.ronnblom@ericsson.com, stephen@networkplumber.org, john.mcnamara@intel.com, marko.kovacevic@intel.com Date: Sun, 27 Oct 2019 12:47:44 +0100 Message-ID: <12578231.CQkhPFEoQU@xps> In-Reply-To: <20191022115412.8837-2-aostruszka@marvell.com> References: <20190917075754.8310-1-amo@semihalf.com> <20191022115412.8837-1-aostruszka@marvell.com> <20191022115412.8837-2-aostruszka@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 01/10] build: add an option to enable LTO build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Adding John and Marko for doc review. 22/10/2019 13:54, Andrzej Ostruszka: > --- /dev/null > +++ b/doc/guides/prog_guide/lto.rst This new file is not included in the prog guide index. > @@ -0,0 +1,36 @@ You are missing the mandatory SPDX and Copyright header. > +Link Time Optimization > +====================== > + > +The DPDK framework supports compilation with link time optimization Instead of "The DPDK framework", I prefer just "DPDK". > +turned on. This depends obviously on the capabilities of the compiler Not sure what you are talking about. If it is about fat objects, it is not obvious. > +to do "whole program" optimization at link time and is available only > +for compilers that support that feature (gcc and icc). To be more Please start a new sentence at the beginning of a line in the RsT file. It is easier to review and update. > +specific compiler have to support creation of ELF objects containing A comma is missing after "specific". > +both normal code and internal representation (fat-lto-objects). This is > +required since during build some code is generated by parsing produced > +ELF objects (pmdinfogen). > + > +The amount of performance gain that one can get from LTO depends on the > +compiler and the code that is being compiled. However LTO is also > +useful for additional code analysis done by the compiler. In particular > +due to interprocedural analysis compiler can produce additional warnings > +about variables that might be used uninitialized. Some of these > +warnings might be "false positives" though and you might need to > +explicitly initialize variable in order to silence the compiler. Any word about build speed degradation? > + > +Link time optimization can be enabled for whole DPDK framework by > +setting: > + > +.. code-block:: console > + CONFIG_ENABLE_LTO=y > + > +in config file for the case of make based build and by: > + > +.. code-block:: console > + meson build -Db_lto=true > + ninja -C build No need to add the ninja step here. > +for the case of meson based build. Better to describe the case (make or meson) before the code-block. > +Please note that turning LTO on causes considerable extension of > +compilation time. "compilation time" is not accurate. When referring to compilation + linking, it is better to use the words "build time". > --- a/doc/guides/rel_notes/release_19_11.rst > +++ b/doc/guides/rel_notes/release_19_11.rst > @@ -56,6 +56,14 @@ New Features > Also, make sure to start the actual text at the margin. > ========================================================= > > +**Added build support for Link Time Optimization.** > + > + LTO is an optimization technique used by the compiler to perform whole > + program analysis and optimization at link time. In order to do that > + compilers store their internal representation of the source code that > + the linker uses at the final stage of compilation process. > + > + See :doc:`../prog_guide/lto` for more information: Please rebase and add a blank line when adding a paragraph. > > Removed Items > ------------- > --- a/lib/librte_distributor/rte_distributor.c > +++ b/lib/librte_distributor/rte_distributor.c > -void > +void __vsym I replied in v2 about this change. Better to not talk about it here. I wanted to merge this series in 19.11-rc1 but I think it is better to move its merge in 19.11-rc2. Thanks for the work.