On Tue, Nov 09, 2010 at 10:00:37AM -0800, Jiaying Zhang wrote: > I would like to spend some time to see whether we can add > sb_issue_discard() somewhere else for non-journaled mode. > It is a useful feature to be included for both modes. It certainly can be done, but we'll have to do the trim from a kernel thread or workqueue context. (Of course, we need to make sure that the blocks don't get reused until the trim happens --- or, if we want to use those blocks, that we take them off the to-be-trimmed list before we reuse them.) I am a bit concerned about just adding a new thread, though. Especially if it's per filesystem, since on a system with a very high spindle/ext4 file system count, this could get a bit crazy. It's a bit better in 2.6.36 now that with concurrency managed workqueues, there's only one workqueue thread per file system, instead of one workqueue thread per file system per core (so on a system with 50 spindles and 32 cores, there would be 1600 workqueue threads!). - 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