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 D200D455CE; Tue, 9 Jul 2024 06:48:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C285642D83; Tue, 9 Jul 2024 06:48:26 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id E4D6E427DA for ; Tue, 9 Jul 2024 06:48:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720500505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sttc51MkerBFV2lw5nXAH2xB9wSZ5ixZKBjmQJxrZB0=; b=RIVwa7J9M11HOZkjQds69OMg3Lj+XZqOjXj3uLvaO/COMygWBAT+HBWQwCA0wQt2+18Uee TnOdk9ENh04WIa26U0nBecm9Bq4re6VN9EvDyrdLSm0aQUpI8gyRndrTBgAWJIhvU4SPPT vpHwsTYocOk3gtOiTsZlXN7+aThqHQs= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-618-3fZdDlcIPiqozlCypR2DhA-1; Tue, 09 Jul 2024 00:48:24 -0400 X-MC-Unique: 3fZdDlcIPiqozlCypR2DhA-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2ee8a745746so46878511fa.3 for ; Mon, 08 Jul 2024 21:48:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720500502; x=1721105302; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Sttc51MkerBFV2lw5nXAH2xB9wSZ5ixZKBjmQJxrZB0=; b=NVjfKTdmG0DBtyZUsPqub0NGA6zOCwRrKiZ3zTf3iDHc/9NnBI581DyqpqxG4XXZnt uNs4vPKpdjlxU7fotUvpNqJSQ86+ab9uFY54VD7MExq8OqVlXfvoXkzojITMBB9JSg5l zpc4igJargWSOmay+GeLqnJ9YHWR9TxFR512I9yKJ0fY2kme5gcCZSu2v7pXfAuI+Akn 1UaM9mt9cXAyCkqhooXgiOUxTpul4GBRQL87ZntSVvqOT/Jcroh/wcz99d1jgrQPxrjB 8HwFEbfczySwGPhTiPKNMg76Opz/MMr5YdnZzkEtk0eJAZabgejm9SWuqJa0fyHce9Hz PUEA== X-Gm-Message-State: AOJu0Ywxd7jtMeaWlHmjf27sEuEs4DOqnFo6QBEKHElOIuC13vne1vpq lxww+RzqSu58rasLp9s6CDEADOBmWD8u5KZRZ0ThXNg+5q1dXBekGmkGtaKelIXU/w6az0Mn3MY GZ0eS7VWQCfEpJPHX4Y1+cyeViVVsEgzjz6GXOLL2Y9p2iRubK4vDY5xzZtI5c8tq9XUjwmYWjf N0JVevsF5w53pTKxk= X-Received: by 2002:a2e:904e:0:b0:2ec:5172:dbc4 with SMTP id 38308e7fff4ca-2eeb30dc4e6mr8010411fa.12.1720500502617; Mon, 08 Jul 2024 21:48:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHi4CpqVVA9d9OIqAZqmF49WajZnpKm/jVUTv2sItlAmPZe/YVox84BZB69N/GL2f79l9qMMlHlQp4Kf9NKsqQ= X-Received: by 2002:a2e:904e:0:b0:2ec:5172:dbc4 with SMTP id 38308e7fff4ca-2eeb30dc4e6mr8010311fa.12.1720500502219; Mon, 08 Jul 2024 21:48:22 -0700 (PDT) MIME-Version: 1.0 References: <20231020165159.1649282-1-yoan.picchi@arm.com> <20240708121411.885996-1-yoan.picchi@arm.com> In-Reply-To: <20240708121411.885996-1-yoan.picchi@arm.com> From: David Marchand Date: Tue, 9 Jul 2024 06:48:10 +0200 Message-ID: Subject: Re: [PATCH v12 0/7] hash: add SVE support for bulk key lookup To: Yoan Picchi Cc: dev@dpdk.org, nd@arm.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 Mon, Jul 8, 2024 at 2:14=E2=80=AFPM Yoan Picchi wr= ote: > > This patchset adds SVE support for the signature comparison in the cuckoo > hash lookup and improves the existing NEON implementation. These > optimizations required changes to the data format and signature of the > relevant functions to support dense hitmasks (no padding) and having the > primary and secondary hitmasks interleaved instead of being in their own > array each. > > Benchmarking the cuckoo hash perf test, I observed this effect on speed: > There are no significant changes on Intel (ran on Sapphire Rapids) > Neon is up to 7-10% faster (ran on ampere altra) > 128b SVE is about 3-5% slower than the optimized neon (ran on a gravito= n > 3 cloud instance) > 256b SVE is about 0-3% slower than the optimized neon (ran on a gravito= n > 3 cloud instance) > > V2->V3: > Remove a redundant if in the test > Change a couple int to uint16_t in compare_signatures_dense > Several codding-style fix > > V3->V4: > Rebase > > V4->V5: > Commit message > > V5->V6: > Move the arch-specific code into new arch-specific files > Isolate the data struture refactor from adding SVE > > V6->V7: > Commit message > Moved RTE_HASH_COMPARE_SVE to the last commit of the chain > > V7->V8: > Commit message > Typos and missing spaces > > V8->V9: > Use __rte_unused instead of (void) > Fix an indentation mistake > > V9->V10: > Fix more formating and indentation > Move the new compare signature file directly in hash instead of being > in a new subdir > Re-order includes > Remove duplicated static check > Move rte_hash_sig_compare_function's definition into a private header > > V10->V11: > Split the "pack the hitmask" commit into four commits: > Move the compare function enum out of the ABI > Move the compare function implementations into arch-specific files > Add a missing check on RTE_HASH_BUCKET_ENTRIES in case we change it > in the future > Implement the dense hitmask > Add missing header guards > Move compare function enum into cuckoo_hash.c instead of its own header= . > > V11->V12: > Change the name of the compare function file (remove the _pvt suffix) > > Yoan Picchi (7): > hash: make compare signature function enum private > hash: split compare signature into arch-specific files > hash: add a check on hash entry max size > hash: pack the hitmask for hash in bulk lookup > hash: optimize compare signature for NEON > test/hash: check bulk lookup of keys after collision > hash: add SVE support for bulk key lookup > > .mailmap | 2 + > app/test/test_hash.c | 99 +++++++++--- > lib/hash/compare_signatures_arm.h | 121 +++++++++++++++ > lib/hash/compare_signatures_generic.h | 40 +++++ > lib/hash/compare_signatures_x86.h | 55 +++++++ > lib/hash/rte_cuckoo_hash.c | 207 ++++++++++++++------------ > lib/hash/rte_cuckoo_hash.h | 10 +- > 7 files changed, 410 insertions(+), 124 deletions(-) > create mode 100644 lib/hash/compare_signatures_arm.h > create mode 100644 lib/hash/compare_signatures_generic.h > create mode 100644 lib/hash/compare_signatures_x86.h I added RN updates, reformated commitlogs, fixed header guards and removed some pvt leftover. Series applied, thanks. --=20 David Marchand