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 BE33D4596E; Thu, 12 Sep 2024 15:09:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7ADA440265; Thu, 12 Sep 2024 15:09:52 +0200 (CEST) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by mails.dpdk.org (Postfix) with ESMTP id 128E240144 for ; Thu, 12 Sep 2024 15:09:51 +0200 (CEST) Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-4585e250f9dso5308301cf.1 for ; Thu, 12 Sep 2024 06:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726146590; x=1726751390; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4nsFF6oIm914SGq4wpkIcrCNE9A5hDhommnIk2UQ9Pc=; b=eS7u+RyLraBiOM+YEPD7XcoI6N6yhJID4oxRIb8ytLf/OXxJBl20rpxnsjphUhJ7FC gy/nFMRsgVh+i3X4HfJfmoxTS0rE2r1ZPUTGPVXr5WTi5FsGSPABykGsnafsK3pRreuQ TsxlT3Ye5DM++QTGZTy8XwOIWk0DwSgOKxItsBw/HeNJcLB2gC0dhHveIkKu4PXszeqk 1EhSAlgO07Sua7fa4ivhVIOwRsU5boJPus2MkHNCSt1qEMCk7q3wl3MS6aPqnWnfni3r Re6uLSp8PB0j9fjrNnm6CB9E5ZfnwhsgrT4PBBh/Z4WmtyXXn8RgPf18UJA6cab6SB7e ks5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726146590; x=1726751390; 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=4nsFF6oIm914SGq4wpkIcrCNE9A5hDhommnIk2UQ9Pc=; b=Fo32JJ2N84IPbxx1HqkXDKlRVbHgSeXkYZ5Vo9DWSQ7BQ0LwEFJX4HfcokrUfLmH1l 4dLkWvCx7CS6JWEzxjqujcTILVl2FCwSupS4/CTYHCT0VqSvbrtXFlJY1wKKWOL2XLfr inLhjskml69H2rDiNg+FOCvIhUa3aZ+RsSpQBolC2F64RtOAO32Hhocc8bXgJkmRWqnY pBYaBues22lvD+7tTb3rNIhIPVP+/JNUuaB5RfrUHiw2Y4fMKtoMb13GLoXVbSE+A8W9 2yH72JKjVobHNsM/UAKzzp8Dd7P9xCT+rMGPvgiGJatc6IEJB2r1g/1amoCT8k/35gm3 jBKg== X-Gm-Message-State: AOJu0YyVLDlt9Q5PPVRN3B6tx3dUwh+Sx1E/dJo1XdGqxH0IClAU3IKc y760WMVddQH3LIiqvW1Dvj6aQ1ZhhqECzT4bhS3d6UjlmhUm8ABR5y/QWnm23PrkCtEHc+1ZvR0 Y3u3A2NohK7elC0FMlYddQPc66Pc= X-Google-Smtp-Source: AGHT+IFnJ2yu/SI7dqHUZEiIqr5zoLzIcoJE1EmXkMSbY0Z8h0SOpF0yjVpbZZsrS2y/xjNzzgOmhJkzkfU7Mp4qtDY= X-Received: by 2002:a05:622a:1b90:b0:458:3cc4:74fb with SMTP id d75a77b69052e-458603da6c4mr38484031cf.37.1726146590215; Thu, 12 Sep 2024 06:09:50 -0700 (PDT) MIME-Version: 1.0 References: <20240911170430.701685-2-mattias.ronnblom@ericsson.com> <20240912084429.703405-1-mattias.ronnblom@ericsson.com> <20240912084429.703405-4-mattias.ronnblom@ericsson.com> In-Reply-To: <20240912084429.703405-4-mattias.ronnblom@ericsson.com> From: Jerin Jacob Date: Thu, 12 Sep 2024 18:39:23 +0530 Message-ID: Subject: Re: [PATCH v3 3/7] eal: add lcore variable performance test To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: dev@dpdk.org, hofors@lysator.liu.se, =?UTF-8?Q?Morten_Br=C3=B8rup?= , Stephen Hemminger , Konstantin Ananyev , David Marchand , Jerin Jacob 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 Thu, Sep 12, 2024 at 2:34=E2=80=AFPM Mattias R=C3=B6nnblom wrote: > > Add basic micro benchmark for lcore variables, in an attempt to assure > that the overhead isn't significantly greater than alternative > approaches, in scenarios where the benefits aren't expected to show up > (i.e., when plenty of cache is available compared to the working set > size of the per-lcore data). > > Signed-off-by: Mattias R=C3=B6nnblom > --- > app/test/meson.build | 1 + > app/test/test_lcore_var_perf.c | 160 +++++++++++++++++++++++++++++++++ > 2 files changed, 161 insertions(+) > create mode 100644 app/test/test_lcore_var_perf.c > +static double > +benchmark_access_method(void (*init_fun)(void), void (*update_fun)(void)= ) > +{ > + uint64_t i; > + uint64_t start; > + uint64_t end; > + double latency; > + > + init_fun(); > + > + start =3D rte_get_timer_cycles(); > + > + for (i =3D 0; i < ITERATIONS; i++) > + update_fun(); > + > + end =3D rte_get_timer_cycles(); Use precise variant. rte_rdtsc_precise() or so to be accurate