[RFC 08/19] staging: qlge: reorder members of qlge_adapter for optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux