From cd9f60978f758325264e01ba3f9e92a60d269683 Mon Sep 17 00:00:00 2001 From: Vladimir Saveliev Date: Fri, 28 Sep 2018 10:58:59 +0300 Subject: [PATCH] LU-11441 obdclass: make mod rpc slot wait queue FIFO Relatively big load may cause a process to spin for a long time without successful grabbing a free mod rpc slot. It has been observed a process spinning more than 100 seconds when there were 72 mdtest-s and 8 IOR-s. Make mod rpc slot wait queue to run FIFO so that waiting thread got free mod rpc slot in order they entered the queue. Signed-off-by: Vladimir Saveliev Cray-bug-id: LUS-6380 Change-Id: I4ef2cf529cf1bb4c8500d7a2b181a05ca080223e --- lustre/obdclass/genops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 580355703d..a4b06a0d44 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -2407,8 +2407,9 @@ __u16 obd_get_mod_rpc_slot(struct client_obd *cli, __u32 opc, "opc %u, max %hu\n", cli->cl_import->imp_obd->obd_name, opc, max); - l_wait_event(cli->cl_mod_rpcs_waitq, - obd_mod_rpc_slot_avail(cli, close_req), &lwi); + l_wait_event_exclusive(cli->cl_mod_rpcs_waitq, + obd_mod_rpc_slot_avail(cli, close_req), + &lwi); } while (true); } EXPORT_SYMBOL(obd_get_mod_rpc_slot); -- 2.14.3 (Apple Git-98)