svn commit: r250027 - head/sys/kern

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon May 6 20:27:30 UTC 2013


On Mon, May 06, 2013 at 11:05:30PM +0300, Konstantin Belousov wrote:
> On Mon, May 06, 2013 at 08:16:11PM +0200, Pawel Jakub Dawidek wrote:
> > On Sun, Apr 28, 2013 at 07:12:09PM +0000, Konstantin Belousov wrote:
> > > Author: kib
> > > Date: Sun Apr 28 19:12:09 2013
> > > New Revision: 250027
> > > URL: http://svnweb.freebsd.org/changeset/base/250027
> > > 
> > > Log:
> > >   Eliminate the layering violation in the kern_sendfile().  When quering
> > >   the file size, use VOP_GETATTR() instead of accessing vnode vm_object
> > >   un_pager.vnp.vnp_size.
> > 
> > Doesn't it add extra I/O to query file system about file's attributes?
> > If it does, does it matter here?
> 
> It should not, typically.
> 
> E.g. UFS always keeps the unpacked inode in memory for any non-reclaimed
> vnode.  For NFS, vnode usually caches the attributes.

I remember criticism on security.bsd.hardlink_check_[ug]id, because it
added extra VOP_GETATTR() to the code path of link(2), which could hurt
performance. sendfile(2) is different, as the file is open, so it should
be fine indeed.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://mobter.com
-------------- 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/svn-src-all/attachments/20130506/ba7f8c73/attachment.sig>


More information about the svn-src-all mailing list