[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190807183434.GN136335@devbig004.ftw2.facebook.com>
Date: Wed, 7 Aug 2019 11:34:34 -0700
From: Tejun Heo <tj@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: axboe@...nel.dk, jack@...e.cz, hannes@...xchg.org,
mhocko@...nel.org, vdavydov.dev@...il.com, cgroups@...r.kernel.org,
linux-mm@...ck.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-team@...com, guro@...com
Subject: Re: [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
Powered by blists - more mailing lists