Re: [PATCH 05/10] writeback: per task dirty rate limit

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

 



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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux