Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Feb 2012 13:01:32 +0000
From:      Attilio Rao <attilio@freebsd.org>
To:        Konstantin Belousov <kostikbel@gmail.com>, Pawel Jakub Dawidek <pjd@freebsd.org>
Cc:        arch@freebsd.org
Subject:   Re: Prefaulting for i/o buffers
Message-ID:  <CAJ-FndABi21GfcCRTZizCPc_Mnxm1EY271BiXcYt9SD_zXFpXw@mail.gmail.com>
In-Reply-To: <20120203193719.GB3283@deviant.kiev.zoral.com.ua>
References:  <20120203193719.GB3283@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Il 03 febbraio 2012 19:37, Konstantin Belousov <kostikbel@gmail.com> ha scritto:
> FreeBSD I/O infrastructure has well known issue with deadlock caused
> by vnode lock order reversal when buffers supplied to read(2) or
> write(2) syscalls are backed by mmaped file.
>
> I previously published the patches to convert i/o path to use VMIO,
> based on the Jeff Roberson proposal, see
> http://wiki.freebsd.org/VM6. As a side effect, the VM6 fixed the
> deadlock. Since that work is very intrusive and did not got any
> follow-up, it get stalled.
>
> Below is very lightweight patch which only goal is to fix deadlock in
> the least intrusive way. This is possible after FreeBSD got the
> vm_fault_quick_hold_pages(9) and vm_fault_disable_pagefaults(9) KPIs.
> http://people.freebsd.org/~kib/misc/vm1.3.patch

Hi,
I was reviewing:
http://people.freebsd.org/~kib/misc/vm1.11.patch

and I think it is great. It is simple enough and I don't have further
comments on it.

However, as a side note, I was thinking if we could get one day at the
point to integrate rangelocks into vnodes lockmgr directly.
It would be a huge patch, rewrtiting the locking of several members of
vnodes likely, but I think it would be worth it in terms of cleaness
of the interface and less overhead. Also, it would be interesting to
consider merging rangelock implementation in ZFS' one, at some point.

BTW, nice job!

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-FndABi21GfcCRTZizCPc_Mnxm1EY271BiXcYt9SD_zXFpXw>