Re: MM deadlock [was: Re: arca-vm-8...]

Andrea Arcangeli
1999-01-09T18:59:22Z

On Sat, 9 Jan 1999, Linus Torvalds wrote:

> refuse to touch an inode that is busy is a sure way to allow people to

What do you mean for busy? What about refusing filemap_write_page() in
filemap_swapout() only if
!atomic_count(&vma->vm_file->d_entry->d_inode->i_sem.count)?

That way other no-fs path could still put the dirty pages of the shared
mapping on disk. Today I had a really little time to play with Linux due
OFFTOPIC University studies (I should never play with Linux :() so I had
not time to try out this my new idea, so maybe I am missing something...

Other my thoughts about the topic are: maybe do the inode sempahore
recursive could be better anyway so better to do that now? I don't know
what does it mean recursive ;), I guess like lock_kernel(). But that way
we would be not sure to preserve data integrity if the same process would
do crazy things, right now we would "only" deadlock in such case.

Andrea Arcangeli