Whamcloud - gitweb
b=2010
authorzab <zab>
Thu, 23 Oct 2003 16:28:24 +0000 (16:28 +0000)
committerzab <zab>
Thu, 23 Oct 2003 16:28:24 +0000 (16:28 +0000)
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/.

lnet/include/lnet/lib-types.h
lustre/portals/include/portals/lib-types.h
lustre/ptlrpc/ptlrpc_lib.c

index 9db8489..e5447d7 100644 (file)
@@ -139,6 +139,7 @@ typedef struct {
 /* 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;
index 9db8489..e5447d7 100644 (file)
@@ -139,6 +139,7 @@ typedef struct {
 /* 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;
index a7569c7..68d7be6 100644 (file)
@@ -106,7 +106,7 @@ int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf)
         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);