From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: linux-fsdevel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@lst.de>,
Dave Chinner <david@fromorbit.com>,
Greg Thelen <gthelen@google.com>,
Minchan Kim <minchan.kim@gmail.com>,
Vivek Goyal <vgoyal@redhat.com>,
Andrea Righi <arighi@develer.com>, linux-mm <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 05/10] writeback: per task dirty rate limit
Date: Fri, 26 Aug 2011 14:51:09 +0200 [thread overview]
Message-ID: <1314363069.11049.3.camel@twins> (raw)
In-Reply-To: <20110826114619.268843347@intel.com>
On Fri, 2011-08-26 at 19:38 +0800, Wu Fengguang wrote:
> + preempt_disable();
> /*
> - * Check the rate limiting. Also, we do not want to throttle real-time
> - * tasks in balance_dirty_pages(). Period.
> + * This prevents one CPU to accumulate too many dirtied pages without
> + * calling into balance_dirty_pages(), which can happen when there are
> + * 1000+ tasks, all of them start dirtying pages at exactly the same
> + * time, hence all honoured too large initial task->nr_dirtied_pause.
> */
> - preempt_disable();
> p = &__get_cpu_var(bdp_ratelimits);
p = &get_cpu_var(bdp_ratelimits);
> - *p += nr_pages_dirtied;
> - if (unlikely(*p >= ratelimit)) {
> - ratelimit = sync_writeback_pages(*p);
> + if (unlikely(current->nr_dirtied >= ratelimit))
> *p = 0;
> - preempt_enable();
> - balance_dirty_pages(mapping, ratelimit);
> - return;
> + else {
> + *p += nr_pages_dirtied;
> + if (unlikely(*p >= ratelimit_pages)) {
> + *p = 0;
> + ratelimit = 0;
> + }
> }
> preempt_enable();
put_cpu_var(bdp_ratelimits);
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: linux-fsdevel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@lst.de>,
Dave Chinner <david@fromorbit.com>,
Greg Thelen <gthelen@google.com>,
Minchan Kim <minchan.kim@gmail.com>,
Vivek Goyal <vgoyal@redhat.com>,
Andrea Righi <arighi@develer.com>, linux-mm <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 05/10] writeback: per task dirty rate limit
Date: Fri, 26 Aug 2011 14:51:09 +0200 [thread overview]
Message-ID: <1314363069.11049.3.camel@twins> (raw)
In-Reply-To: <20110826114619.268843347@intel.com>
On Fri, 2011-08-26 at 19:38 +0800, Wu Fengguang wrote:
> + preempt_disable();
> /*
> - * Check the rate limiting. Also, we do not want to throttle real-time
> - * tasks in balance_dirty_pages(). Period.
> + * This prevents one CPU to accumulate too many dirtied pages without
> + * calling into balance_dirty_pages(), which can happen when there are
> + * 1000+ tasks, all of them start dirtying pages at exactly the same
> + * time, hence all honoured too large initial task->nr_dirtied_pause.
> */
> - preempt_disable();
> p = &__get_cpu_var(bdp_ratelimits);
p = &get_cpu_var(bdp_ratelimits);
> - *p += nr_pages_dirtied;
> - if (unlikely(*p >= ratelimit)) {
> - ratelimit = sync_writeback_pages(*p);
> + if (unlikely(current->nr_dirtied >= ratelimit))
> *p = 0;
> - preempt_enable();
> - balance_dirty_pages(mapping, ratelimit);
> - return;
> + else {
> + *p += nr_pages_dirtied;
> + if (unlikely(*p >= ratelimit_pages)) {
> + *p = 0;
> + ratelimit = 0;
> + }
> }
> preempt_enable();
put_cpu_var(bdp_ratelimits);
--
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:[~2011-08-26 12:51 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 11:38 [PATCH 00/10] IO-less dirty throttling v10 Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` [PATCH 01/10] writeback: account per-bdi accumulated dirtied pages Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` [PATCH 02/10] writeback: dirty position control Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` [PATCH 03/10] writeback: dirty rate control Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` [PATCH 04/10] writeback: stabilize bdi->dirty_ratelimit Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` [PATCH 05/10] writeback: per task dirty rate limit Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 12:51 ` Peter Zijlstra [this message]
2011-08-26 12:51 ` Peter Zijlstra
2011-08-26 12:59 ` Wu Fengguang
2011-08-26 12:59 ` Wu Fengguang
2011-08-26 11:38 ` [PATCH 06/10] writeback: IO-less balance_dirty_pages() Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` [PATCH 07/10] writeback: dirty ratelimit - think time compensation Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 12:05 ` Wu Fengguang
2011-08-26 12:05 ` Wu Fengguang
2011-08-26 11:38 ` [PATCH 08/10] writeback: trace balance_dirty_pages Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 12:07 ` Wu Fengguang
2011-08-26 12:07 ` Wu Fengguang
2011-08-26 11:38 ` [PATCH 09/10] writeback: trace dirty_ratelimit Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` [PATCH 10/10] trace task_io Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
2011-08-26 11:38 ` Wu Fengguang
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=1314363069.11049.3.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=arighi@develer.com \
--cc=david@fromorbit.com \
--cc=fengguang.wu@intel.com \
--cc=gthelen@google.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
--cc=vgoyal@redhat.com \
/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.