lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1314363069.11049.3.camel@twins>
Date:	Fri, 26 Aug 2011 14:51:09 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Wu Fengguang <fengguang.wu@...el.com>
Cc:	linux-fsdevel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jan Kara <jack@...e.cz>, Christoph Hellwig <hch@....de>,
	Dave Chinner <david@...morbit.com>,
	Greg Thelen <gthelen@...gle.com>,
	Minchan Kim <minchan.kim@...il.com>,
	Vivek Goyal <vgoyal@...hat.com>,
	Andrea Righi <arighi@...eler.com>,
	linux-mm <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 05/10] writeback: per task dirty rate limit

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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ