All of lore.kernel.org
 help / color / mirror / Atom feed
* dirty balancing deadlock
@ 2007-02-18 18:28 ` Miklos Szeredi
  0 siblings, 0 replies; 52+ messages in thread
From: Miklos Szeredi @ 2007-02-18 18:28 UTC (permalink / raw)
  To: linux-kernel, linux-mm; +Cc: akpm

I was testing the new fuse shared writable mmap support, and finding
that bash-shared-mapping deadlocks (which isn't so strange ;).  What
is more strange is that this is not an OOM situation at all, with
plenty of free and cached pages.

A little more investigation shows that a similar deadlock happens
reliably with bash-shared-mapping on a loopback mount, even if only
half the total memory is used.

The cause is slightly different in the two cases:

  - loopback mount: allocation by the underlying filesystem is stalled
    on throttle_vm_writeout()

  - fuse-loop: page dirtying on the underlying filesystem is stalled on
    balance_dirty_pages()

In both cases the underlying fs is totally innocent, with no
dirty/writback pages, yet it's waiting for the global dirty+writeback
to go below the threshold, which obviously won't, until the
allocation/dirtying succeeds.

I'm not quite sure what the solution is, and asking for thoughts.

Ideas:

  - per filesystem dirty counters.  If filesystem is clean (or dirty
    is below some minimum), then balance_dirty_pages() should no wait
    any more

  - throttle_vm_writeout() was meant to throttle swapping, no?  So in
    that case there should be a separate swap-writback counter

Thanks,
Miklos

^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2007-02-22  8:02 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-18 18:28 dirty balancing deadlock Miklos Szeredi
2007-02-18 18:28 ` Miklos Szeredi
2007-02-18 20:53 ` Andrew Morton
2007-02-18 20:53   ` Andrew Morton
2007-02-18 21:25   ` Rik van Riel
2007-02-18 21:25     ` Rik van Riel
2007-02-18 22:54     ` Miklos Szeredi
2007-02-18 22:54       ` Miklos Szeredi
2007-02-18 22:50   ` Miklos Szeredi
2007-02-18 22:50     ` Miklos Szeredi
2007-02-18 22:59     ` Andrew Morton
2007-02-18 22:59       ` Andrew Morton
2007-02-18 23:22       ` Miklos Szeredi
2007-02-18 23:22         ` Miklos Szeredi
2007-02-18 23:59         ` Andrew Morton
2007-02-18 23:59           ` Andrew Morton
2007-02-19  0:25           ` Miklos Szeredi
2007-02-19  0:25             ` Miklos Szeredi
2007-02-19  0:30             ` Miklos Szeredi
2007-02-19  0:30               ` Miklos Szeredi
2007-02-19  0:45             ` Miklos Szeredi
2007-02-19  0:45               ` Miklos Szeredi
2007-02-19  0:45             ` Chris Mason
2007-02-19  0:45               ` Chris Mason
2007-02-19  0:54               ` Miklos Szeredi
2007-02-19  0:54                 ` Miklos Szeredi
2007-02-19  1:01                 ` Chris Mason
2007-02-19  1:01                   ` Chris Mason
2007-02-19  1:14                   ` Miklos Szeredi
2007-02-19  1:14                     ` Miklos Szeredi
2007-02-20  0:16                     ` Chris Mason
2007-02-20  0:16                       ` Chris Mason
2007-02-20  8:53                       ` Miklos Szeredi
2007-02-20  8:53                         ` Miklos Szeredi
2007-02-19 17:11           ` Miklos Szeredi
2007-02-19 17:11             ` Miklos Szeredi
2007-02-19 23:12             ` Miklos Szeredi
2007-02-19 23:12               ` Miklos Szeredi
2007-02-20  0:13             ` Chris Mason
2007-02-20  0:13               ` Chris Mason
2007-02-20  8:47               ` Miklos Szeredi
2007-02-20  8:47                 ` Miklos Szeredi
2007-02-20 11:30                 ` Chris Mason
2007-02-20 11:30                   ` Chris Mason
2007-02-21 21:36             ` Andrew Morton
2007-02-21 21:36               ` Andrew Morton
2007-02-22  7:42               ` Miklos Szeredi
2007-02-22  7:42                 ` Miklos Szeredi
2007-02-22  7:55                 ` Andrew Morton
2007-02-22  7:55                   ` Andrew Morton
2007-02-22  8:02                   ` Miklos Szeredi
2007-02-22  8:02                     ` Miklos Szeredi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.