Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Oct 2007 09:57:48 +0400
From:      Igor Sysoev <is@rambler-co.ru>
To:        freebsd-current@freebsd.org
Subject:   Re: sendfile and page usage statistics
Message-ID:  <20071010055748.GA18931@rambler-co.ru>
In-Reply-To: <20071009125001.GC5758@rambler-co.ru>
References:  <20071009125001.GC5758@rambler-co.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 09, 2007 at 04:50:01PM +0400, Igor Sysoev wrote:

> As I understand if sendfile() with hardware TX chsum or TSO are used,
> then CPU does not touch file pages at all. So pagedaemon never set
> PG_REFERENCED to vnode object pages while scanning them.
> Does VM set PG_REFERENCED by another way ? Otherwise, often used files
> that accessed by sendfile() only have small chances to be cached by VM.

I have looked kern_sendfile() in CURRENT and it seems to me that
PG_REFERENCED is never set when sendfile() gets cached vm_page.
I have looked the code path:

vm_page_grab()
    vm_page_lookup()
    vm_page_wire()
sf_buf_alloc() on i386 and amd64

and have not seen PG_REFERENCED.


-- 
Igor Sysoev
http://sysoev.ru/en/



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