[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081003145029.GE18542@agk.fab.redhat.com>
Date: Fri, 3 Oct 2008 15:50:29 +0100
From: Alasdair G Kergon <agk@...hat.com>
To: Mikulas Patocka <mpatocka@...hat.com>
Cc: Nick Piggin <nickpiggin@...oo.com.au>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, agk@...hat.com, mbroz@...hat.com,
chris@...chsys.com
Subject: Re: [PATCH] Memory management livelock
On Fri, Oct 03, 2008 at 09:50:17AM -0400, Mikulas Patocka wrote:
> > > LVM does (that is where the bug was discovered). Basically, it scans all
> > > the block devices with direct IO and if someone else does buffered IO on
> > > any device simultaneously, it locks up.
> > Scans all block devices with direct IO? Hmm, why, I wonder? Should
> > really consider using buffered (posix_fadvise to readahead/dropbehind).
> LVM must not allocate any memory when doing IO because it suspends the
> block device and memory allocation could trigger writeback on the
> suspended device and deadlock.
> So it preallocates heap and stack, mlockall()s itself and does direct IO.
True, but unrelated to the scanning, which LVM performs *prior* to
entering such a state.
We use direct IO while scanning because it's essential all nodes in a
cluster see the same updated version of the data after any node updated
it.
Alasdair
--
agk@...hat.com
--
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