On Wed, Aug 26, 2009 at 10:53:16AM +0530, Aneesh Kumar K.V wrote: > Inorder to check whether the buffer_heads are mapped we need > to hold page lock. Otherwise a reclaim can cleanup the attached > buffer_heads. Instead of taking page lock and check whether > buffer_heads are mapped we let the write_begin/write_end callback > does the equivalent. It does have a performance impact in that we > are doing more work if we the buffer_heads are already mapped. So I started looking at all of the work that we need to do in write_begin/write_end; did you check both write paths depending on whether we are using delayed allocation or not? It would seem to me that it might be better to use lock_page() and unlock_page() around the check, since in many work loads the buffer heads will already be mapped often, and it appears to me that write_begin() will end up locking the page anyway. Am I missing something? - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html