For now, just count the queue length. It is less accurate than counting number of bytes queued, but easier to implement.
Showing the changes to include/linux (2 of 4 files). Show all
Unified · Split
| @@ -238,6 +238,7 @@ struct rpc_xprt { · 237 unmodified lines | |||
| 238 | /* | 238 | /* |
| 239 | * Send stuff | 239 | * Send stuff |
| 240 | */ | 240 | */ |
| 241 | atomic_long_t queuelen; | ||
| 241 | spinlock_t transport_lock; /* lock transport info */ | 242 | spinlock_t transport_lock; /* lock transport info */ |
| 242 | spinlock_t reserve_lock; /* lock slot table */ | 243 | spinlock_t reserve_lock; /* lock slot table */ |
| 243 | spinlock_t queue_lock; /* send/receive queue lock */ | 244 | spinlock_t queue_lock; /* send/receive queue lock */ |
| @@ -15,6 +15,8 @@ struct rpc_xprt_switch { · 14 unmodified lines | |||
| 15 | struct kref xps_kref; | 15 | struct kref xps_kref; |
| 16 | 16 | ||
| 17 | unsigned int xps_nxprts; | 17 | unsigned int xps_nxprts; |
| 18 | unsigned int xps_nactive; | ||
| 19 | atomic_long_t xps_queuelen; | ||
| 18 | struct list_head xps_xprt_list; | 20 | struct list_head xps_xprt_list; |
| 19 | 21 | ||
| 20 | struct net * xps_net; | 22 | struct net * xps_net; |