Commit 84dcd8c7 authored by Anand Khoje's avatar Anand Khoje Committed by Jason Gunthorpe

IB/core: Shuffle locks in ib_port_data to save memory

pahole shows two 4-byte holes in struct ib_port_data after pkey_list_lock
and netdev_lock respectively.

Shuffling the netdev_lock to be after pkey_list_lock, this shaves off
eight bytes from the struct.

Link: https://lore.kernel.org/r/20210616154509.1047-3-anand.a.khoje@oracle.comSuggested-by: default avatarHaakon Bugge <haakon.bugge@oracle.com>
Signed-off-by: default avatarAnand Khoje <anand.a.khoje@oracle.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent c5f8f2c5
...@@ -2176,11 +2176,13 @@ struct ib_port_data { ...@@ -2176,11 +2176,13 @@ struct ib_port_data {
struct ib_port_immutable immutable; struct ib_port_immutable immutable;
spinlock_t pkey_list_lock; spinlock_t pkey_list_lock;
spinlock_t netdev_lock;
struct list_head pkey_list; struct list_head pkey_list;
struct ib_port_cache cache; struct ib_port_cache cache;
spinlock_t netdev_lock;
struct net_device __rcu *netdev; struct net_device __rcu *netdev;
struct hlist_node ndev_hash_link; struct hlist_node ndev_hash_link;
struct rdma_port_counter port_counter; struct rdma_port_counter port_counter;
......
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