DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pierre <pierre@emutex.com>
To: dev@dpdk.org
Subject: Re: [dpdk-dev] dev Digest, Vol 159, Issue 119
Date: Fri, 1 Sep 2017 10:36:17 +0100	[thread overview]
Message-ID: <ba6cf0c0-b097-1b77-9c18-c9a6ae2431c0@emutex.com> (raw)
In-Reply-To: <mailman.4135.1504256282.5771.dev@dpdk.org>

Hi

This might not be a good idea. With these modifications, the functions 
are not inlined any more (attribute inline), and not post-optimized 
either (-f lto)

As per ABI, most of the registers must be saved on the stack before 
invoking a function. This is not noticeable in isolated test/perf code 
where there is not much context to save and restore at each function 
call, but it destroys performance in real heavy application where it is 
expected, for performance reasons, that rte_memcpy is really an inlined 
leaf function and all code can be inlined and optimized at compile time.

The DPDK design logic has always been in the past to provide the most 
efficient implementation for a designated target platform. Else there 
would not be no advantage to provide rte_memcpy() over the standard 
generic memcpy() function.

Such type of code is slowly starting to creep into DPDK codebase. an 
other example is the support for dynamic callbacks in rte_eth_tx_burst().

If multi-platform MUST be supported at run time, the right trade-off 
would be to make-sure this type of code can be compiled out, e.g. add 
something like RTE_ENABLE_RUN_TIME_DISPATCH in the config file.

Regards,

Pierre


On 01/09/17 09:58, dev-request@dpdk.org wrote:
> Send dev mailing list submissions to
> 	dev@dpdk.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://dpdk.org/ml/listinfo/dev
> or, via email, send a message with subject or body 'help' to
> 	dev-request@dpdk.org
>
> You can reach the person managing the list at
> 	dev-owner@dpdk.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of dev digest..."
>
>
> Today's Topics:
>
>     1. [PATCH v2 0/3] dynamic linking support (Xiaoyun Li)
>     2. [PATCH v2 1/3] eal/x86: run-time dispatch over memcpy (Xiaoyun Li)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri,  1 Sep 2017 16:56:59 +0800
> From: Xiaoyun Li <xiaoyun.li@intel.com>
> To: bruce.richardson@intel.com
> Cc: dev@dpdk.org, zhihong.wang@intel.com, qi.z.zhang@intel.com,
> 	wenzhuo.lu@intel.com, Xiaoyun Li <xiaoyun.li@intel.com>
> Subject: [dpdk-dev] [PATCH v2 0/3] dynamic linking support
> Message-ID: <1504256222-32969-1-git-send-email-xiaoyun.li@intel.com>
>
> This patchset dynamically selects functions at run-time based on CPU flags
> that current machine supports. This patchset modifies mempcy, memcpy perf
> test and x86 EFD, using function pointers and bind them at constructor time.
> Then in the cloud environment, users can compiler once for the minimum target
> such as 'haswell'(not 'native') and run on different platforms (equal or above
> haswell) and can get ISA optimization based on running CPU.
>
> Xiaoyun Li (3):
>    eal/x86: run-time dispatch over memcpy
>    app/test: run-time dispatch over memcpy perf test
>    efd: run-time dispatch over x86 EFD functions
>
>   .../common/include/arch/x86/rte_memcpy.h           | 343 +++++++++++++--------
>   lib/librte_efd/rte_efd_x86.h                       |  41 ++-
>   mk/rte.cpuflags.mk                                 |  14 +
>   test/test/test_memcpy_perf.c                       |  40 ++-
>   4 files changed, 296 insertions(+), 142 deletions(-)
>

       reply	other threads:[~2017-09-01  9:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4135.1504256282.5771.dev@dpdk.org>
2017-09-01  9:36 ` Pierre [this message]
2017-09-01  9:48   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba6cf0c0-b097-1b77-9c18-c9a6ae2431c0@emutex.com \
    --to=pierre@emutex.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).