From: Venki Pallipadi <venkatesh.pallipadi@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Venki Pallipadi <venkatesh.pallipadi@intel.com>,
Oleg Nesterov <oleg@tv-sign.ru>,
linux-kernel <linux-kernel@vger.kernel.org>,
davej@codemonkey.org.uk, johnstul@us.ibm.com, mingo@elte.hu,
tglx@linutronix.de, Andi Kleen <ak@suse.de>
Subject: Re: [PATCH] Add support for deferrable timers (respun-Mar28)
Date: Wed, 28 Mar 2007 17:59:53 -0700 [thread overview]
Message-ID: <20070329005953.GA8764@linux-os.sc.intel.com> (raw)
In-Reply-To: <20070328170159.7fc8c289.akpm@linux-foundation.org>
On Wed, Mar 28, 2007 at 05:01:59PM -0700, Andrew Morton wrote:
> On Wed, 28 Mar 2007 16:00:21 -0700
> Venki Pallipadi <venkatesh.pallipadi@intel.com> wrote:
>
> > Please drop the patch you included yesterday and two incremental patches and
> > use the patch below.
>
> As you saw, I went and turned it into an incremental patch again. It makes
> it easier to see what changed, but harder to see the whole thing.
>
> > Introduce a new flag for timers - deferrable:
>
> OK, but there's nothing in-kernel whcih actually uses this.
>
> It would be good to identify some timer users which can be switched over (as
> many as possible, really) so this thing actually gets some runtime testing.
ondemand is the biggest offender and the patch below reduces the number of
interrupts by 50% or more (depending on HZ) on different test systems here.
Yes. There are quite a few other timers inside kernel that can be
migrated. I will use timer_stats and track others and send in the patches
soon.
Thanks,
Venki
------
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-28 10:03:21.000000000 -0800
+++ new/drivers/cpufreq/cpufreq_ondemand.c 2007-03-28 10:05:44.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_DEFERRABLE(&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-28 10:03:21.000000000 -0800
+++ new/include/linux/workqueue.h 2007-03-28 10:05:44.000000000 -0800
@@ -89,6 +89,12 @@
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
next prev parent reply other threads:[~2007-03-29 1:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200703212353.l2LNrNOj007453@shell0.pdx.osdl.net>
[not found] ` <20070322140532.GA120@tv-sign.ru>
[not found] ` <20070322151817.GA29840@linux-os.sc.intel.com>
[not found] ` <20070322161355.GA160@tv-sign.ru>
2007-03-27 20:43 ` [PATCH] Add support for deferrable timers (respun) Venki Pallipadi
2007-03-27 21:11 ` Oleg Nesterov
2007-03-27 21:55 ` Venki Pallipadi
2007-03-27 22:22 ` Oleg Nesterov
2007-03-27 22:28 ` Oleg Nesterov
2007-03-27 22:36 ` Venki Pallipadi
2007-03-28 23:00 ` [PATCH] Add support for deferrable timers (respun-Mar28) Venki Pallipadi
2007-03-29 0:01 ` Andrew Morton
2007-03-29 0:59 ` Venki Pallipadi [this message]
2007-03-29 11:41 ` Andi Kleen
2007-03-29 11:51 ` Kyle Moffett
2007-03-29 11:58 ` Andi Kleen
2007-03-28 11:06 ` [PATCH] Add support for deferrable timers (respun) Andi Kleen
2007-03-28 16:42 ` Venki Pallipadi
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=20070329005953.GA8764@linux-os.sc.intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=davej@codemonkey.org.uk \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@tv-sign.ru \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox