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]
Date:	Thu, 5 May 2011 22:06:09 +0800
From:	Wu Fengguang <fengguang.wu@...el.com>
To:	Jan Kara <jack@...e.cz>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Dave Chinner <david@...morbit.com>,
	Christoph Hellwig <hch@....de>,
	LKML <linux-kernel@...r.kernel.org>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 1/3] writeback: introduce wbc.tagged_sync for the
 WB_SYNC_NONE sync stage

On Thu, May 05, 2011 at 09:55:08PM +0800, Jan Kara wrote:
> On Thu 05-05-11 20:14:02, Wu Fengguang wrote:
> > On Thu, May 05, 2011 at 05:00:59AM +0800, Jan Kara wrote:
> > > On Mon 02-05-11 11:17:51, Wu Fengguang wrote:
> > > > sync(2) is performed in two stages: the WB_SYNC_NONE sync and the
> > > > WB_SYNC_ALL sync. Tag the first stage with wbc.tagged_sync and do
> > > > livelock prevention for it, too.
> > > > 
> > > > Note that writeback_inodes_sb() is called by not only sync(), they are
> > > > treated the same because the other callers need also need livelock
> > > > prevention.
> > >   I was thinking about this and could not find any - which other callers
> > > of writeback_inodes_sb() need the livelock prevention?
> > 
> > For example, the writeback_inodes_sb_if_idle() call from ext4.
> > In general anyone that pass get_nr_dirty_pages() as work->nr_pages
> > may be highly over-estimating the work set.
>   OK, I see what you mean. I agree using tagging in these cases probably
> makes sense.
> 
> > It won't be directly livelocked since ext4 won't wait for completion,
> > however there is possibility the works queued behind are delayed and
> > livelocked.
>   Actually it will, writeback_inodes_sb() waits for completion (because of
> s_umount locking). ext4 should use writeback_inodes_sb_if_idle_nr() (with
> some relatively small number) anyway to avoid the pauses.

Ah yes!

> > Ideally simple ->nr_pages works should be given lower priority and
> > even may be merged with each other, and that would be future work.
>   Merging works wanting to do the same thing would be nice. I though about
> it some time ago for a while but getting all the combinations right and
> making the merging code resonably simple was hard so I postponed it for
> later because it was not urgent.

Agreed.

Thanks,
Fengguang
--
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