lkml.org 
[lkml]   [2019]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] writeback, memcg: Implement foreign dirty flushing
Hello,

On Tue, Aug 06, 2019 at 04:03:06PM -0700, Andrew Morton wrote:
> > + if (i < MEMCG_CGWB_FRN_CNT) {
> > + unsigned long update_intv =
> > + min_t(unsigned long, HZ,
> > + msecs_to_jiffies(dirty_expire_interval * 10) / 8);
>
> An explanation of what's going on here would be helpful.
>
> Why "* 1.25" and not, umm "* 1.24"?

Just because /8 is cheaper. It's likely that a fairly wide range of
numbers are okay for the above. I'll add some comment to explain that
and why the specific constants are picked.

> > +void mem_cgroup_flush_foreign(struct bdi_writeback *wb)
> > +{
> > + struct mem_cgroup *memcg = mem_cgroup_from_css(wb->memcg_css);
> > + unsigned long intv = msecs_to_jiffies(dirty_expire_interval * 10);
>
> Ditto.

This is just dirty expiration. If the dirty data has expired,
writeback must already be in progress by its bdi_wb, so there's no
reason to scheduler foreign writeback. Will add a comment.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2019-08-07 20:34    [W:7.612 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site