Date: Fri, 4 Jan 2002 17:28:33 -0600 From: Alfred Perlstein <bright@mu.org> To: dillon@freebsd.org Cc: fs@freebsd.org Subject: open("", O_DIRECT) broken. Message-ID: <20020104172833.R82406@elvis.mu.org>
next in thread | raw e-mail | index | archive | help
Open passed the O_DIRECT flag seems broken, instead of doing the right thing which would be just to penalize buffers not in the cache, what it does (at least from casual observation in ufs_readwrite) is mark _all_ buffers read via a O_DIRECT file as wanting to be discarded, this is bogus as you may read via an O_DIRECT method the entire file and invalidate the cache of another process accessing the same file. It would be much better to pass O_DIRECT down to bread{n} which would only mark it as B_DIRECT if it's not found in the cache. The idea is to not be distruptive to the cache, not to prematurely toss away buffers that may be otherwise benifiting from heavy cache utilization. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020104172833.R82406>