lkml.org 
[lkml]   [2011]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 4/5] writeback: per task dirty rate limit
    From
    Date
    On Mon, 2011-08-08 at 22:23 +0800, Wu Fengguang wrote:
    > + preempt_disable();
    > + p = &__get_cpu_var(dirty_leaks);

    p = &get_cpu_var(dirty_leaks);

    > + if (*p > 0 && current->nr_dirtied < ratelimit) {
    > + nr_pages_dirtied = min(*p, ratelimit - current->nr_dirtied);
    > + *p -= nr_pages_dirtied;
    > + current->nr_dirtied += nr_pages_dirtied;
    > + }
    > + preempt_enable();

    put_cpu_var(dirty_leads);


    \
     
     \ /
      Last update: 2011-08-08 16:29    [W:4.162 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site