From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 21 18:02:25 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A40416A4CE for ; Wed, 21 Apr 2004 18:02:25 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B49643D31 for ; Wed, 21 Apr 2004 18:02:25 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) i3M12N7Z097319; Wed, 21 Apr 2004 18:02:23 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9p2/8.12.9/Submit) id i3M12Lrl097316; Wed, 21 Apr 2004 18:02:21 -0700 (PDT) (envelope-from dillon) Date: Wed, 21 Apr 2004 18:02:21 -0700 (PDT) From: Matthew Dillon Message-Id: <200404220102.i3M12Lrl097316@apollo.backplane.com> To: Julian Elischer References: cc: hackers@freebsd.org cc: Stephan Uphoff Subject: Re: how to flush out cache.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2004 01:02:25 -0000 : :> :> mmap() and msync(..MS_INVALIDATE..) should work. : :hmmm that is rather interesting.. :I wonder if it would work.... :Maybe a vm guru could confirm this.. (under 4.x) : Huh. If I hadn't looked at the code I would have said that MS_INVALIDATE doesn't work in FreeBSD, but when I look at the code it sure looks like it ought to work! But, alas, it does not. The invalidation request goes all the way through to the vnode pager but it looks like the vnode pager ignores it. MS_INVALIDATE -> OBJPC_INVAL -> VM_PAGER_PUT_INVAL -> IO_INVAL -> (ignored) IO_INVAL is defined to be 'invalidate after I/O completes', not 'throw away the dirty data', but the only place it appears to be implemented is in the NFS code. -Matt