2011/10/2 Samuel Thibault <samuel.thiba...@gnu.org>: > Sergio López, le Thu 29 Sep 2011 11:44:40 +0200, a écrit : >> Sync'ing the pager before clearing that flag ensures that there aren't >> dirty pages in the object before its termination. > > Do you mean that the writes will be completely avoided for objects which > have actually been removed?
No, it just makes sure that all dirty pages have been sent back to the pager before clearing the flag. >> @@ -851,7 +851,10 @@ drop_pager_softrefs (struct node *node) >> spin_unlock (&node_to_page_lock); >> >> if (MAY_CACHE && pager) >> - pager_change_attributes (pager, 0, MEMORY_OBJECT_COPY_DELAY, 0); >> + { >> + pager_sync (pager, 1); > > Won't using wait=1 reduce performance due to waiting for completion? Clearing the flag will, implicitily, generate a full object synchronization, but with a higher cost, since pages are sent one by one. By synchronizing the object explicitily (and waiting for completion), all data is sent through m_o_lock_request, which is able to send to the pager up to 32 pages at a time (DATA_WRITE_MAX).