kernel_optimize_test/drivers/s390
Julian Wiedmann 5d4f78564c s390/qeth: implement smarter resizing of the RX buffer pool
The RX buffer pool is allocated in qeth_alloc_qdio_queues().
A subsequent pool resizing is then handled in a very simple way:
first free the current pool, then allocate a new pool of the requested
size.

There's two ways where this can go wrong:
1. if the resize action happens _before_ the initial pool was allocated,
   then a subsequent initialization will call qeth_alloc_qdio_queues()
   and fill the pool with a second(!) set of pages. We consume twice the
   planned amount of memory.
   This is easy to fix - just skip the resizing if the queues haven't
   been allocated yet.
2. if the initial pool was created by qeth_alloc_qdio_queues() but a
   subsequent resizing fails, then the device has no(!) RX buffer pool.
   The next initialization will _not_ call qeth_alloc_qdio_queues(), and
   attempting to back the RX buffers with pages in
   qeth_init_qdio_queues() will fail.
   Not very difficult to fix either - instead of re-allocating the whole
   pool, just allocate/free as many entries to match the desired size.

Fixes: 4a71df5004 ("qeth: new qeth device driver")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-03-11 23:52:31 -07:00
..
block proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
char compat_ioctl: move tape handling into drivers 2019-10-23 17:23:44 +02:00
cio s390/qdio: fill SL with absolute addresses 2020-02-19 17:26:32 +01:00
crypto s390/pkey/zcrypt: spelling s/crytp/crypt/ 2020-02-17 18:01:57 +01:00
net s390/qeth: implement smarter resizing of the RX buffer pool 2020-03-11 23:52:31 -07:00
scsi s390/qdio: fill SBALEs with absolute addresses 2020-02-19 17:26:32 +01:00
virtio virtio/s390: fix race on airq_areas[] 2019-07-26 13:36:18 +02:00
Makefile s390: remove pointless drivers-y in drivers/s390/Makefile 2019-09-16 13:21:51 +02:00