1
0
Fork 0
alistair23-linux/drivers/staging/lustre/include/linux/lnet
Amir Shehata 95fc2938eb staging: lustre: Allocate the correct number of rtr buffers
This patch ensures that the correct number of router buffers are
allocated.  It keeps a count that keeps track of the number of
buffers allocated.  Another count keeps the number of buffers
requested. The number of buffers allocated is set when creating
new buffers and reduced when buffers are freed.

The number of requested buffer is set when the buffers are
allocated and is checked when credits are returned to determine
whether the buffer should be freed or kept.

In lnet_rtrpool_adjust_bufs() grab lnet_net_lock() before using
rbp_nbuffers to ensure that it doesn't change by
lnet_return_rx_credits_locked() during the process of allocating
new buffers.  All other access to rbp_nbuffers is already being
protected by lnet_net_lock().

This avoids the case where we allocate less than the desired
number of buffers.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6122
Reviewed-on: http://review.whamcloud.com/13519
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 18:05:49 -08:00
..
api.h staging: lustre: format properly all comment blocks for LNet core 2016-02-14 16:20:32 -08:00
lib-dlc.h staging: lustre: Dynamic LNet Configuration (DLC) show command 2016-02-22 18:05:49 -08:00
lib-lnet.h staging: lustre: remove messages from lazy portal on NI shutdown 2016-02-22 18:05:49 -08:00
lib-types.h staging: lustre: Allocate the correct number of rtr buffers 2016-02-22 18:05:49 -08:00
lnet.h staging:lustre: Update license and copyright for the LNET headers 2015-06-11 22:41:20 -07:00
lnetctl.h staging/lustre: Remove the "write to FSF to get a copy of GPL" wording 2016-02-20 14:33:11 -08:00
lnetst.h staging/lustre: Add __user annotations in lnetselftest code 2016-02-03 14:38:00 -08:00
nidstr.h staging: lustre: remove unnecessary blank lines reported by checkpatch.pl 2016-02-14 16:20:32 -08:00
socklnd.h staging: lustre: don't set more than one variable per line in LNet layer 2016-02-14 16:20:32 -08:00
types.h staging: lustre: format properly all comment blocks for LNet core 2016-02-14 16:20:32 -08:00