From 3e3d6b13bbe31c9dd155c7b9cccead0bbfc4c26a Mon Sep 17 00:00:00 2001 From: panda Date: Mon, 2 Nov 2009 12:28:03 +0000 Subject: [PATCH] b=21166 i=Oleg i=Johann reduce busy-waits by explicit set_task_state(...), cleanup --- lustre/include/obd_support.h | 4 ---- lustre/obdecho/echo.c | 1 - 2 files changed, 5 deletions(-) diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h index 2b0988b..4bf5007 100644 --- a/lustre/include/obd_support.h +++ b/lustre/include/obd_support.h @@ -382,10 +382,8 @@ do { \ if (unlikely(obd_fail_loc && (_ret_ = obd_fail_check(id)))) { \ CERROR("obd_fail_timeout id %x sleeping for %d secs\n", \ (id), (secs)); \ - set_current_state(TASK_UNINTERRUPTIBLE); \ cfs_schedule_timeout(CFS_TASK_UNINT, \ cfs_time_seconds(secs)); \ - set_current_state(TASK_RUNNING); \ CERROR("obd_fail_timeout id %x awake\n", (id)); \ } \ _ret_; \ @@ -396,10 +394,8 @@ do { \ if (unlikely(obd_fail_loc && (_ret_ = obd_fail_check(id)))) { \ CERROR("obd_fail_timeout id %x sleeping for %d ms\n", \ (id), (ms)); \ - set_current_state(TASK_UNINTERRUPTIBLE); \ cfs_schedule_timeout(CFS_TASK_UNINT, \ cfs_time_seconds(ms)/1000); \ - set_current_state(TASK_RUNNING); \ CERROR("obd_fail_timeout id %x awake\n", (id)); \ } \ _ret_; \ diff --git a/lustre/obdecho/echo.c b/lustre/obdecho/echo.c index 947ebfe..ec65a08 100644 --- a/lustre/obdecho/echo.c +++ b/lustre/obdecho/echo.c @@ -551,7 +551,6 @@ static int echo_cleanup(struct obd_device *obd) /* XXX Bug 3413; wait for a bit to ensure the BL callback has * happened before calling ldlm_namespace_free() */ - set_current_state (TASK_UNINTERRUPTIBLE); cfs_schedule_timeout (CFS_TASK_UNINT, cfs_time_seconds(1)); ldlm_namespace_free(obd->obd_namespace, NULL, obd->obd_force); -- 1.8.3.1