Whamcloud - gitweb
- tuning ported from b1_4
[fs/lustre-release.git] / lustre / ldlm / ldlm_lib.c
index 50f2f97..70bd9b7 100644 (file)
@@ -245,10 +245,13 @@ int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf)
         spin_lock_init(&cli->cl_write_rpc_hist.oh_lock);
         spin_lock_init(&cli->cl_read_page_hist.oh_lock);
         spin_lock_init(&cli->cl_write_page_hist.oh_lock);
-        
-        if (num_physpages <= 32768) { /* <= 128 MB */
-                cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES / 3;
-                cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT / 3;
+
+        if (num_physpages >> (20 - PAGE_SHIFT) <= 128) { /* <= 128 MB */
+                cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES / 4;
+                cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT / 4;
+        } else if (num_physpages >> (20 - PAGE_SHIFT) <= 512) { /* <= 512 MB */
+                cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES / 2;
+                cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT / 2;
         } else {
                 cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES;
                 cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT;
@@ -417,7 +420,7 @@ out_sem:
         return rc;
 }
 
-int client_disconnect_export(struct obd_export *exp, int flags)
+int client_disconnect_export(struct obd_export *exp, unsigned long flags)
 {
         struct obd_device *obd = class_exp2obd(exp);
         struct client_obd *cli = &obd->u.cli;
@@ -455,7 +458,9 @@ int client_disconnect_export(struct obd_export *exp, int flags)
                 obd->obd_namespace = NULL;
         }
 
-        /* Yeah, obd_no_recov also (mainly) means "forced shutdown". */
+        /* 
+         * Yeah, obd_no_recov also (mainly) means "forced shutdown".
+         */
         if (obd->obd_no_recov)
                 ptlrpc_invalidate_import(imp, 0);
         else
@@ -1177,7 +1182,6 @@ int target_queue_recovery_request(struct ptlrpc_request *req,
         if (obd->obd_recovery_data.trd_processing_task == current->pid ||
             transno < obd->obd_next_recovery_transno) {
                 /* Processing the queue right now, don't re-add. */
-                lustre_msg_clear_flags(req->rq_reqmsg, MSG_RESENT);
                 LASSERT(list_empty(&req->rq_list));
                 spin_unlock_bh(&obd->obd_processing_task_lock);
                 return 1;