From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 0477AA050A;
	Tue, 12 Apr 2022 18:30:15 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 9875740DF6;
	Tue, 12 Apr 2022 18:30:15 +0200 (CEST)
Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182])
 by mails.dpdk.org (Postfix) with ESMTP id 224B84014F
 for <dev@dpdk.org>; Tue, 12 Apr 2022 18:30:14 +0200 (CEST)
Received: by linux.microsoft.com (Postfix, from userid 1086)
 id 5A63320BA5AC; Tue, 12 Apr 2022 09:30:13 -0700 (PDT)
DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5A63320BA5AC
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;
 s=default; t=1649781013;
 bh=JISKlDf+xxGwsPPukhT0EOTbpqa3yFQyibnCiiDTCUI=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
 b=eUjne/AENTS0H5xrSnlgfxO63EDHrgBlyyKT+Esm9d6tX+mDNarjtlJDX9ySDAsFk
 qZMxLoekJpG4PWwHCCLaIIDbMLRq+1UeNLPe7mT4gFTnCXsG/3zzQBtVi4MmBt3C7u
 0PMrACokmrqPJAankWxm2xv5Gh2c+ytOBtydszG0=
Date: Tue, 12 Apr 2022 09:30:13 -0700
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Subject: Re: [PATCH] eal/windows: set Windows main lcore affinitization
Message-ID: <20220412163013.GA25114@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
References: <1648630829-4372-1-git-send-email-roretzla@linux.microsoft.com>
 <CAJFAV8w+9Nxf_T_G2xGdTMFD=Mi1-F7k-VBAGJt-a=BqrfkA0A@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAJFAV8w+9Nxf_T_G2xGdTMFD=Mi1-F7k-VBAGJt-a=BqrfkA0A@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

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@linux.microsoft.com> wrote:
> >
> > add missing code to affinitize main_lcore from lcore configuration.
> 
> Nit: Add*
> 
> >
> > Signed-off-by: Tyler Retzlaff <roretzla@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