[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070321202339.GB29367@linux-os.sc.intel.com>
Date: Wed, 21 Mar 2007 13:23:40 -0700
From: Venkatesh Pallipadi <venkatesh.pallipadi@...el.com>
To: Andrew Morton <akpm@...l.org>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
Dave Jones <davej@...hat.com>, tglx@...utronix.de
Subject: [PATCH 2/2] Export deferrable timer through workqueue and use it in ondemand governor
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 <venkatesh.pallipadi@...el.com>
Index: new/drivers/cpufreq/cpufreq_ondemand.c
===================================================================
--- new.orig/drivers/cpufreq/cpufreq_ondemand.c 2007-03-21 09:16:52.000000000 -0800
+++ new/drivers/cpufreq/cpufreq_ondemand.c 2007-03-21 09:18:08.000000000 -0800
@@ -470,7 +470,7 @@
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_DEF(&dbs_info->work, do_dbs_timer);
queue_delayed_work_on(dbs_info->cpu, kondemand_wq, &dbs_info->work,
delay);
}
Index: new/include/linux/workqueue.h
===================================================================
--- new.orig/include/linux/workqueue.h 2007-03-21 09:16:52.000000000 -0800
+++ new/include/linux/workqueue.h 2007-03-21 09:18:08.000000000 -0800
@@ -115,6 +115,12 @@
init_timer(&(_work)->timer); \
} while (0)
+#define INIT_DELAYED_WORK_DEF(_work, _func) \
+ do { \
+ INIT_WORK(&(_work)->work, (_func)); \
+ init_timer_deferrable(&(_work)->timer); \
+ } while (0)
+
#define INIT_DELAYED_WORK_NAR(_work, _func) \
do { \
INIT_WORK_NAR(&(_work)->work, (_func)); \
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists