From: Peter Zijlstra <peterz@infradead.org>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: Jan Kara <jack@suse.cz>, linux-mm@kvack.org
Subject: Re: [PATCH 2/2] block: Convert BDI proportion calculations to flexible proportions
Date: Mon, 07 May 2012 17:21:07 +0200 [thread overview]
Message-ID: <1336404067.27020.67.camel@laptop> (raw)
In-Reply-To: <20120507144715.GB13983@localhost>
On Mon, 2012-05-07 at 22:47 +0800, Fengguang Wu wrote:
> On Fri, May 04, 2012 at 12:39:20AM +0200, Jan Kara wrote:
> > Convert calculations of proportion of writeback each bdi does to new flexible
> > proportion code. That allows us to use aging period of fixed wallclock time
> > which gives better proportion estimates given the hugely varying throughput of
> > different devices.
> >
> > Signed-off-by: Jan Kara <jack@suse.cz>
> > ---
> > include/linux/backing-dev.h | 6 ++--
> > mm/backing-dev.c | 5 +--
> > mm/page-writeback.c | 80 ++++++++++++++++++++----------------------
> > 3 files changed, 43 insertions(+), 48 deletions(-)
>
> > +static void vm_completions_period(struct work_struct *work);
> > +/* Work for aging of vm_completions */
> > +static DECLARE_DEFERRED_WORK(vm_completions_period_work, vm_completions_period);
>
> > +
> > +static void vm_completions_period(struct work_struct *work)
> > +{
> > + fprop_new_period(&vm_completions);
> > + schedule_delayed_work(&vm_completions_period_work,
> > + VM_COMPLETIONS_PERIOD_LEN);
> > +}
> > +
>
> Is it possible to optimize away the periodic work when there are no
> disk writes?
That should really be a timer, nothing in there requires scheduling so
the entire addition of the workqueue muck is pure overhead.
You could keep a second period counter that tracks the last observed
period and whenever the period and last_observed_period are further
apart than BITS_PER_LONG you can stop the timer.
You'll have to restart it when updating last_observed_period.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-05-07 15:21 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 22:39 [PATCH 0/2 v2] Flexible proportions for BDIs Jan Kara
2012-05-03 22:39 ` [PATCH 1/2] lib: Proportions with flexible period Jan Kara
2012-05-03 22:39 ` [PATCH 2/2] block: Convert BDI proportion calculations to flexible proportions Jan Kara
2012-05-07 14:47 ` Fengguang Wu
2012-05-07 15:21 ` Peter Zijlstra [this message]
2012-05-09 11:38 ` Jan Kara
2012-05-07 14:43 ` [PATCH 0/2 v2] Flexible proportions for BDIs Fengguang Wu
2012-05-09 11:37 ` Jan Kara
2012-05-10 7:31 ` Fengguang Wu
2012-05-11 14:51 ` Fengguang Wu
2012-05-13 3:29 ` Fengguang Wu
2012-05-14 21:28 ` Jan Kara
2012-05-15 11:12 ` Peter Zijlstra
2012-05-15 15:14 ` Jan Kara
2012-05-15 13:15 ` Fengguang Wu
2012-05-14 21:12 ` Jan Kara
2012-05-15 15:43 [PATCH 0/2 v3] Flexible proportions Jan Kara
2012-05-15 15:43 ` [PATCH 2/2] block: Convert BDI proportion calculations to flexible proportions Jan Kara
2012-05-17 22:04 ` Peter Zijlstra
2012-05-18 14:24 ` Jan Kara
2012-05-18 14:34 ` Peter Zijlstra
2012-05-24 16:59 [PATCH 0/2 v4] Flexible proportions Jan Kara
2012-05-24 16:59 ` [PATCH 2/2] block: Convert BDI proportion calculations to flexible proportions Jan Kara
2012-05-28 15:49 ` Sasha Levin
2012-05-29 12:34 ` Jan Kara
2012-05-29 12:38 ` Peter Zijlstra
2012-05-29 12:54 ` Jan Kara
2012-05-31 22:11 ` Jan Kara
2012-05-31 22:26 ` Peter Zijlstra
2012-05-31 22:42 ` Jan Kara
2012-06-01 3:10 ` Fengguang Wu
2012-06-01 10:13 ` Peter Zijlstra
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=1336404067.27020.67.camel@laptop \
--to=peterz@infradead.org \
--cc=fengguang.wu@intel.com \
--cc=jack@suse.cz \
--cc=linux-mm@kvack.org \
/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