linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@suse.de>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>,
	Linux-FSDevel <linux-fsdevel@vger.kernel.org>,
	Jens Axboe <axboe@kernel.dk>, Jeff Moyer <jmoyer@redhat.com>,
	Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH 5/6] mm: page_alloc: Reduce cost of dirty zone balancing
Date: Thu, 26 Jun 2014 15:56:32 +0100	[thread overview]
Message-ID: <20140626145632.GG10819@suse.de> (raw)
In-Reply-To: <20140626143738.GS7331@cmpxchg.org>

On Thu, Jun 26, 2014 at 10:37:38AM -0400, Johannes Weiner wrote:
> On Thu, Jun 26, 2014 at 09:43:14AM +0100, Mel Gorman wrote:
> > On Wed, Jun 25, 2014 at 04:35:28PM -0700, Andrew Morton wrote:
> > > On Wed, 25 Jun 2014 08:58:48 +0100 Mel Gorman <mgorman@suse.de> wrote:
> > > 
> > > > @@ -325,7 +321,14 @@ static unsigned long zone_dirty_limit(struct zone *zone)
> > > >   */
> > > >  bool zone_dirty_ok(struct zone *zone)
> > > >  {
> > > > -	unsigned long limit = zone_dirty_limit(zone);
> > > > +	unsigned long limit = zone->dirty_limit_cached;
> > > > +	struct task_struct *tsk = current;
> > > > +
> > > > +	if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) {
> > > > +		limit = zone_dirty_limit(zone);
> > > > +		zone->dirty_limit_cached = limit;
> > > > +		limit += limit / 4;
> > > > +	}
> > > 
> > > Could we get a comment in here explaining what we're doing and why
> > > PF_LESS_THROTTLE and rt_task control whether we do it?
> > > 
> > 
> >         /*
> >          * The dirty limits are lifted by 1/4 for PF_LESS_THROTTLE (ie. nfsd)
> >          * and real-time tasks to prioritise their allocations.
> >          * PF_LESS_THROTTLE tasks may be cleaning memory and rt tasks may be
> >          * blocking tasks that can clean pages.
> >          */
> > 
> > That's fairly weak though. It would also seem reasonable to just delete
> > this check and allow PF_LESS_THROTTLE and rt_tasks to fall into the slow
> > path if dirty pages are already fairly distributed between zones.
> > Johannes, any objection to that limit raising logic being deleted?
> 
> I copied that over from global_dirty_limits() such that the big
> picture and the per-zone picture have the same view - otherwise these
> tasks fall back to first fit zone allocations before global limits
> start throttling dirtiers and waking up the flushers.  This increases
> the probability of reclaim running into dirty pages.
> 
> Would you remove it from global_dirty_limits() as well?
> 
> On that note, I don't really understand why global_dirty_limits()
> raises the *background* limit for less-throttle/rt tasks, shouldn't it
> only raise the dirty limit?  Sure, the throttle point is somewhere
> between the two limits, but we don't really want to defer waking up
> the flushers for them.

All of which is fair enough and is something that should be examined on
a rainy day (shouldn't take too long in Ireland). I'm not going to touch
it within this series though. It's outside the scope of what I'm trying
to do here -- restore performance of tiobench and bonnie++ to as close to
3.0 levels as possible. The series is tripping up enough on the fair zone
and CFQ aspects as it is without increasing the scope :(

-- 
Mel Gorman
SUSE Labs

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2014-06-26 14:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25  7:58 [PATCH 0/6] Improve sequential read throughput v2 Mel Gorman
2014-06-25  7:58 ` [PATCH 1/6] mm: pagemap: Avoid unnecessary overhead when tracepoints are deactivated Mel Gorman
2014-06-25  7:58 ` [PATCH 2/6] mm: Rearrange zone fields into read-only, page alloc, statistics and page reclaim lines Mel Gorman
2014-06-25  7:58 ` [PATCH 3/6] mm: vmscan: Do not reclaim from lower zones if they are balanced Mel Gorman
2014-06-25 23:32   ` Andrew Morton
2014-06-26 10:17     ` Mel Gorman
2014-06-25  7:58 ` [PATCH 4/6] mm: page_alloc: Reduce cost of the fair zone allocation policy Mel Gorman
2014-06-25  7:58 ` [PATCH 5/6] mm: page_alloc: Reduce cost of dirty zone balancing Mel Gorman
2014-06-25 23:35   ` Andrew Morton
2014-06-26  8:43     ` Mel Gorman
2014-06-26 14:37       ` Johannes Weiner
2014-06-26 14:56         ` Mel Gorman [this message]
2014-06-26 15:11           ` Johannes Weiner
2014-06-25  7:58 ` [PATCH 6/6] cfq: Increase default value of target_latency Mel Gorman
2014-06-26 15:36   ` Jeff Moyer
2014-06-26 16:19     ` Mel Gorman
2014-06-26 16:50       ` Jeff Moyer
2014-06-26 17:45         ` Mel Gorman
2014-06-26 18:04           ` Jeff Moyer

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=20140626145632.GG10819@suse.de \
    --to=mgorman@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=david@fromorbit.com \
    --cc=hannes@cmpxchg.org \
    --cc=jmoyer@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).