From: 吴剑跃 <wujianyue000@163.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re:Re: [PATCH] eal/linux: enhanced error handling for affinity
Date: Thu, 25 Apr 2024 09:08:59 +0800 (CST) [thread overview]
Message-ID: <3e9a9498.1535.18f12cc71dd.Coremail.wujianyue000@163.com> (raw)
In-Reply-To: <20240424085021.11f2ff96@hermes.local>
[-- Attachment #1: Type: text/plain, Size: 1638 bytes --]
Hello, Stephen,
Good day
The issue is not caused by DPDK itself, but arises when the DPDK worker process 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.
Finding the detailed reason for the failure was challenging, so I added extra 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 occur, facilitating quicker troubleshooting. I agree that this introduces more code and could be seen as platform-specific. Perhaps we could implement this conditionally, only for platforms where such detailed logging is supported and useful.
At 2024-04-24 23:50:21, "Stephen Hemminger" <stephen@networkplumber.org> wrote:
>On Tue, 23 Apr 2024 11:02:43 +0800
>Jianyue Wu <wujianyue000@163.com> wrote:
>
>> Improve the robustness of setting thread affinity in DPDK
>> by adding detailed error logging.
>
>Is this an error you saw in your application or something inside DPDK?
>
>> Changes:
>> 1. Check the return value of pthread_setaffinity_np() and log an error
>> if the call fails.
>
>Not sure this is necessary. The rte_thread functions are intended to
>be os independent wrapper for threads. Does it need to be this chatty.
>
>> 2. Include the current thread name, the intended CPU set, and a detailed
>> error message in the log.
>
>This introduces a more code and ends up being Linux/BSD specific only
>for the case where application did something wrong.
[-- Attachment #2: Type: text/html, Size: 2633 bytes --]
next prev parent reply other threads:[~2024-04-25 8:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 3:02 Jianyue Wu
2024-04-24 15:50 ` Stephen Hemminger
2024-04-25 1:08 ` 吴剑跃 [this message]
2024-04-25 5:40 ` 吴剑跃
2024-04-25 15:04 ` Stephen Hemminger
2024-04-26 3:14 ` Jianyue Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e9a9498.1535.18f12cc71dd.Coremail.wujianyue000@163.com \
--to=wujianyue000@163.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).