zfs_getpages
Andriy Gapon
avg at freebsd.org
Mon Oct 11 11:03:47 UTC 2010
on 11/10/2010 13:34 Martin Matuska said the following:
> As of this code:
> + for (i = 0; i < pcount; i++) {
> + if (i != reqpage) {
> + vm_page_lock(m[i]);
> + vm_page_free(m[i]);
> + vm_page_unlock(m[i]);
> + }
> + }
>
> Do you think locking a page is sufficient to protect against a race?
What race?
> As to our reference implementation it should be more like this:
Which reference implementation would that be?
> + vm_page_lock_queues();
> + for (i = 0; i < pcount; i++) {
> + if (i != reqpage) {
> + vm_page_free(m[i]);
> + }
> + }
> + vm_page_unlock_queues();
I think that in head only page lock is required for vm_page_free().
Locking queues around the loop should not be required, it is done internally
only for a short duration when it's needed.
> Dňa 10. 10. 2010 10:38, Andriy Gapon wrote / napísal(a):
>>
>> Guys,
>>
>> could you please review and or test the following addition to FreeBSD ZFS?
>> http://people.freebsd.org/~avg/zfs-getpages.diff
>>
>> Does it improve anything for you?
>> Is it something worth committing?
>>
> _______________________________________________
> zfs-devel at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/zfs-devel
> To unsubscribe, send any mail to "zfs-devel-unsubscribe at freebsd.org"
--
Andriy Gapon
More information about the zfs-devel
mailing list