Commit c506cc5b authored by David S. Miller's avatar David S. Miller

Merge branch 'ibmvnic-next'

Sukadev Bhattiprolu says:

====================
ibmvnic: Reuse ltb, rx, tx pools

It can take a long time to free and reallocate rx and tx pools and long
term buffer (LTB) during each reset of the VNIC. This is specially true
when the partition (LPAR) is heavily loaded and going through a Logical
Partition Migration (LPM). The long drawn reset causes the LPAR to lose
connectivity for extended periods of time and results in "RMC connection"
errors and the LPM failing.

What is worse is that during the LPM we could get a failover because
of the lost connectivity. At that point, the vnic driver releases
even the resources it has already allocated and starts over.

As long as the resources we have already allocated are valid/applicable,
we might as well hold on to them while trying to allocate the remaining
resources. This patch set attempts to reuse the resources previously
allocated as long as they are valid. It seems to vastly improve the
time taken for the vnic reset and signficantly reduces the chances of
getting the RMC connection errors. We do get still them occasionally,
but appears to be for reasons other than memory allocation delays and
those are still being investigated.

If the backing devices for a vnic adapter are not "matched" (see "pool
parameters" in patches 8 and 9) it is possible that we will still free
all the resources and allocate them. If that becomes a common problem,
we have to address it separately.

Thanks to input and extensive testing from Brian King, Cris Forno,
Dany Madden, Rick Lindsley.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 923990f6 bbd80930
This diff is collapsed.
...@@ -827,7 +827,7 @@ struct ibmvnic_rx_buff { ...@@ -827,7 +827,7 @@ struct ibmvnic_rx_buff {
struct ibmvnic_rx_pool { struct ibmvnic_rx_pool {
struct ibmvnic_rx_buff *rx_buff; struct ibmvnic_rx_buff *rx_buff;
int size; int size; /* # of buffers in the pool */
int index; int index;
int buff_size; int buff_size;
atomic_t available; atomic_t available;
...@@ -967,6 +967,7 @@ struct ibmvnic_adapter { ...@@ -967,6 +967,7 @@ struct ibmvnic_adapter {
u64 min_mtu; u64 min_mtu;
u64 max_mtu; u64 max_mtu;
u64 req_mtu; u64 req_mtu;
u64 prev_mtu;
u64 max_multicast_filters; u64 max_multicast_filters;
u64 vlan_header_insertion; u64 vlan_header_insertion;
u64 rx_vlan_header_insertion; u64 rx_vlan_header_insertion;
...@@ -979,13 +980,18 @@ struct ibmvnic_adapter { ...@@ -979,13 +980,18 @@ struct ibmvnic_adapter {
u64 opt_tx_entries_per_subcrq; u64 opt_tx_entries_per_subcrq;
u64 opt_rxba_entries_per_subcrq; u64 opt_rxba_entries_per_subcrq;
__be64 tx_rx_desc_req; __be64 tx_rx_desc_req;
u8 map_id; #define MAX_MAP_ID 255
DECLARE_BITMAP(map_ids, MAX_MAP_ID);
u32 num_active_rx_scrqs; u32 num_active_rx_scrqs;
u32 num_active_rx_pools; u32 num_active_rx_pools;
u32 num_active_rx_napi; u32 num_active_rx_napi;
u32 num_active_tx_scrqs; u32 num_active_tx_scrqs;
u32 num_active_tx_pools; u32 num_active_tx_pools;
u32 prev_rx_pool_size;
u32 prev_tx_pool_size;
u32 cur_rx_buf_sz; u32 cur_rx_buf_sz;
u32 prev_rx_buf_sz;
struct tasklet_struct tasklet; struct tasklet_struct tasklet;
enum vnic_state state; enum vnic_state state;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment