[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210621134902.83587-9-coiby.xu@gmail.com>
Date: Mon, 21 Jun 2021 21:48:51 +0800
From: Coiby Xu <coiby.xu@...il.com>
To: linux-staging@...ts.linux.dev
Cc: netdev@...r.kernel.org,
Benjamin Poirier <benjamin.poirier@...il.com>,
Shung-Hsi Yu <shung-hsi.yu@...e.com>,
Manish Chopra <manishc@...vell.com>,
GR-Linux-NIC-Dev@...vell.com (supporter:QLOGIC QLGE 10Gb ETHERNET
DRIVER), Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org (open list)
Subject: [RFC 08/19] staging: qlge: reorder members of qlge_adapter for optimization
Before reordering, pahole shows,
/* size: 21168, cachelines: 331, members: 69 */
/* sum members: 21144, holes: 4, sum holes: 18 */
/* padding: 6 */
/* paddings: 6, sum paddings: 24 */
/* forced alignments: 1 */
/* last cacheline: 48 bytes */
After reordering following pahole's suggestion,
/* size: 21152, cachelines: 331, members: 69 */
/* sum members: 21144, holes: 1, sum holes: 2 */
/* padding: 6 */
/* paddings: 6, sum paddings: 24 */
/* forced alignments: 1 */
/* last cacheline: 32 bytes */
Signed-off-by: Coiby Xu <coiby.xu@...il.com>
---
drivers/staging/qlge/qlge.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/qlge/qlge.h b/drivers/staging/qlge/qlge.h
index 926af25b14fa..9177baa9f022 100644
--- a/drivers/staging/qlge/qlge.h
+++ b/drivers/staging/qlge/qlge.h
@@ -2081,8 +2081,8 @@ struct qlge_adapter *netdev_to_qdev(struct net_device *ndev)
*/
struct qlge_adapter {
struct ricb ricb;
- unsigned long flags;
u32 wol;
+ unsigned long flags;
struct nic_stats nic_stats;
@@ -2103,6 +2103,8 @@ struct qlge_adapter {
spinlock_t adapter_lock;
spinlock_t stats_lock;
+ u32 intr_count;
+
/* PCI Bus Relative Register Addresses */
void __iomem *reg_base;
void __iomem *doorbell_area;
@@ -2123,7 +2125,6 @@ struct qlge_adapter {
int tx_ring_size;
int rx_ring_size;
- u32 intr_count;
struct msix_entry *msi_x_entry;
struct intr_context intr_context[MAX_RX_RINGS];
@@ -2162,6 +2163,7 @@ struct qlge_adapter {
u32 max_frame_size;
union flash_params flash;
+ u16 device_id;
struct workqueue_struct *workqueue;
struct delayed_work asic_reset_work;
@@ -2171,7 +2173,6 @@ struct qlge_adapter {
struct delayed_work mpi_idc_work;
struct completion ide_completion;
const struct nic_operations *nic_ops;
- u16 device_id;
struct timer_list timer;
atomic_t lb_count;
/* Keep local copy of current mac address. */
--
2.32.0
Powered by blists - more mailing lists