DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: David Marchand <david.marchand@redhat.com>,
	dev@dpdk.org, ktraynor@redhat.com, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 2/2] eal: restrict ctrl threads to startup cpu affinity
Date: Mon, 25 Feb 2019 09:33:59 +0100	[thread overview]
Message-ID: <20190225083359.uzvwejkej3elyqdh@platinum> (raw)
In-Reply-To: <c1f2cf83-94d9-d4f9-2748-592641052a8e@intel.com>

On Wed, Feb 20, 2019 at 04:01:33PM +0000, Burakov, Anatoly wrote:
> On 19-Feb-19 8:41 PM, David Marchand wrote:
> > Spawning the ctrl threads on anything that is not part of the eal
> > coremask is not that polite to the rest of the system, especially
> > when you took good care to pin your processes on cpu resources with
> > tools like taskset (linux) / cpuset (freebsd).
> > 
> > Rather than introduce yet another eal options to control on which cpu
> > those ctrl threads are created, let's take the startup cpu affinity
> > as a reference and remove the eal coremask from it.
> > If no cpu is left, then we default to the master core.
> > 
> > The cpuset is computed once at init before the original cpu affinity
> > is lost.
> > 
> > Introduced a RTE_CPU_AND macro to abstract the differences between linux
> > and freebsd respective macros.
> > 
> > Examples in a 4 cores FreeBSD vm:
> > 
> > $ ./build/app/testpmd -l 2,3 --no-huge --no-pci -m 512 \
> >   -- -i --total-num-mbufs=2048
> > 
> > $ procstat -S 1057
> >    PID    TID COMM                TDNAME              CPU CSID CPU MASK
> >   1057 100131 testpmd             -                     2    1 2
> >   1057 100140 testpmd             eal-intr-thread       1    1 0-1
> >   1057 100141 testpmd             rte_mp_handle         1    1 0-1
> >   1057 100142 testpmd             lcore-slave-3         3    1 3
> > 
> > $ cpuset -l 1,2,3 ./build/app/testpmd -l 2,3 --no-huge --no-pci -m 512 \
> >   -- -i --total-num-mbufs=2048
> > 
> > $ procstat -S 1061
> >    PID    TID COMM                TDNAME              CPU CSID CPU MASK
> >   1061 100131 testpmd             -                     2    2 2
> >   1061 100144 testpmd             eal-intr-thread       1    2 1
> >   1061 100145 testpmd             rte_mp_handle         1    2 1
> >   1061 100147 testpmd             lcore-slave-3         3    2 3
> > 
> > $ cpuset -l 2,3 ./build/app/testpmd -l 2,3 --no-huge --no-pci -m 512 \
> >   -- -i --total-num-mbufs=2048
> > 
> > $ procstat -S 1065
> >    PID    TID COMM                TDNAME              CPU CSID CPU MASK
> >   1065 100131 testpmd             -                     2    2 2
> >   1065 100148 testpmd             eal-intr-thread       2    2 2
> >   1065 100149 testpmd             rte_mp_handle         2    2 2
> >   1065 100150 testpmd             lcore-slave-3         3    2 3
> > 
> > Fixes: d651ee4919cd ("eal: set affinity for control threads")
> > Cc: stable@dpdk.org
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> 
> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>

Reviewed-by: Olivier Matz <olivier.matz@6wind.com>

  reply	other threads:[~2019-02-25  8:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-13 16:13 [dpdk-dev] [PATCH] " David Marchand
2019-02-13 20:21 ` David Marchand
2019-02-14  9:39 ` Burakov, Anatoly
2019-02-14  9:53   ` David Marchand
2019-02-14 10:04     ` Burakov, Anatoly
2019-02-14 10:16       ` David Marchand
2019-02-14 11:05 ` David Marchand
2019-02-14 13:30 ` [dpdk-dev] [PATCH v2 1/2] eal: fix potential incorrect pinning for ctrl threads David Marchand
2019-02-14 13:30   ` [dpdk-dev] [PATCH v2 2/2] eal: restrict ctrl threads to startup cpu affinity David Marchand
2019-02-19 11:38     ` Burakov, Anatoly
2019-02-19 11:51       ` David Marchand
2019-02-19 16:03         ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-02-14 16:12   ` [dpdk-dev] [PATCH v2 1/2] eal: fix potential incorrect pinning for ctrl threads Burakov, Anatoly
2019-02-14 17:45     ` David Marchand
2019-02-19 20:41   ` [dpdk-dev] [PATCH v3 " David Marchand
2019-02-19 20:41     ` [dpdk-dev] [PATCH v3 2/2] eal: restrict ctrl threads to startup cpu affinity David Marchand
2019-02-20 16:01       ` Burakov, Anatoly
2019-02-25  8:33         ` Olivier Matz [this message]
2019-03-07 18:23           ` Thomas Monjalon
2019-02-20 16:01     ` [dpdk-dev] [PATCH v3 1/2] eal: fix potential incorrect pinning for ctrl threads Burakov, Anatoly
2019-02-25  8:33       ` Olivier Matz

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=20190225083359.uzvwejkej3elyqdh@platinum \
    --to=olivier.matz@6wind.com \
    --cc=anatoly.burakov@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ktraynor@redhat.com \
    --cc=stable@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 NNTP newsgroup(s).