]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sif: base: Scale default desc.array size values based on #of available CBs
authorKnut Omang <knut.omang@oracle.com>
Tue, 9 Aug 2016 14:10:39 +0000 (16:10 +0200)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Fri, 12 Aug 2016 19:18:12 +0000 (12:18 -0700)
commit492ae2eaf3e7e073a0845aa4ee929a65d4cfb345
tree27081f83d26e84678f57adbe67eb92fca42d509c
parent976977affa81716bad5d741add1a3d3d6b3a05e7
sif: base: Scale default desc.array size values based on #of available CBs

With default values for #of QPs and MRs set high by default,
33 instances of the driver would consume a lot
of memory just to initialize basic tables since each of these
instances have their own 1M QP space and in effect allocates
the same amount of resources that a bare metal, single instance
driver would do.

The number of collect buffers assigned to the PCIe function tells us
what fraction of the hardware resources we got, and a small
fraction of the 16K CB space indicates that the function competes with
other functions on resources, and that it is unlikely that the same
huge number of QPs etc can be deployed with high performance
anyway.

This commit introduces tracking of module parameter settings
compared to default values, and if compiled in defaults are used,
we scale down the number of QPs etc with a factor corresponding
to the fraction of CBs we got.

This yields eg. 32K QPs per function in a 32 VF enabled system
and significantly reduces system wide memory usage in a
virtualized environment (whether Xen based or not)

Users can still override settings using the module parameters,
which will not be subject to scaling if they deviate from the
compiled in defaults.

Orabug: 24424521

Signed-off-by: Knut Omang <knut.omang@oracle.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
drivers/infiniband/hw/sif/sif_base.c
drivers/infiniband/hw/sif/sif_dev.h
drivers/infiniband/hw/sif/sif_epsc.c
drivers/infiniband/hw/sif/sif_pd.c
drivers/infiniband/hw/sif/sif_pd.h