2009/10/7 Wu Fengguang <fengguang.wu@xxxxxxxxx>: [...] > + */ > + if (current_is_kswapd() && > + bdi_cap_writeback_dirty(mapping->backing_dev_info) && > + !mapping->a_ops->writepages) { > + wbc.range_start = (page->index + 1) << PAGE_CACHE_SHIFT; > + wbc.nr_to_write = LUMPY_PAGEOUT_PAGES - 1; > + generic_writepages(mapping, &wbc); > + iput(inode); > + } > + > + /* One potential problem with this is that generic_writepages() waits on page locks and this can stall kswapd (always bad). This can be worked around by replacing lock_page() with trylock_page() conditionally on wbc->for_reclaim (or wbc->nonblocking?), but then, this almost look like a separate function would be better. On a good side, it seems I was wrong and pageout calls iput() already: shrink_slab()->prune_icache()->iput(). Thank you, Nikita. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html