[PATCH] eal/windows: set Windows main lcore affinitization
Tyler Retzlaff
roretzla at linux.microsoft.com
Tue Apr 12 18:30:13 CEST 2022
On Thu, Apr 07, 2022 at 03:14:33PM +0200, David Marchand wrote:
> Hello Tyler,
>
> On Wed, Mar 30, 2022 at 11:00 AM Tyler Retzlaff
> <roretzla at linux.microsoft.com> wrote:
> >
> > add missing code to affinitize main_lcore from lcore configuration.
>
> Nit: Add*
>
> >
> > Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> > ---
> > lib/eal/windows/eal.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c
> > index ca3c41a..9c61780 100644
> > --- a/lib/eal/windows/eal.c
> > +++ b/lib/eal/windows/eal.c
> > @@ -401,6 +401,12 @@ enum rte_proc_type_t
> > return -1;
> > }
> >
> > + if (pthread_setaffinity_np(pthread_self(), sizeof(rte_cpuset_t),
> > + &lcore_config[config->main_lcore].cpuset) != 0) {
> > + rte_eal_init_alert("Cannot set affinity");
> > + rte_errno = EINVAL;
> > + return -1;
> > + }
> > __rte_thread_init(config->main_lcore,
> > &lcore_config[config->main_lcore].cpuset);
> >
>
> - It looks like the affinity is dumped for workers (see below), I
> would dump affinity for the main lcore like other OS do:
yep, it's missing i should have noticed that. i'll submit a new version
to dump the affinity for the main lcore.
>
> ret = eal_thread_dump_current_affinity(cpuset, sizeof(cpuset));
>
> RTE_LOG(DEBUG, EAL, "Main lcore %u is ready (tid=%p;cpuset=[%s%s])\n",
> config->main_lcore, thread_id, cpuset,
> ret == 0 ? "" : "...");
>
>
> - Which makes me notice that windows/eal_thread.c probably dumps
> random stuff in logs because it is missing a call to
> eal_thread_dump_current_affinity() to format affinity as a string.
oh yeah, that's not so good.
i think the series you submitted for eal_thread_loop should resolve this
shouldn't it? shall we ride your change to fix the issue or do you feel
it's worth me adding the missing call in this series?
--
ty
More information about the dev
mailing list