]> Gentwo Git Trees - linux/.git/commit
idpf: avoid bloating &idpf_q_vector with big %NR_CPUS
authorAlexander Lobakin <aleksander.lobakin@intel.com>
Thu, 20 Jun 2024 13:53:39 +0000 (15:53 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 10 Jul 2024 17:34:42 +0000 (10:34 -0700)
commitbf9bf7042a38ebd2485592467772db50605bd4a2
tree2c1d89e28c7ab293586f4708fd933c529e776620
parente4891e4687c8dd136d80d6c1b857a02931ed6fc8
idpf: avoid bloating &idpf_q_vector with big %NR_CPUS

With CONFIG_MAXSMP, sizeof(cpumask_t) is 1 Kb. The queue vector
structure has them embedded, which means 1 additional Kb of not
really hotpath data.
We have cpumask_var_t, which is either an embedded cpumask or a pointer
for allocating it dynamically when it's big. Use it instead of plain
cpumasks and put &idpf_q_vector on a good diet.
Also remove redundant pointer to the interrupt name from the structure.
request_irq() saves it and free_irq() returns it on deinit, so that you
can free the memory.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/idpf/idpf_lib.c
drivers/net/ethernet/intel/idpf/idpf_txrx.c
drivers/net/ethernet/intel/idpf/idpf_txrx.h