History

SUNRPC: Add basic load balancing to the transport switch

For now, just count the queue length. It is less accurate than counting number of bytes queued, but easier to implement.

Trond Myklebust committed 9 years ago

Commit 21f0ffa1 parent 44942b44 files · +59 −4Browse files

Showing the changes to include/linux (2 of 4 files). Show all

Unified · Split

2 files
  1. include/linux/sunrpc/xprt.h +1 −0
  2. include/linux/sunrpc/xprtmultipath.h +2 −0
include/linux/sunrpc/xprt.h+1−0
@@ -238,6 +238,7 @@ struct rpc_xprt { · 237 unmodified lines
238238 /*
239239 * Send stuff
240240 */
241+ atomic_long_t queuelen;
241242 spinlock_t transport_lock; /* lock transport info */
242243 spinlock_t reserve_lock; /* lock slot table */
243244 spinlock_t queue_lock; /* send/receive queue lock */
include/linux/sunrpc/xprtmultipath.h+2−0
@@ -15,6 +15,8 @@ struct rpc_xprt_switch { · 14 unmodified lines
1515 struct kref xps_kref;
1616
1717 unsigned int xps_nxprts;
18+ unsigned int xps_nactive;
19+ atomic_long_t xps_queuelen;
1820 struct list_head xps_xprt_list;
1921
2022 struct net * xps_net;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t