Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1175644 > unrolled thread

Re: [PATCH 26/51] writeback: let balance_dirty_pages() work on the matching cgroup bdi_writeback

Started byTejun Heo <tj@kernel.org>
First post2015-07-02 03:30 +0200
Last post2015-07-02 03:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 26/51] writeback: let balance_dirty_pages() work on the  matching cgroup bdi_writeback Tejun Heo <tj@kernel.org> - 2015-07-02 03:30 +0200

#1175644 — Re: [PATCH 26/51] writeback: let balance_dirty_pages() work on the matching cgroup bdi_writeback

FromTejun Heo <tj@kernel.org>
Date2015-07-02 03:30 +0200
SubjectRe: [PATCH 26/51] writeback: let balance_dirty_pages() work on the matching cgroup bdi_writeback
Message-ID<pHBu9-4re-7@gated-at.bofh.it>
Hello, Jan.

On Tue, Jun 30, 2015 at 04:31:00PM +0200, Jan Kara wrote:
...
> > +	if (inode_cgwb_enabled(inode))
> > +		wb = wb_get_create_current(bdi, GFP_KERNEL);
> > +	if (!wb)
> > +		wb = &bdi->wb;
> > +
> 
> So this effectively adds a radix tree lookup (of wb belonging to memcg) for
> every set_page_dirty() call. That seems relatively costly to me. And all

Hmmm... idk, radix tree lookups should be cheap especially when
shallow and set_page_dirty().  It's a glorified array indexing.  If
not, we should really be improving radix tree implementation.  That
said,

> that just to check wb->dirty_exceeded. Cannot we just use inode_to_wb()
> instead? I understand results may be different if multiple memcgs share an
> inode and that's the reason why you use wb_get_create_current(), right?
> But for dirty_exceeded check it may be good enough?

Yeah, that probably should work.  I'll think more about it.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web