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 59B44462C5 for ; Wed, 26 Feb 2025 11:56:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DB804029A; Wed, 26 Feb 2025 11:56:47 +0100 (CET) Received: from mail-vk1-f181.google.com (mail-vk1-f181.google.com [209.85.221.181]) by mails.dpdk.org (Postfix) with ESMTP id E07144027C for ; Wed, 26 Feb 2025 11:56:45 +0100 (CET) Received: by mail-vk1-f181.google.com with SMTP id 71dfb90a1353d-5209f22ecfeso1614492e0c.1 for ; Wed, 26 Feb 2025 02:56:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740567405; x=1741172205; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=q4eWFYmyfPCF8z91GXAN0oy7DOuBdrek0wygwGzaPWo=; b=br7gOEcRK7jmUWIUrzuqRuT4nZ6yC0HUld3LCF9XWnnoqCXn+efdVp5yiZ6oIMbvI9 r2ZkP/q1S2Ha2d0H/Af0lzk3om99tUomO+Kc/5vFWetcSKvxxuRm55KszEpLnCLjNwSx ugL9Kstv2VOHVPzckicoDUwsTSTTac8WMeiFPxx/8gzcaTP4ivCo/PQLjdtAyLOAowuw 5ukU0l3+ioJ2WMMuNbuY7N2JBuXefi7FuaMXDBYSUVHXC+Cx/zDVa/kawS2nQRXNnPmM CBggk1SCCGd05Rf25xBG1wRJc/jLMmJhaSCwRHotAN3CuIiw34AiE2egNRy6cuys9kju ORkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740567405; x=1741172205; h=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=q4eWFYmyfPCF8z91GXAN0oy7DOuBdrek0wygwGzaPWo=; b=KQzCOHpUEX2YuwxOznpvRTCLbKW/p2OYTHn9zS1hxxrh4bYau4YgTbBNeF7BEbDBI7 z3W2Kry7mX2AElvfPGvPMV+vInZFFDAAa3HqPZ9zerRAsI+xre7X3d0rM1jNIxuD16Qd ssYZJjWpLIwbIam0mhhH763kY5qZm77iQc3df2SkE7d54hZPKGm+17Q+hTvxhtK2/gq2 tDwRalXwRXighIixhKdqmUc0lVwbibU5FlVPCDL0fyaUgw9pHg1vp74MuVZWPFjDO1vb NeqZ9MTxzdqYUGhSIuW2tL+EbIURLyzBxWJ5bIirSqoVoqPyR45Z3WOXM27vbFvdcmXr m5cg== X-Gm-Message-State: AOJu0YwVcQ7GzTPnz0b9XIO8b35TVaraxjMXMqrGx7URfUjfLuScqbm2 0zfbFULeJ5Dqc3i+/iG6vNiz45tTSz8GLb9mG7NUjojsuzZM0kzqI/9+jXjl3iH4tvLWH8gpinQ PuCZUV2axICoDJIQaW/gns+Hit6c= X-Gm-Gg: ASbGncu66q9Gy4iDSPKzplxBICP9sEkKyT4rsRayOeXKqfhvGOaaey/HZKhI1TU54wt d3+XjD5cI2jw3lrJPDMSuOL5XlserDtV1qbwUoz/FZsBGaiBhIwMXEZfIVUokPaGhbdQUgDFa7c wRqFdyDfg= X-Google-Smtp-Source: AGHT+IHstCpUNGElNZGoVwMectlpLoBkr+kgtKCrPwkdztz0RBsiAheM4p99Kmxwq7kwBKA0pLrBEI+A9s3yqLbTNwY= X-Received: by 2002:a05:6122:4082:b0:520:61ee:c814 with SMTP id 71dfb90a1353d-5224cbb0b81mr1075911e0c.1.1740567405140; Wed, 26 Feb 2025 02:56:45 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Rajesh Kumar Date: Wed, 26 Feb 2025 16:26:33 +0530 X-Gm-Features: AQ5f1JpMsDYY7AYQJo9feCsRJbtBNhpm59LeVu6StxaXcS-RKoi_jiB3IulB0nM Message-ID: Subject: Re: CPU Affinity Not Working in RHEL8 with DPDK 20.05 To: Rashi Agarwal Cc: "users@dpdk.org" Content-Type: multipart/alternative; boundary="000000000000e423a5062f096db3" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --000000000000e423a5062f096db3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Rashi, Please change the argument to rte_eal_init (), in your code, -c 0x2 will always bind it to 1st core . Change it to "-c", "0x30" for pinning core 4 and 5. int dpdk_argc =3D 8; char *dpdk_argv[] =3D { procName, "-c", "0x2", "--no-huge", filePrefix ,"-m","64" , "--log-level=3Deal,8"}; Thanks, *-Rajesh* On Wed, Feb 26, 2025 at 10:25=E2=80=AFAM Rashi Agarwal wrote: > *Hi DPDK Community,* > > I am facing an issue where *CPU affinity is not working as expected in > RHEL8* with DPDK 20.05, while it works fine in RHEL7. > > *Problem Statement:* > > =C2=B7 When running my program with numactl -C4,5 ./testRTE on *RH= EL7*, > the worker threads correctly bind to the assigned cores. > > =C2=B7 However, on *RHEL8*, the worker threads always bind to *cor= e 1*, > ignoring the specified CPU set. > > > > *Environment Details:* > > - *DPDK Version:* 20.05.0 > - *OS:* RHEL8 (Issue) | RHEL7 (Works Fine) > - *CPU Affinity Tool:* numactl -C > > *Sample Program: *Attached > > *Observations:* > > - In *RHEL7*, worker threads correctly bind to cores specified using n= umactl > -C. > - In *RHEL8*, the threads always bind to *core 1*, ignoring the CPU > set. > - Could DPDK be overriding the CPU affinity in RHEL8? > > *Questions:* > > 1. Is there any known change in CPU affinity handling between RHEL7 > and RHEL8 affecting DPDK? > 2. Does DPDK override thread affinity when rte_eal_init() is called? > 3. Is there any workaround or EAL flag to ensure that CPU affinity is > respected? > > Any insights or suggestions would be greatly appreciated. > > Thanks, > > Rashi Agarwal. > --000000000000e423a5062f096db3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Rashi,

Please change= the argument to rte_eal_init (), in your code, -c 0x2 will always bind it = to 1st core . Change it to "-c",=C2=A0 "0x30" for pinni= ng core 4 and 5.

i=
nt dpdk_argc =3D 8; char *dpdk_argv[] =3D { procName, "-c", "=
;0x2", "--no-huge", filePrefix ,"-m","64"=
; , "--log-level=3Deal,8"};

Thanks,
-Rajesh


On Wed, Feb 26, 2025 at 10:25= =E2=80=AFAM Rashi Agarwal <Rashi.Agarwal@mobileum.com> wrote:

Hi DPDK Community,

I am facing an issue where CPU affinity is not working as expected in RHEL8 = with DPDK 20.05, while it works fine in RHEL7.

Problem Statement:

=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=B7=C2=A0 When running my program with numactl -C4,5 ./testRTE on RHEL7, the worker threads correctly bind to the assigned cores.

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=B7=C2=A0 However= , on RHEL8, the worker threads always bind to core 1, ignoring the= specified CPU set.

=C2=A0

Environment Details:

  • DPDK Version: 20.05.0
  • OS: RHEL8 (Issue) | RHEL7 (Works Fine)<= /u>
  • CPU Affinity Tool: n= umactl -C

Sample Program: =C2=A0Attached<= /p>

Observations:

  • In RHEL7, worker threads correctly bind to cores specified usi= ng n= umactl -C.
  • In RHEL8, the threads always bind to core 1, ignoring the CPU set.
  • Could DPDK be overriding the CPU affinity in RHEL8?

Questions:

  1. Is there any known change in CPU affinity handling between RHEL7 and = RHEL8 affecting DPDK?
  2. Does DPDK override thread affinity when r= te_eal_init() is called?
  3. Is there any workaround or EAL flag to ensure that CPU affinity is re= spected?

Any insights or suggestions would be greatly a= ppreciated.

Thanks,

Rashi Agarwal.

--000000000000e423a5062f096db3--