lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1255247080.11081.3.camel@twins>
Date:	Sun, 11 Oct 2009 09:44:40 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Wu Fengguang <fengguang.wu@...el.com>
Cc:	Jan Kara <jack@...e.cz>, Andrew Morton <akpm@...ux-foundation.org>,
	Theodore Tso <tytso@....edu>,
	Christoph Hellwig <hch@...radead.org>,
	Dave Chinner <david@...morbit.com>,
	Chris Mason <chris.mason@...cle.com>,
	"Li, Shaohua" <shaohua.li@...el.com>,
	Myklebust Trond <Trond.Myklebust@...app.com>,
	"jens.axboe@...cle.com" <jens.axboe@...cle.com>,
	Nick Piggin <npiggin@...e.de>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	Richard Kennedy <richard@....demon.co.uk>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 01/45] writeback: reduce calls to global_page_state in
 balance_dirty_pages()

On Sun, 2009-10-11 at 10:28 +0800, Wu Fengguang wrote:
> 
> Note that the total limit check itself may not be sufficient. For
> example, there are no nr_writeback limit for NFS (and maybe btrfs)
> after removing the congestion waits.  Therefore it is very possible
> 
>         nr_writeback => dirty_thresh
>         nr_dirty     => 0
> 
> which is obviously undesirable: everything newly dirtied are soon put
> to writeback. It violates the 30s expire time and the background
> threshold rules, and will hurt write-and-truncate operations (ie. temp
> files).
> 
> So the better solution would be to impose a nr_writeback limit for
> every filesystem that didn't already have one (the block io queue).
> NFS used to have that limit with congestion_wait, but now we need
> to do a wait queue for it.
> 
> With the nr_writeback wait queue, it can be guaranteed that once
> balance_dirty_pages() asks for writing 1500 pages, it will be done
> with necessary sleeping in the bdi flush thread. So we can safely
> remove the loop and double checking of global dirty limit in
> balance_dirty_pages().

nr_reclaim = nr_dirty + nr_writeback + nr_unstable, so anything calling
into balance_dirty_pages() would still block on seeing such large
amounts of nr_writeback.

Having the constraint nr_dirty + nr_writeback + nr_unstable <
dirty_thresh should ensure we never have nr_writeback > dirty_thresh,
simply because you cannot dirty more, which then cannot be converted to
more writeback.

Or am I missing something?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ