@@ -232,6 +232,7 @@ bad_bmap:
int swap_writepage(struct page *page, struct writeback_control *wbc)
{
int ret = 0;
+ ktime_t stime, etime;
if (try_to_free_swap(page)) {
unlock_page(page);
@@ -243,7 +244,12 @@ int swap_writepage(struct page *page, struct
writeback_control *wbc)
end_page_writeback(page);
goto out;
}
+ stime = ktime_get();
ret = __swap_writepage(page, wbc, end_swap_bio_write);
+ etime = ktime_get();
+
+ pr_err("zhizhou.tian: execute swap time with page_io : %lld nsec.\n",
+ etime.tv64 - stime.tv64);
out:
return ret;