lkml.org 
[lkml]   [2010]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] memcg: dirty pages instrumentation
    On Sun, Feb 21, 2010 at 04:18:45PM +0100, Andrea Righi wrote:

    [..]
    > diff --git a/mm/page-writeback.c b/mm/page-writeback.c
    > index 0b19943..c9ff1cd 100644
    > --- a/mm/page-writeback.c
    > +++ b/mm/page-writeback.c
    > @@ -137,10 +137,11 @@ static struct prop_descriptor vm_dirties;
    > */
    > static int calc_period_shift(void)
    > {
    > - unsigned long dirty_total;
    > + unsigned long dirty_total, dirty_bytes;
    >
    > - if (vm_dirty_bytes)
    > - dirty_total = vm_dirty_bytes / PAGE_SIZE;
    > + dirty_bytes = mem_cgroup_dirty_bytes();
    > + if (dirty_bytes)
    > + dirty_total = dirty_bytes / PAGE_SIZE;
    > else
    > dirty_total = (vm_dirty_ratio * determine_dirtyable_memory()) /
    > 100;

    Ok, I don't understand this so I better ask. Can you explain a bit how memory
    cgroup dirty ratio is going to play with per BDI dirty proportion thing.

    Currently we seem to be calculating per BDI proportion (based on recently
    completed events), of system wide dirty ratio and decide whether a process
    should be throttled or not.

    Because throttling decision is also based on BDI and its proportion, how
    are we going to fit it with mem cgroup? Is it going to be BDI proportion
    of dirty memory with-in memory cgroup (and not system wide)?

    Thanks
    Vivek


    \
     
     \ /
      Last update: 2010-02-23 22:33    [W:2.299 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site