eww.. Truncating 1G of pagecache takes 2.5 seconds on my testbox.
Probably 4 seconds if that pagecache got there via write() (need to
crunch on buffer_heads as well).
There's a cond_resched() after every 16th page in truncate_inode_pages(),
so it won't be very visible to humans. But a multi-second holdtime is
rather rude.
Certainly we don't need to hold it across truncate_inode_pages(), which
is where the heavy lifting happens. Probably, we can just push it down
to vmtruncate(), around the i_op->truncate() callout.
But as ever, it's not really clear what the thing is protecting.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/