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 5360643F05; Thu, 25 Apr 2024 17:04:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C1260402EE; Thu, 25 Apr 2024 17:04:50 +0200 (CEST) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id 8496440284 for ; Thu, 25 Apr 2024 17:04:49 +0200 (CEST) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1eac92f7c74so5026205ad.3 for ; Thu, 25 Apr 2024 08:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714057488; x=1714662288; 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=bcd3i2hEd7+tdjvj3YhpC+6nTs38kB29xtCOQZUczmQ=; b=am/574npedV2ApaDlcdfruhv2+gKeHMPbp7tQzPV2CtZxsvH3cJ2v62qD1cRHR9WL6 0M3MOO4uWqdcSowB0qRrRxvgR3J39ecmJFzdzoe7uDiZpNMxWluOLo0tsMaWH1ymX3cJ vqJog+2OuP0QytC+hFOxInqHzrPcIlPIpGCMXhbHImxykJHKOzZ5iXa+1fd/fmtrl1Rh +tGVzZKsU4UdbXPn3EXtzpgZwma8ayjSKtznjDZdNLNIsmd3FuslQBOYMCVpbE/gfqLj TVslXRYO7OqzWTEvEbH18qVukrzOTq4LS6AzEx/B94AqbmBiUSyNONNRFcLefa53+uoi 7KeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714057488; x=1714662288; 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=bcd3i2hEd7+tdjvj3YhpC+6nTs38kB29xtCOQZUczmQ=; b=Zv1HLmoLHHTuJxWw94GLDbgFjPLkRjiE5ofB0Hy9zJ/qPu0X7igksfT2TWoxWIIx5y MsUC/fRlPqGkG5294HK6gbM0MQ0nqmIcb8rGEQVh0Qacn/9eXw7u/RBKE241qwofdv6i wQFARWMprTyssHCrrfLF3u8xuB9OfPwAurJSWhvc1h+a4CiJO2/a7u9/KtomqG9QEEAn dfAxDEanjYvs8qiSfHAZ7R07HxtOleNHy8s13MKXVzPFfwrQFgJShF3ag+u0UQHW8mIl xebty7uneUJIdNySisFO/e2CeflxvbGzmBqb0WrUWclq68jRWlTNcLBxGqo5aj623HMc z4Ig== X-Gm-Message-State: AOJu0YxVWSJwAEdAkuEHj+eH4N3vLYkWNHMHorRiKKFH+kgcedBWKDJ1 NmonvJfv3XaALRefvR6M2ZTe4MsshmaXVorgtMN2MksEOrlQDDqDSkxY3JRylSY= X-Google-Smtp-Source: AGHT+IHktImIsfk19zOLO3jLmQBe5NEAopQL6RqEG05AJ0krpm9ZOif/Ga6FpVwhEJcF4QIou7zkSA== X-Received: by 2002:a17:902:b498:b0:1e2:a166:b5b0 with SMTP id y24-20020a170902b49800b001e2a166b5b0mr5602897plr.64.1714057488408; Thu, 25 Apr 2024 08:04:48 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id jb11-20020a170903258b00b001e249903b0fsm13887100plb.256.2024.04.25.08.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 08:04:48 -0700 (PDT) Date: Thu, 25 Apr 2024 08:04:46 -0700 From: Stephen Hemminger To: =?UTF-8?B?5ZC05YmR6LeD?= Cc: "dev@dpdk.org" Subject: Re: [PATCH] eal/linux: enhanced error handling for affinity Message-ID: <20240425080446.4443fe24@hermes.local> In-Reply-To: <5def5f15.73a1.18f13c4e490.Coremail.wujianyue000@163.com> References: <20240423030243.59895-1-wujianyue000@163.com> <20240424085021.11f2ff96@hermes.local> <3e9a9498.1535.18f12cc71dd.Coremail.wujianyue000@163.com> <5def5f15.73a1.18f13c4e490.Coremail.wujianyue000@163.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 Thu, 25 Apr 2024 13:40:21 +0800 (CST) =E5=90=B4=E5=89=91=E8=B7=83 wrote: > After reviewing the code, I believe that the combination of the __linux__= and _GNU_SOURCE macros effectively confirms whether the pthread_getname_np= () API can be utilized. I will proceed with adding them. Thank you~ > #if defined(__linux__) && defined(_GNU_SOURCE) >=20 >=20 > =E5=9C=A8 2024-04-25 09:08:59=EF=BC=8C"=E5=90=B4=E5=89=91=E8=B7=83" =E5=86=99=E9=81=93=EF=BC=9A >=20 > Hello, Stephen, >=20 >=20 >=20 > Good day > The issue is not caused by DPDK itself, but arises when the DPDK worker p= rocess attempts to set affinity to a cpuset that exceeds the limits set by = the cgroup cpuset settings. > Original error prints are: > PANIC in rte_eal_init(): > Cannot set affinity > # Callstacks. >=20 >=20 > Finding the detailed reason for the failure was challenging, so I added e= xtra print statements to help diagnose the issue. > I understand your concern about maintaining OS independence with the rte_= thread functions. This change aims to provide more context when errors occu= r, facilitating quicker troubleshooting. I agree that this introduces more = code and could be seen as platform-specific. Perhaps we could implement thi= s conditionally, only for platforms where such detailed logging is supporte= d and useful. >=20 My point is that just giving the kernel error should be sufficient, rather = than having to reformat the incoming arguments. The arguments are coming from the comma= nd line, and what I would do is look at the error and the command line arguments to the applica= tion, as well as any kernel logs.