Date: Thu, 22 Apr 2004 19:53:35 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: Stephan Uphoff <ups@tree.com>, Julian Elischer <julian@elischer.org> Cc: hackers@freebsd.org Subject: Re: how to flush out cache.? Message-ID: <200404230253.i3N2rZ0t004401@apollo.backplane.com> References: <200404230103.VAA18066@stups.com>
next in thread | previous in thread | raw e-mail | index | archive | help
(taking hackers off to reduce noise)
I think all that needs to happen to fix this problem is to call
vm_object_page_remove() with the clean_only flag set to TRUE instead
of FALSE.
Wired pages, e.g. pages in the buffer cache, will not be removed, but
that's ok because memory-mapped pages tend to not get buffer cache
associations until the system decides to flush the pages.
Fixing the buffer cache issue would have to occur in the actual
VNODE I/O operation, which would only occur for VM_PROT_WRITE operations,
which I think is just fine. The I/O op will have access to the
invalidation request as a flag and it can simply do what NFS does which
is flag the buffer to be destroyed on I/O completion. If that is done,
then by the time we get to the second pass the buffer should be gone and
the vm_object_page_remove() function will find a normal, unwired page and
properly remove it.
I'll test this out in DragonFly and email Stephan and Julian a followup.
-Matt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404230253.i3N2rZ0t004401>
