Whamcloud - gitweb
LU-10467 lustre: add wait_event macros suitable for upstream
This patch adds three sorts of wait_event macros.
1/ wait_event_idle_* which are available upstream, but not
in older kernels.
if TASK_NOLOAD is not available, we use TASK_UNINTERRUPTIBLE,
and block all interrupts.
We cannot use ___wait_cond_timeout() as it changed signature
in 3.13. so we define our own ___wait_cond_timeout1().
2/ wait_event_idle_exclusive_lifo() and
wait_event_idle_exclusive_lifo_timeout()
which might be accepted upstream if we can make a strong case
prepare_to_wait_event() doesn't support this directly, but
as it won't relink a wait_entry that is already linked, it
is sufficient to link to the head of the queue before calling
prepare_to_wait_event().
3/ l_wait_event_abortable
l_wait_event_abortable_timeout
l_wait_event_abortable_exclusive
which are unlikely to be accepted upstream, but match the general
approach of upstream wait_event macros, and are useful
to lustre.
Possibly some or all of these should become wait_event_killable_*
LUSTRE_FATAL_SIGS is moved over to linux-wait.h.
___wait_event() and related macros are copied from upstream linux,
and modified slightly to work across all supported kernels.
Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.com>
Change-Id: I2d260fc159dbe5b1a3cc7a26e4aeedf30150d85a
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/35962
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>