Re: Lockups with 2.4.14 and 2.4.16

Andrew Morton (akpm@zip.com.au)
Fri, 14 Dec 2001 09:26:42 -0800


Chris Mason wrote:
>
> Ok, Johan sent along stack traces, and the deadlock works a little like this:
>
> linux-2.4.16 + reiserfs + quota v2
>
> kswapd ->
> prune_icache->dispose_list->dquot_drop->commit_dquot->generic_file_write->
> mark_inode_dirty->journal_begin-> wait for trans to end

uh-huh.

> Some process in the transaction is waiting on kswapd to free ram.

This is unfamiliar. Where does a process block on kswapd in this
manner? Not __alloc_pages I think.

> So, this will hit any journaled FS that uses quotas and logs inodes under
> during a write. ext3 doesn't seem to do special things for quota anymore, so
> it should be affected too.

mm.. most of the ext3 damage-avoidance hacks are around writepage().

> The only fix I see is to make sure kswapd doesn't run shrink_icache, and to
> have it done via a dedicated daemon instead. Does anyone have a better idea?

Well, we already need to do something like that to prevent the
abuse of keventd in there. It appears that somebody had a
problem with deadlocks doing the inode writeout in kswapd but
missed the quota problem.

Is it possible for the quota code to just bale out if PF_MEMALLOC
is set? To leave the dquot dirty?

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