This time, actually initialize the OSC's maximum number of pages allowed
in each RPC to the nice value that we calculate, rather than just setting the
tunable max. We export the math from portals so that client_obd_setup() can
use it to initialize the OSC from its summer home in ptlrpc/.
/* temporary expedient: limit number of entries in discontiguous MDs */
# define PTL_MTU (512<<10)
# define PTL_MD_MAX_IOV 128
+# define PTL_MD_MAX_PAGES min_t(int, PTL_MD_MAX_IOV, PTL_MTU / PAGE_SIZE)
struct lib_msg_t {
struct list_head msg_list;
/* temporary expedient: limit number of entries in discontiguous MDs */
# define PTL_MTU (512<<10)
# define PTL_MD_MAX_IOV 128
+# define PTL_MD_MAX_PAGES min_t(int, PTL_MD_MAX_IOV, PTL_MTU / PAGE_SIZE)
struct lib_msg_t {
struct list_head msg_list;
cli->cl_brw_in_flight = 0;
spin_lock_init(&cli->cl_rpc_concurrency_oh.oh_lock);
spin_lock_init(&cli->cl_pages_per_rpc_oh.oh_lock);
- cli->cl_max_pages_per_rpc = PTL_MD_MAX_IOV;
+ cli->cl_max_pages_per_rpc = PTL_MD_MAX_PAGES;
cli->cl_max_rpcs_in_flight = 8;
conn = ptlrpc_uuid_to_connection(&server_uuid);