From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7365F43B9E; Sun, 3 Mar 2024 06:40:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 178274354E; Sun, 3 Mar 2024 06:40:08 +0100 (CET) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 268D540274 for ; Sun, 3 Mar 2024 06:40:06 +0100 (CET) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6e5a50d91b4so3130215b3a.2 for ; Sat, 02 Mar 2024 21:40:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709444405; x=1710049205; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=6kVbHIMpUy+4QMJOCKynGN1tipmdxZOgj5K+c8CmYfA=; b=YFFvfkpHQRnO4h4PhRs6LuJ2alResw2mx0MZUstY4df7i/shuxJUkp9aYcigLlTDWY U4Pw7tiu8r8vwW+FHe6e3wd6VhaOfURr5hnJqTGOjSJXt4pOXgP5l54lK62xfW3E03zh M6UibyTUI2XKLzul/vyOdY1OYpB8GrdStvdvgu/+ZGePUyfiuT7x127yllptE40Q4WoB K+el8BlH/Jmox7I5AqEIBsI6X3j5K8fazg8f/JTU7IxGMz4UmTqsHyHhzvQkvq6fVTwJ Sw0CmORJGMCofsDr0oqrApAB+2iQkUQwLYY0X5nbVLleVUIfeVxTZlDiUTBRm94Y49pO P9uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709444405; x=1710049205; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6kVbHIMpUy+4QMJOCKynGN1tipmdxZOgj5K+c8CmYfA=; b=ZANffTC0Wz1SLIVib87TheD2p7UjaHE4k91zdQ3nobGuAScyCiWQE/AhgZWdmXCFMJ bxG272pmAJ6g69fUfa9+NfZc9Pnj1/DocCOzbfPxRyEB88s4j+fau5+hZty4lvB89tS+ wm6PlpmH2pJ1BJcFz9OTfytawiAPhtS+Y6ijx2GbSj8fK6sdOnMt2537zFPXinS7J66F ZM68KhrkPKfJDyOgfP3i71cffevWSTzflvgN3VjJS55H+JnZDhHauhzqEQ4vITkgsAjw dihNQhqd607+68mIuCrpk0Iq56loxBbYCEfYh51Dfr+M/mDPd4lpQ359UHEmf/TP+3jQ Rauw== X-Forwarded-Encrypted: i=1; AJvYcCXqJhCP/a2v3rcBuk998/0IbmL7M3HBjMzoUexPDrL6/XRy0iLRMTBOlkb064jZHdeOkTqMFDJfppxlrhY= X-Gm-Message-State: AOJu0YzE5puuY/KVQNMuuofSCWO+tSnj0MTwPnDwPZjork4qqAtZEGL5 ASmbKiUmtR82h5yqPC8ugOtXlj0ow/UXgZgB9hF4dvNETB3Jn1r9eO6ubw20iZU= X-Google-Smtp-Source: AGHT+IFs+4/XV+hgo8Uk36AOtVOJ72kiAy0XanzCsW4TivosFtKFGBnFAtB/QMgrROnjOd2ZzZ1u+w== X-Received: by 2002:a05:6a00:2d02:b0:6e5:9031:9885 with SMTP id fa2-20020a056a002d0200b006e590319885mr8733251pfb.23.1709444404846; Sat, 02 Mar 2024 21:40:04 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id u23-20020aa78497000000b006e5092fb3efsm5212508pfn.159.2024.03.02.21.40.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Mar 2024 21:40:04 -0800 (PST) Date: Sat, 2 Mar 2024 21:40:03 -0800 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: bruce.richardson@intel.com, konstantin.v.ananyev@yandex.ru, mattias.ronnblom@ericsson.com, dev@dpdk.org Subject: Re: [PATCH] eal/x86: improve rte_memcpy const size 16 performance Message-ID: <20240302214003.15c37310@hermes.local> In-Reply-To: <20240302234812.9137-1-mb@smartsharesystems.com> References: <20240302234812.9137-1-mb@smartsharesystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Sun, 3 Mar 2024 00:48:12 +0100 Morten Br=C3=B8rup wrote: > When the rte_memcpy() size is 16, the same 16 bytes are copied twice. > In the case where the size is knownto be 16 at build tine, omit the > duplicate copy. >=20 > Reduced the amount of effectively copy-pasted code by using #ifdef > inside functions instead of outside functions. >=20 > Suggested-by: Stephen Hemminger > Signed-off-by: Morten Br=C3=B8rup > --- Looks good, let me see how it looks in goldbolt vs Gcc. One other issue is that for the non-constant case, rte_memcpy has an excess= ively large inline code footprint. That is one of the reasons Gcc doesn't always inline. For > 128 bytes, it really should be a function.