Removal of Giant from the VFS layer for 10.0

Kostik Belousov kostikbel at gmail.com
Sat Aug 27 15:07:19 UTC 2011


On Sat, Aug 27, 2011 at 02:00:50PM +0200, Attilio Rao wrote:
> [ Sorry for cross-posting, but I included -arch@ for technical
> discussion, -current@ for reaching the wider audience and -fs@ for the
> relevance of the matter.]
> 
> During the last years a lot of effort by several developers happened
> in order to reduce Giant influence over the entire kernel.
> The VFS layer didn't make an exception, as many several tasks have
> been completed along the years, including fine-grained locking for
> vnodes lifecycle, fine-grained locking of the VFS structure (mount),
> fine-grained locking of specific filesystems (UFS, NFS, etc.) and
> several locking improvements to surrounding subsystem (buffer cache,
> filedesc objects, VM layer, etc.).
> 
> While FreeBSD did pretty well so far, a major push is still needed in
> order to completely remove Giant from our VFS and buffer cache
> subsystems.
> At the present time, the biggest problem is that there are still
> filesystems which are not properly fine-grained locked, relying on
> Giant for assuring atomicity. It is time to make an decision for them,
> in order to aim for a Giant-less VFS in our next release.
The scope of the project should be made slightly more concrete.
If you do not use a non-mpsafe fs, then VFS does not acquire Giant.
This is true at least for stable/8 and HEAD kernels, might be also
true for stable/7, but I do not remember for sure.

The aim of the project is to remove compatibility shims that
conditionally acquire Giant on the as-needed basis to allow non-mpsafe
filesystems to operate still under the usual locking regime. In other
words, the project will not make anything much faster or scalable, but
to remove some quite large amount of the crafty code from our VFS, which
is, unfortunately, not known for the very clean interfaces.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20110827/3c025c7f/attachment.pgp


More information about the freebsd-fs mailing list