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 1DA1AA04DB; Thu, 15 Oct 2020 11:21:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F0ACD1DD71; Thu, 15 Oct 2020 11:21:13 +0200 (CEST) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by dpdk.org (Postfix) with ESMTP id 94DBD1D72D for ; Thu, 15 Oct 2020 11:21:12 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 033D15800EC; Thu, 15 Oct 2020 05:21:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 15 Oct 2020 05:21:11 -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=fm2; bh= 1pp7FamA9gakEx3rk2tEJXEpacKV6BYpHHzDuG4Y0vs=; b=tBHrQ+vORa7y1wzu 2nXD99ouPaac+JBJqFo1Q0c2v1zqVowmkqeuelvuKaaGQ8wf2mVEOCC98+nr24+R G0+ywQwYW/9kpH/nE4D8GUjWQ4+x/1tZihHfsnQI84GXhWyiypRs4YKjI6xcl5l+ Eq0cKAcXXS0DC+FL6L01BKLIo1/4E7mMwbSiFbhwXp+yY9Rk5cWXJ0DkDy1vqsle AmSm26BBUV/HLKyTpe/HV2Nyd4bWVARag5lnxGYJkaAIWe3It3AOiC8n1NVWfcln NqTcc2wJIk+Hp2zL5shJGsrqnuIFMUnbu0k4DSdD59QoN4U9whhkYStnXainvqgx unv1KQ== 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=1pp7FamA9gakEx3rk2tEJXEpacKV6BYpHHzDuG4Y0 vs=; b=kh4CPjIm48Lu7vbrS2sp2DniLuKCdKLdIGPK8q3p+09wcWYprswpn0IFP C8ya+MZHDifD4kzeSrh5wmgouia7Tx75sEIr+KUqbsdKuAtVLOeMpbWzHrhgn/Kw bg8OSuuPAeOJDGVsVWEicB8lm8ST7v3L1CsJj779R9gth8J/iWTAGlRw3LsNRCmN D0idpMgfrUNWXTr3DK+kDYQZv+rCry6OS2g+dHqym2XNWBP8uL+b19uNrRaT6Ol/ Ijvlvf4Gg+bsJKBVQpvhWOj4jq+gz2dSG4qBYX0l6PvkrYnA5UcKdtRfEXiH5Joe Vl53BLn+l/w2rDBRyaEOH2g0XEhEg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrieefgdduhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpeekteehtdeivefhieegjeelgedufeejheekkeetueevieeuvdevuedt jeevheevteenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth 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 28E843280064; Thu, 15 Oct 2020 05:21:09 -0400 (EDT) From: Thomas Monjalon To: Honnappa Nagarahalli , "Liu, Yong" Cc: "Richardson, Bruce" , "stephen@networkplumber.org" , "dev@dpdk.org" , "david.marchand@redhat.com" , "Yigit, Ferruh" , "maxime.coquelin@redhat.com" , David Christensen , Ruifeng Wang , nd Date: Thu, 15 Oct 2020 11:21:07 +0200 Message-ID: <3677226.MZCibFMyqQ@thomas> In-Reply-To: <20b8cb3f50b241bfb4e5381b2090a150@intel.com> References: <20200922082135.62240-1-yong.liu@intel.com> <20b8cb3f50b241bfb4e5381b2090a150@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2] config: enable packet data prefetch 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" 15/10/2020 10:23, Liu, Yong: > From: Honnappa Nagarahalli > > > > 23/09/2020 03:51, Marvin Liu: > > > > > Data prefetch instruction can preload data into cpu=E2=80=99s hie= rarchical > > > > > cache before data access. Virtualized data paths like virtio > > > > > utilized this feature for acceleration. Since most modern cpus ha= ve > > > > > support prefetch function, we can enable packet data prefetch as > > default. > > > > > > > > > > Signed-off-by: Marvin Liu > > > > > --- > > > > > +#define RTE_PMD_PACKET_PREFETCH 1 > > > > > > > > We could also remove the related #ifdefs. > > > > > > > > What can be the drawback of always enable those prefetches? > > > > > > > > > > Hi Thomas, > > > I think the potential drawback is that current prefetch location cann= ot > > > guarantee the best performance across different platforms. > > Then, does it make sense to enable this by default? > >=20 >=20 > Now most of prefetch actions are placed after pointer of data is valid. = I think this methodology can benefit all platforms. > It's hard to say that it=E2=80=99s the best choice for all. But no more b= etter solution in my mind.=20 > At least, we need to allow user to enable packet data prefetch. In my opinion, it can be tested and measured. > > > Each developer has tuned the performance by adding prefetch instructi= on > > > and verified the result on himself platform. > > > So prefetch location is based on certain platform, also it will be ha= rd for > > > developer to compare the results across platforms. If it shows benefit on an architecture, then it should be enabled with #ifdef RTE_ARCH_XX I am for removing the option RTE_PMD_PACKET_PREFETCH.