Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=28287033e12463c8ff89f1ea8038783d0360391c
Commit:     28287033e12463c8ff89f1ea8038783d0360391c
Parent:     6e453a67510a17f01b63835f18569e8c3939a38c
Author:     Venki Pallipadi <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 00:27:47 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue May 8 11:15:05 2007 -0700

    Add a new deferrable delayed work init
    
    Add a new deferrable delayed work init.  This can be used to schedule work
    that are 'unimportant' when CPU is idle and can be called later, when CPU
    eventually comes out of idle.
    
    Use this init in cpufreq ondemand governor.
    
    Signed-off-by: Venkatesh Pallipadi <[EMAIL PROTECTED]>
    Cc: Dave Jones <[EMAIL PROTECTED]>
    Cc: Oleg Nesterov <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/cpufreq/cpufreq_ondemand.c |    2 +-
 include/linux/workqueue.h          |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/cpufreq/cpufreq_ondemand.c 
b/drivers/cpufreq/cpufreq_ondemand.c
index 8d053f5..8532bb7 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -470,7 +470,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s 
*dbs_info)
        dbs_info->enable = 1;
        ondemand_powersave_bias_init();
        dbs_info->sample_type = DBS_NORMAL_SAMPLE;
-       INIT_DELAYED_WORK(&dbs_info->work, do_dbs_timer);
+       INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer);
        queue_delayed_work_on(dbs_info->cpu, kondemand_wq, &dbs_info->work,
                              delay);
 }
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index b8abfc7..f16ba1e 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -121,6 +121,12 @@ struct execute_work {
                init_timer(&(_work)->timer);                    \
        } while (0)
 
+#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func)                     \
+       do {                                                    \
+               INIT_WORK(&(_work)->work, (_func));             \
+               init_timer_deferrable(&(_work)->timer);         \
+       } while (0)
+
 /**
  * work_pending - Find out whether a work item is currently pending
  * @work: The work item in question
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to