Re: [PATCH] Memory management livelock

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nick Piggin
Date: Thursday, October 2, 2008 - 7:54 pm

On Friday 03 October 2008 12:32, Nick Piggin wrote:

OK, I have been able to reproduce it somewhat. It is not a livelock,
but what is happening is that direct IO read basically does an fsync
on the file before performing the IO. The fsync gets stuck behind the
dd that is dirtying the pages, and ends up following behind it and
doing all its IO for it.

The following patch avoids the issue for direct IO, by using the range
syncs rather than trying to sync the whole file.

The underlying problem I guess is unchanged. Is it really a problem,
though? The way I'd love to solve it is actually by adding another bit
or two to the pagecache radix tree,  that can be used to transiently tag
the tree for future operations. That way we could record the dirty and
writeback pages up front, and then only bother with operating on them.

That's *if* it really is a problem. I don't have much pity for someone
doing buffered IO and direct IO to the same pages of the same file :)
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Memory management livelock, Mikulas Patocka, (Mon Sep 22, 2:10 pm)
Re: [PATCH] Memory management livelock, Andrew Morton, (Mon Sep 22, 5:48 pm)
Re: [PATCH] Memory management livelock, Mikulas Patocka, (Tue Sep 23, 3:34 pm)
Re: [PATCH] Memory management livelock, Andrew Morton, (Tue Sep 23, 3:49 pm)
Re: [PATCH] Memory management livelock, Mikulas Patocka, (Tue Sep 23, 4:11 pm)
Re: [PATCH] Memory management livelock, Andrew Morton, (Tue Sep 23, 4:46 pm)
Re: [PATCH] Memory management livelock, Mikulas Patocka, (Wed Sep 24, 11:50 am)
[PATCH 1/3] Memory management livelock, Mikulas Patocka, (Wed Sep 24, 11:51 am)
[PATCH 2/3] Memory management livelock, Mikulas Patocka, (Wed Sep 24, 11:52 am)
[PATCH 3/3] Memory management livelock, Mikulas Patocka, (Wed Sep 24, 11:53 am)
Re: [PATCH 2/3] Memory management livelock, Andrew Morton, (Wed Oct 1, 10:54 pm)
Re: [PATCH] Memory management livelock, Nick Piggin, (Thu Oct 2, 7:32 pm)
Re: [PATCH] Memory management livelock, Andrew Morton, (Thu Oct 2, 7:40 pm)
Re: [PATCH] Memory management livelock, Nick Piggin, (Thu Oct 2, 7:54 pm)
Re: [PATCH] Memory management livelock, Nick Piggin, (Thu Oct 2, 7:59 pm)
Re: [PATCH] Memory management livelock, Andrew Morton, (Thu Oct 2, 8:14 pm)
Re: [PATCH] Memory management livelock, Nick Piggin, (Thu Oct 2, 8:47 pm)
Re: [PATCH] Memory management livelock, Andrew Morton, (Thu Oct 2, 8:56 pm)
Re: [PATCH] Memory management livelock, Nick Piggin, (Thu Oct 2, 9:07 pm)
Re: [PATCH] Memory management livelock, Andrew Morton, (Thu Oct 2, 9:17 pm)
Re: [PATCH] Memory management livelock, Nick Piggin, (Thu Oct 2, 9:29 pm)
Re: [PATCH] Memory management livelock, Mikulas Patocka, (Fri Oct 3, 4:26 am)
Re: [PATCH] Memory management livelock, Mikulas Patocka, (Fri Oct 3, 4:43 am)
Re: [PATCH] Memory management livelock, Nick Piggin, (Fri Oct 3, 5:27 am)
Re: [PATCH] Memory management livelock, Nick Piggin, (Fri Oct 3, 5:31 am)
Re: [PATCH] Memory management livelock, Mikulas Patocka, (Fri Oct 3, 6:50 am)
Re: [PATCH] Memory management livelock, Mikulas Patocka, (Fri Oct 3, 6:53 am)
Re: [PATCH] Memory management livelock, Alasdair G Kergon, (Fri Oct 3, 7:36 am)
Re: [PATCH] Memory management livelock, Alasdair G Kergon, (Fri Oct 3, 7:50 am)
[PATCH 1/3] bit mutexes, Mikulas Patocka, (Sun Oct 5, 3:14 pm)
[PATCH 2/3] Fix fsync livelock, Mikulas Patocka, (Sun Oct 5, 3:14 pm)
[PATCH 3/3] Fix fsync-vs-write misbehavior, Mikulas Patocka, (Sun Oct 5, 3:16 pm)
Re: [PATCH 2/3] Fix fsync livelock, Arjan van de Ven, (Sun Oct 5, 3:33 pm)
Re: [PATCH 2/3] Fix fsync livelock, Mikulas Patocka, (Sun Oct 5, 4:02 pm)
Re: [PATCH 2/3] Fix fsync livelock, Arjan van de Ven, (Sun Oct 5, 4:07 pm)
Re: [PATCH 2/3] Fix fsync livelock, Mikulas Patocka, (Sun Oct 5, 4:18 pm)
Re: [PATCH 2/3] Fix fsync livelock, Arjan van de Ven, (Sun Oct 5, 4:28 pm)
Re: [PATCH 2/3] Fix fsync livelock, Mikulas Patocka, (Sun Oct 5, 5:01 pm)
Re: [PATCH 2/3] Fix fsync livelock, Arjan van de Ven, (Sun Oct 5, 5:30 pm)
Re: [PATCH 2/3] Fix fsync livelock, Dave Chinner, (Sun Oct 5, 7:51 pm)
Re: [PATCH 2/3] Fix fsync livelock, Mikulas Patocka, (Sun Oct 5, 8:30 pm)
Re: [PATCH 2/3] Fix fsync livelock, Arjan van de Ven, (Sun Oct 5, 9:20 pm)
Re: [PATCH 2/3] Fix fsync livelock, Mikulas Patocka, (Mon Oct 6, 6:00 am)
Re: [PATCH 2/3] Fix fsync livelock, Arjan van de Ven, (Mon Oct 6, 6:50 am)
Re: [PATCH 2/3] Fix fsync livelock, Mikulas Patocka, (Mon Oct 6, 1:44 pm)
Re: [PATCH 2/3] Fix fsync livelock, Pavel Machek, (Wed Oct 8, 3:56 am)
[PATCH] documentation: explain memory barriers, Randy Dunlap, (Wed Oct 8, 6:12 pm)
Re: [PATCH] documentation: explain memory barriers, Chris Snook, (Wed Oct 8, 6:17 pm)
Re: [PATCH] documentation: explain memory barriers, Andrew Morton, (Wed Oct 8, 6:31 pm)
Re: [PATCH] documentation: explain memory barriers, Valdis.Kletnieks, (Wed Oct 8, 6:50 pm)
Re: [PATCH] documentation: explain memory barriers, Chris Snook, (Wed Oct 8, 10:51 pm)
Re: [PATCH] documentation: explain memory barriers, Valdis.Kletnieks, (Wed Oct 8, 11:52 pm)
Re: [PATCH] documentation: explain memory barriers, Ben Hutchings, (Thu Oct 9, 2:58 am)
Re: [PATCH] documentation: explain memory barriers, Nick Piggin, (Thu Oct 9, 10:29 am)
Re: [PATCH] documentation: explain memory barriers, Nick Piggin, (Thu Oct 9, 10:35 am)
Re: [PATCH] documentation: explain memory barriers, Nick Piggin, (Thu Oct 9, 2:27 pm)