From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Dave Jones <davej@redhat.com>,
tglx@linutronix.de
Subject: [PATCH 2/2] Export deferrable timer through workqueue and use it in ondemand governor
Date: Wed, 21 Mar 2007 13:23:40 -0700 [thread overview]
Message-ID: <20070321202339.GB29367@linux-os.sc.intel.com> (raw)
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@intel.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)); \
next reply other threads:[~2007-03-21 20:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 20:23 Venkatesh Pallipadi [this message]
2007-03-21 22:04 ` [PATCH 2/2] Export deferrable timer through workqueue and use it in ondemand governor Dave Jones
2007-03-21 22:19 ` Venki Pallipadi
2007-03-21 22:29 ` Dave Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070321202339.GB29367@linux-os.sc.intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=akpm@osdl.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.