Whamcloud - gitweb
LU-12768 o2iblnd: wait properly for fps->increasing. 24/39124/2
authorMr NeilBrown <neilb@suse.de>
Sun, 7 Jun 2020 23:24:33 +0000 (19:24 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 4 Jul 2020 03:05:19 +0000 (03:05 +0000)
commit530eca31556f7708781bcd1b1809ae286aee4c57
treecf7ac162ec504420b9ff023e12d1954195248806
parent1b622e20074834bb8b9c628cefb378c85be466dd
LU-12768 o2iblnd: wait properly for fps->increasing.

If we need to allocate a new fmr_pool and another thread is currently
allocating one, we call schedule() and then try again.  This can spin,
consuming a CPU and wasting power.

Instead, use wait_var_event() and wake_up_var() to
wait for fps_increasing to be cleared.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I16210fc6904d7605f4671f5edfa2f490526c3a16
Reviewed-on: https://review.whamcloud.com/39124
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/o2iblnd/o2iblnd.c