From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [Lsf] [RFC] writeback and cgroup Date: Sat, 14 Apr 2012 14:15:16 +0200 Message-ID: <1334405716.2528.88.camel__25107.5016953566$1334405736$gmane$org@twins> References: <20120403183655.GA23106@dhcp-172-17-108-109.mtv.corp.google.com> <20120404145134.GC12676@redhat.com> <20120404184909.GB29686@dhcp-172-17-108-109.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Steve French Cc: ctalbott-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, rni-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, andrea-oIIqvOZpAevzfdHfmsDf5w@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, lsf-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, jmoyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Tejun Heo , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: containers.vger.kernel.org On Wed, 2012-04-04 at 14:23 -0500, Steve French wrote: > Current use of bdi is a little hard to understand since > there are 25+ fields in the structure. Filesystems only need a small fraction of those. In particular, backing_dev_info::name -- string backing_dev_info::ra_pages -- number of read-ahead-pages backing_dev_info::capability -- see BDI_CAP_* One should properly initialize/destroy the thing using: bdi_init()/bdi_destroy() Furthermore, it has hooks into the regular page-writeback stuff: test_{set,clear}_page_writeback()/bdi_writeout_inc() set_page_dirty()/account_page_dirtied() but also allows filesystems to do custom stuff, see FUSE for example. The only other bit is the pressure valve, aka. {set,clear}_bdi_congested(). Which really is rather broken and of dubious value.