Whamcloud - gitweb
b=11706
authorgreen <green>
Fri, 3 Aug 2007 04:23:47 +0000 (04:23 +0000)
committergreen <green>
Fri, 3 Aug 2007 04:23:47 +0000 (04:23 +0000)
r=adilger

Obtain necessary amount of peer credits for exery export per oss and for
every possible AST per MDS.

lustre/ChangeLog
lustre/include/lustre_net.h
lustre/mdc/mdc_request.c
lustre/osc/osc_request.c
lustre/ptlrpc/import.c
lustre/ptlrpc/ptlrpc_module.c

index ca9b9f8..5efd20e 100644 (file)
@@ -83,6 +83,12 @@ Details    : When running with O_DIRECT I/O, neither the client rpc_stats nor
             read_ahead_stats were updated. Copied stats section from 
             osc_send_oap_rpc() into async_internal().
 
+Severity   : minor
+Bugzilla   : 11706
+Frequency  : only for Cray XT3
+Description: peer credits not enough on many OST per OSS systems.
+Details    : Use new lnet way to add credits as we need those for pings and ASTs
+
 --------------------------------------------------------------------------------
 
 2007-07-30         Cluster File Systems, Inc. <info@clusterfs.com>
index 673cf5f..76a5eaf 100644 (file)
@@ -750,6 +750,7 @@ int ptlrpc_connect_import(struct obd_import *imp, char * new_uuid);
 int ptlrpc_init_import(struct obd_import *imp);
 int ptlrpc_disconnect_import(struct obd_import *imp, int noclose);
 int ptlrpc_import_recovery_state_machine(struct obd_import *imp);
+void ptlrpc_import_setasync(struct obd_import *imp, int count);
 
 /* ptlrpc/pack_generic.c */
 int lustre_msg_swabbed(struct lustre_msg *msg);
index aa55c18..0846aca 100644 (file)
@@ -1109,6 +1109,7 @@ static int mdc_import_event(struct obd_device *obd, struct obd_import *imp,
 
         switch (event) {
         case IMP_EVENT_DISCON: {
+                ptlrpc_import_setasync(imp, -obd->obd_namespace->ns_max_unused);
                 break;
         }
         case IMP_EVENT_INACTIVE: {
@@ -1127,6 +1128,7 @@ static int mdc_import_event(struct obd_device *obd, struct obd_import *imp,
                 break;
         }
         case IMP_EVENT_OCD:
+                ptlrpc_import_setasync(imp, obd->obd_namespace->ns_max_unused);
                 break;
 
         default:
index 3195948..9caa9df 100644 (file)
@@ -3508,6 +3508,7 @@ static int osc_import_event(struct obd_device *obd,
                 cli->cl_avail_grant = 0;
                 cli->cl_lost_grant = 0;
                 client_obd_list_unlock(&cli->cl_loi_list_lock);
+                ptlrpc_import_setasync(imp, -1);
 
                 break;
         }
@@ -3551,6 +3552,7 @@ static int osc_import_event(struct obd_device *obd,
                 if (ocd->ocd_connect_flags & OBD_CONNECT_REQPORTAL)
                         imp->imp_client->cli_request_portal =OST_REQUEST_PORTAL;
 
+                ptlrpc_import_setasync(imp, 1);
                 rc = obd_notify_observer(obd, obd, OBD_NOTIFY_OCD, NULL);
                 break;
         }
index afb3b09..c585932 100644 (file)
@@ -1031,3 +1031,11 @@ out:
         RETURN(rc);
 }
 
+/* Sets maximal number of RPCs possible originating from other side of this
+   import (server) to us and number of async RPC replies that we are not waiting
+   for arriving */
+void ptlrpc_import_setasync(struct obd_import *imp, int count)
+{
+        LNetSetAsync(imp->imp_connection->c_peer, count);
+}
+
index ebfd6ce..2ecf093 100644 (file)
@@ -252,6 +252,7 @@ EXPORT_SYMBOL(ptlrpc_deactivate_import);
 EXPORT_SYMBOL(ptlrpc_invalidate_import);
 EXPORT_SYMBOL(ptlrpc_fail_import);
 EXPORT_SYMBOL(ptlrpc_recover_import);
+EXPORT_SYMBOL(ptlrpc_import_setasync);
 
 /* pinger.c */
 EXPORT_SYMBOL(ptlrpc_pinger_add_import);