[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: classzone-VM + mapped pages out of lru_cache



>
> Because it's not necessary as far I can tell. Only one
> truncate_inode_pages() can run at once and none read or write can run
> under truncate_inode_pages(). This should be enforced by the VFS, and if
> that doesn't happen the truncate_inode_pages changes that gone into pre6
> (and following) hides the real bug.
>

truncate: VFS acquires inode->i_sem semaphore.[fs/open.c, do_truncate()]
write: VFS doesn't acquire the semaphore [new in 2.3], but f_op->write()
could acquire the semaphore.
e.g. generic_file_write() acquires the semaphore. [mm/filemap.c]
read: no locking. AFAICS read & truncate could run in parallel.

[I'm reading 2.3.99-pre6]
--
    Manfred

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/