On Thu, Mar 07, 2019 at 10:45:57AM +0800, Jason Wang wrote:
On 2019/3/7 äå12:31, Michael S. Tsirkin wrote:Yes it's the same problem as e.g. RDMA:
Yes. But does this break anything?+static void vhost_set_vmap_dirty(struct vhost_vmap *used)This seems to rely on page lock to mark page dirty.
+{
+ int i;
+
+ for (i = 0; i < used->npages; i++)
+ set_page_dirty_lock(used->pages[i]);
Could it happen that page writeback will check the
page, find it clean, and then you mark it dirty and then
invalidate callback is called?
The page is still there, we just remove a
kernel mapping to it.
Thanks
we've just marked the page as dirty without having buffers.
Eventually writeback will find it and filesystem will complain...
So if the pages are backed by a non-RAM-based filesystem, itâs all just broken.
one can hope that RDMA guys will fix it in some way eventually.
For now, maybe add a flag in e.g. VMA that says that there's no
writeback so it's safe to mark page dirty at any point?