From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jason Xing <kerneljasonxing@gmail.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
David Miller <davem@davemloft.net>,
kuba@kernel.org, ast@kernel.org, daniel@iogearbox.net,
hawk@kernel.org, john.fastabend@gmail.com, andrii@kernel.org,
kafai@fb.com, songliubraving@fb.com, yhs@fb.com,
kpsingh@kernel.org, intel-wired-lan@lists.osuosl.org,
netdev <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
bpf@vger.kernel.org, Jason Xing <xingwanli@kuaishou.com>,
Shujin Li <lishujin@kuaishou.com>
Subject: Re: [PATCH v4] ixgbe: let the xdpdrv work with more than 64 cpus
Date: Thu, 26 Aug 2021 11:19:35 -0700 [thread overview]
Message-ID: <da5da485-9dc7-e731-a8d9-f5ad7c7dffde@gmail.com> (raw)
In-Reply-To: <CAL+tcoCovfAQmN_c43ScmjpO9D54CKP5XFTpx6VQpwJVxZhAdg@mail.gmail.com>
On 8/26/21 10:03 AM, Jason Xing wrote:
>
> Honestly, I'm a little confused right now. @nr_cpu_ids is the fixed
> number which means the total number of cpus the machine has.
> I think, using @nr_cpu_ids is safe one way or the other regardless of
> whether the cpu goes offline or not. What do you think?
>
More exactly, nr_cpu_ids is the max number cpu id can reach,
even in presence of holes.
I think that most/many num_online_cpus() in drivers/net are simply broken
and should be replaced by nr_cpu_ids.
The assumptions of cpus being nicely numbered from [0 to X-1],
with X==num_online_cpus() is wrong.
Same remark for num_possible_cpus(), see commit
88d4f0db7fa8 ("perf: Fix alloc_callchain_buffers()") for reference.
next prev parent reply other threads:[~2021-08-26 18:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 14:16 [PATCH v4] ixgbe: let the xdpdrv work with more than 64 cpus kerneljasonxing
2021-08-26 15:23 ` Jesse Brandeburg
2021-08-26 15:43 ` Jason Xing
2021-08-26 16:18 ` Eric Dumazet
2021-08-26 16:41 ` Jesse Brandeburg
2021-08-26 17:03 ` Jason Xing
2021-08-26 17:37 ` [Intel-wired-lan] " Maciej Fijalkowski
2021-08-26 18:19 ` Eric Dumazet [this message]
2021-08-27 0:25 ` Jason Xing
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=da5da485-9dc7-e731-a8d9-f5ad7c7dffde@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=andrii@kernel.org \
--cc=anthony.l.nguyen@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kerneljasonxing@gmail.com \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lishujin@kuaishou.com \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=xingwanli@kuaishou.com \
--cc=yhs@fb.com \
/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).