From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 433AB1B1AF for ; Tue, 26 Sep 2017 09:43:29 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2017 00:43:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,440,1500966000"; d="scan'208";a="153375661" Received: from dpdk-lixiaoyun.sh.intel.com ([10.67.111.93]) by orsmga005.jf.intel.com with ESMTP; 26 Sep 2017 00:43:19 -0700 From: Xiaoyun Li To: bruce.richardson@intel.com, konstantin.ananyev@intel.com Cc: wenzhuo.lu@intel.com, helin.zhang@intel.com, dev@dpdk.org, Xiaoyun Li Date: Tue, 26 Sep 2017 15:41:26 +0800 Message-Id: <1506411689-94690-1-git-send-email-xiaoyun.li@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH v3 0/3] dynamic linking support 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: , X-List-Received-Date: Tue, 26 Sep 2017 07:43:30 -0000 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 --- v2 * Use gcc function multi-versioning to avoid compilation issues. * Add macros for AVX512 and AVX2. Only if users enable AVX512 and the compiler supports it, the AVX512 codes would be compiled. Only if the compiler supports AVX2, the AVX2 codes would be compiled. v3 * Reduce function calls via only keep rte_memcpy_xxx. * Add conditions that when copy size is small, use inline code path. Otherwise, use dynamic code path. * To support attribute target, clang version must be greater than 3.7. Otherwise, would choose SSE/AVX code path, the same as before. * Move two mocro functions to the top of the code since they would be used in inline SSE/AVX and dynamic SSE/AVX codes. .../common/include/arch/x86/rte_memcpy.h | 1232 ++++++++++++++++++-- lib/librte_efd/rte_efd_x86.h | 41 +- test/test/test_memcpy_perf.c | 40 +- 3 files changed, 1200 insertions(+), 113 deletions(-) -- 2.7.4