* [PATCH next] netdevice: shrink size of struct netdev_queue
@ 2016-05-03 1:29 Florian Westphal
2016-05-03 1:49 ` Eric Dumazet
2016-05-03 2:51 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Florian Westphal @ 2016-05-03 1:29 UTC (permalink / raw)
To: netdev; +Cc: Florian Westphal
- trans_timeout is incremented when tx queue timed out (tx watchdog).
- tx_maxrate is set via sysfs
Moving tx_maxrate to read-mostly part shrinks the struct by 64 bytes.
While at it, also move trans_timeout (it is out-of-place in the
'write-mostly' part).
Signed-off-by: Florian Westphal <fw@strlen.de>
---
include/linux/netdevice.h | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 52914a8..f218259 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -569,6 +569,12 @@ struct netdev_queue {
#if defined(CONFIG_XPS) && defined(CONFIG_NUMA)
int numa_node;
#endif
+ unsigned long tx_maxrate;
+ /*
+ * Number of TX timeouts for this queue
+ * (/sys/class/net/DEV/Q/trans_timeout)
+ */
+ unsigned long trans_timeout;
/*
* write-mostly part
*/
@@ -579,18 +585,11 @@ struct netdev_queue {
*/
unsigned long trans_start;
- /*
- * Number of TX timeouts for this queue
- * (/sys/class/net/DEV/Q/trans_timeout)
- */
- unsigned long trans_timeout;
-
unsigned long state;
#ifdef CONFIG_BQL
struct dql dql;
#endif
- unsigned long tx_maxrate;
} ____cacheline_aligned_in_smp;
static inline int netdev_queue_numa_node_read(const struct netdev_queue *q)
--
2.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-03 2:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03 1:29 [PATCH next] netdevice: shrink size of struct netdev_queue Florian Westphal
2016-05-03 1:49 ` Eric Dumazet
2016-05-03 2:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).