From owner-freebsd-hackers Sun Jan 5 13:50:32 2003 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 A223337B401 for ; Sun, 5 Jan 2003 13:50:30 -0800 (PST) Received: from prioris.mini.pw.edu.pl (prioris.mini.pw.edu.pl [194.29.178.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AD0E43EB2 for ; Sun, 5 Jan 2003 13:50:30 -0800 (PST) (envelope-from P.Dawidek@prioris.mini.pw.edu.pl) Received: from localhost (localhost.mini.pw.edu.pl [127.0.0.1]) by prioris.mini.pw.edu.pl (Postfix) with ESMTP id B7D1C7D307 for ; Sun, 5 Jan 2003 22:50:28 +0100 (CET) Received: by prioris.mini.pw.edu.pl (Postfix, from userid 1091) id 487057D302; Sun, 5 Jan 2003 22:50:24 +0100 (CET) Date: Sun, 5 Jan 2003 22:50:24 +0100 From: Pawel Jakub Dawidek To: freebsd-hackers@freebsd.org Subject: Caching [sugestion]. Message-ID: <20030105215024.GB99855@prioris.mini.pw.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline User-Agent: Mutt/1.4i X-PGP-Key-URL: http://garage.freebsd.pl/jules.pgp X-OS: FreeBSD 4.7-STABLE i386 X-Virus-Scanned: by AMaViS (prioris) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello hackers... I just wondering... Now we got problems with caching, and problems could be seriuos in -CURRENT when we want to use some TrustedBSD features, etc. Sometimes there is NEED to get filename (or full path) from vnode to log selected behaviour or many other useful things (for example property working __getcwd()). For now we could get pathname from cache, but not always it is possible. My sugestion is to add some flags that will describe priority of cached objects. Objects with some flag should be removed from cache only when it's really necessary. This flag should be set for: - working directory of every process (p->p_fd->fd_cdir), - filename of executable (p->p_textvp), - filenames of all opened files )p->p_fd->fd_ofiles[X]->f_data). - maybe something else? On every [f]chdir(), our flag should be removed from actual object and set on new one. Exactly that same for execve() and exit1() and for open() and p->p_fd->fd_ofiles[X]->f_ops->fo_close(). This don't have to be done via VFS caching mechanism, this could also be made by some separated mechanism used only for this. Think over this, please! -- Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message