Whamcloud - gitweb
b=16842 __l_wait_event should sleep using TASK_INT
authorMaxim Patlasov <Maxim.Patlasov@sun.com>
Tue, 28 Sep 2010 10:07:59 +0000 (14:07 +0400)
committerVitaly Fertman <vitaly.fertman@sun.com>
Mon, 4 Oct 2010 19:56:15 +0000 (23:56 +0400)
i=green
i=andreas
All threads sleeping in non-interruptible way are accounted in "load average".
This is not desirable for lustre threads sleeping in __l_wait_event.
Traditionally, only threads doing I/O are allowed to sleep in
non-interruptible way.

lustre/include/lustre_lib.h

index 37cf991..4beca8e 100644 (file)
@@ -697,7 +697,7 @@ do {                                                                           \
                            (__timeout == 0 || __allow_intr) ?                  \
                         CFS_TASK_INTERRUPTIBLE : CFS_TASK_UNINT;               \
                                                                                \
-                cfs_set_current_state(__wstate);                               \
+                cfs_set_current_state(CFS_TASK_INTERRUPTIBLE);                 \
                                                                                \
                 if (condition)                                                 \
                         break;                                                 \