diff --git a/lustre/ChangeLog b/lustre/ChangeLog index ca9b9f88e99eea2ef796b552c0d17ed01fed498f..5efd20e1e8daad9e087493fc7ad4f8b34bfbaf43 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -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> diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index 673cf5f45ce9e21f5d0f9852fe71712f696df358..76a5eafda7418767dd3d4c1ac8b5661508e52b59 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -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); diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index aa55c180282583509a2c399c6123e72dc58c473f..0846aca06ec83c3e97cc966d345856bdf72772c6 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -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: diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 3195948f9f12d7855127b863e500d7792ab0eb70..9caa9df9d0f08411b106f45384d8faea10960a6c 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -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; } diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index afb3b09a6c59afffed96a03e1b67c4ba2f8051b1..c585932a2e445a6c5aaa2ffcd461be64694991cb 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -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); +} + diff --git a/lustre/ptlrpc/ptlrpc_module.c b/lustre/ptlrpc/ptlrpc_module.c index ebfd6cedef110e6a46b4e4fca71090c7cc53cc4c..2ecf093c61b405adf097cc1aced00d248eec5404 100644 --- a/lustre/ptlrpc/ptlrpc_module.c +++ b/lustre/ptlrpc/ptlrpc_module.c @@ -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);