Re: [PATCH 5/6] mm: page_alloc: Reduce cost of dirty zone balancing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx> 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?

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]