[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH hurd/ext2fs] Sync pager before clearing MAY_CACHE flag

From: Sergio López
Subject: Re: [PATCH hurd/ext2fs] Sync pager before clearing MAY_CACHE flag
Date: Mon, 3 Oct 2011 12:09:09 +0200

2011/10/3 Samuel Thibault <samuel.thibault@gnu.org>:
> Sergio López, le Mon 03 Oct 2011 10:08:09 +0200, a écrit :
>> 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).
> Ok, but won't waiting makes some operations serialized? (e.g. like in
> another case it was making rm -fr wait for each file deletion written on
> the disk).

Only for files which have been written before the last global sync.
But, on a second thought, as m_o_lock_request retains a reference to
the object until it finishes, it's actually safe to clear the flag
without waiting for completion. This way, if m_o_lock_request holds
the last reference, vm_object_terminate will be called upon object's
deallocation, while ext2fs' thread can finish the user request in

Just tried on my test machine, and it has the same effect as having it
wait for completion, just as expected.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]