linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2] lpfc: Mitigate high memory pre-allocation by SCSI-MQ
       [not found]   ` <227b2bc2-9778-6d38-a68b-26a799a0caeb@gmail.com>
@ 2019-08-07  1:39     ` Ming Lei
  0 siblings, 0 replies; only message in thread
From: Ming Lei @ 2019-08-07  1:39 UTC (permalink / raw)
  To: James Smart, Linux Kernel Mailing List, Thomas Gleixner
  Cc: Linux SCSI List, Dick Kennedy

On Wed, Aug 7, 2019 at 1:13 AM James Smart <jsmart2021@gmail.com> wrote:
>
> On 8/5/2019 6:09 PM, Ming Lei wrote:
> >
> > I am wondering why you use 2 * num_possible_nodes() as the limit instead of
> > num_possible_nodes(), could you explain it a bit?
>
> The number comes from most systems being dual socket systems, thus a
> numa node count of 2. Some of these dual socket systems can be high cpu
> counts per socket. We did see a difference, on different architectures
> and where cpu counts were high per socket, that more hwqs per socket did
> help. So if there can be more than 1 hwq per socket then I think that is
> goodness.

I guess it isn't related with CPU cores per socket, what matters is number of
sockets, given each CPU core in same socket is in same position wrt. RW
preformance on same shared memory, so looks the following way is what
we need:

 shost->nr_hw_queues = max_t(int,  num_possible_nodes(),
                                          nr_processor_sockets);

However, I don't know how to retrieve 'nr_processor_sockets' in kernel.
Maybe topology_max_packages() can be used for x86, not see how to
read it for other ARCHs.

Cc Thomas and linux-kernel list.

Thanks,
Ming Lei

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-08-07  1:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190801220941.19615-1-jsmart2021@gmail.com>
     [not found] ` <CACVXFVO7vmGJj_N_MT7roZDmWNHbEGR=MsOqkpb7NTptF3=DOw@mail.gmail.com>
     [not found]   ` <227b2bc2-9778-6d38-a68b-26a799a0caeb@gmail.com>
2019-08-07  1:39     ` [PATCH v2] lpfc: Mitigate high memory pre-allocation by SCSI-MQ Ming Lei

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).