From: Junio C Hamano <gitster@pobox.com>
To: Kjetil Barvik <barvik@broadpark.no>
Cc: git@vger.kernel.org, "René Scharfe" <rene.scharfe@lsrfire.ath.cx>,
"Linus Torvalds" <torvalds@linux-foundation.org>
Subject: Re: [PATCH/RFC v6 1/3] lstat_cache(): more cache effective symlink/directory detection
Date: Sun, 11 Jan 2009 20:05:45 -0800 [thread overview]
Message-ID: <7vbpudkw2u.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 1231680542-17315-2-git-send-email-barvik@broadpark.no
Kjetil Barvik <barvik@broadpark.no> writes:
> -static inline void set_pathname(int len, const char *name, struct pathname *match)
> +static inline void reset_lstat_cache(void)
> {
> - if (len < PATH_MAX) {
> - match->len = len;
> - memcpy(match->path, name, len);
> - match->path[len] = 0;
> - }
> + cache.path[0] = '\0';
> + cache.len = 0;
> + cache.flags = 0;
> }
I see you made this internal to the caching code, but I suspect in the
long run there needs to be a way for callers that use the caching
mechanism to check and then create new paths in the work tree to
invalidate the cached code (namely, builtin-apply.c::write_out_results()
and entry.c::checkout_entry() codepaths).
I'll queue this round to 'pu' anyway, though.
Thanks.
next prev parent reply other threads:[~2009-01-12 4:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-11 13:28 [PATCH/RFC v6 0/3] git checkout: optimise away lots of lstat() calls Kjetil Barvik
2009-01-11 13:29 ` [PATCH/RFC v6 1/3] lstat_cache(): more cache effective symlink/directory detection Kjetil Barvik
2009-01-12 4:05 ` Junio C Hamano [this message]
2009-01-11 13:29 ` [PATCH/RFC v6 2/3] lstat_cache(): introduce has_symlink_or_noent_leading_path() function Kjetil Barvik
2009-01-11 13:29 ` [PATCH/RFC v6 3/3] lstat_cache(): introduce has_dirs_only_path() function Kjetil Barvik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vbpudkw2u.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=barvik@broadpark.no \
--cc=git@vger.kernel.org \
--cc=rene.scharfe@lsrfire.ath.cx \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).