DPDK-dev Archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Subject: Re: [RFC] eal: make lcore_init aware of cgroup
Date: Mon, 29 Apr 2024 17:49:57 -0700	[thread overview]
Message-ID: <20240429174957.2d218da6@hermes.local> (raw)
In-Reply-To: <20240429195342.42711-1-stephen@networkplumber.org>

On Mon, 29 Apr 2024 12:52:25 -0700
Stephen Hemminger <stephen@networkplumber.org> wrote:

> Some lcores maybe restricted from being used by DPDK by cgroups.
> This should be detected at startup and only those cpu's allowed
> to be used by the process should be marked as enabled.
> 
> This is a lightly tested patch, and parsing the cpuset info here
> probably needs more checking. It is a response to the problem
> reported with error handling.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

This won't work right because Cpus_allowed reflects the state of the
current affinity mask, which might be reduced for the case of process
spawned by another. It shows up as test failure for when EAL main thread
(with affinity to cpu 0) spawns another process as a test. The test
inherits the affinity of 0 and cpus_allowed is 1 (vs all cpus ff).

Need to find a better way to read the cgroup allowed cpus list
for case where process is running with restricted cpus.

      reply	other threads:[~2024-04-30  0:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 19:52 [RFC] eal: make lcore_init aware of cgroup Stephen Hemminger
2024-04-30  0:49 ` Stephen Hemminger [this message]

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=20240429174957.2d218da6@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.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 read-only IMAP folder(s) and NNTP newsgroup(s).