should swap-file opened with O_DIRECT?
The sys_swapon system call open the swap-file throughfilp_open(..., O_RDWR|O_LARGEFILE,...).
In this way, I think that the pageout process of anonymous
pages finally will write them out through (swap-file)->f_ops->write, and it will result in caches of swapfile. However, swapping only happens when memory is tight. So why not set O_DIRECT? Is there any special reason to keep caches of swapfile?
Is the idea right ? Or something misunstood?