httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <>
Subject Re: cvs commit: apache-1.3 STATUS
Date Mon, 04 May 1998 23:11:33 GMT
Martin Kraemer wrote:
> On Mon, May 04, 1998 at 08:02:35PM +0400, Dmitry Khrustalev wrote:
> > stat is expensive because it has to run namei, fstat is not so expensive.
> > opening file in get_path_info, and saving fd in request_rec and using this
> > saved fd later saves ~1/6 of system time here.
> I just re-checked my old archives and found out that the solution has
> been there all the time -- I added it last fall. Look into the source
> main/util.c, search for the define unvoted_DISALLOW_DEVICE_ACCESS!
> It uses fstat to control device access for configuration files (i.e.,
> everything which uses ap_pcfg_openfile()).
> If an attempt is made to open a (non-/dev/null) special file, then
> an error is logged and the open attempt aborted.
> Does that help? Should we vote on it?

Yeah, I saw that and mentioned it in one of the follow-ups. My suggestion
was that ap_pcfg_openfile have another parameter that determines if
the fstat actually be done, that way we can use it as needed but
we don't get the performance hit when we don't... Course, if it's
used only for config-file opens then it's not that big a deal. :)

   Jim Jagielski   |||   |||
            "That's no ordinary rabbit... that's the most foul,
            cruel and bad-tempered rodent you ever laid eyes on"

View raw message