git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Nipunn Koorapati <nipunn1313@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Taylor Blau <me@ttaylorr.com>,
	Nipunn Koorapati via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH v2 0/2] fsmonitor inline / testing cleanup
Date: Thu, 22 Oct 2020 21:59:15 +0100	[thread overview]
Message-ID: <CAN8Z4-Vb3qc7eyzczEC7hcf3DmHEXkcV1AGRfC_L0uFKDU2W5A@mail.gmail.com> (raw)
In-Reply-To: <xmqq7drim5st.fsf@gitster.c.googlers.com>

> from Taylor
> I'm still iffy on whether or not this series makes sense to apply
> without the rest of the code that depends on it

Sorry for confusion. I don't think we should assume there is more code coming
related to this. I think this is intended to stand on its own.
It's not a required dependency either. Rather, it's motivated by
simplicity
- remove the dir.h dependency from fsmonitor.h.
- Keep implementation in fsmonitor.c and definitions in fsmonitor.h

> From Junio
> Those without fsmonitor would pay the call/return cost for no good
> reason if core_fsmonitor is not set, and checking that on the caller
> side may make a big difference.  How big?  That needs measurement.

Noted! This is not called out or measured - it is simply assumed based
on earlier
conversation. I should be able to run the fsmonitor perf suite before/after this
change and include the results in the commit message.

> This is a tangent, but with or without inlining, I find it iffy to
> see that untracked_cache_invalidate_path() is called only when
> fsmonitor is in use.  Does untracked_cache depend on fsmonitor for
> its correct operation?  Why is it OK not to invlidate when the
> caller would tell fsmonitor that a path is invalid if fsmonitor were
> in use?  The call is a statement of fact that the path is no longer
> valid, and that bit of information would be useful to the parts of
> the system outside fsmonitor, no?  Puzzled....

I did some source diving in an attempt to understand what's happening here.
I believe that untracked_cache_invalidate_path() is called in dir.c
whenever an entry is added or removed from
a directory.
This is an additional call when fsmonitor is enabled - because
fsmonitor's whole purpose
is to avoid the lstat on the other path. There is a nice explanation
in the original commit message

Commit 883e248b (fsmonitor: teach git to optionally utilize a file
system monitor to speed up detecting new or changed files.,
2017-09-22)

--Nipunn

      reply	other threads:[~2020-10-22 20:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21 18:04 [PATCH 0/2] fsmonitor inline / testing cleanup Nipunn Koorapati via GitGitGadget
2020-10-21 18:04 ` [PATCH 1/2] fsmonitor: stop inline'ing mark_fsmonitor_valid / _invalid Alex Vandiver via GitGitGadget
2020-10-21 20:55   ` Taylor Blau
2020-10-21 21:24     ` Junio C Hamano
2020-10-21 21:31       ` Taylor Blau
2020-10-21 21:38         ` Junio C Hamano
2020-10-21 23:22     ` Nipunn Koorapati
2020-10-21 18:04 ` [PATCH 2/2] fsmonitor: make output of test-dump-fsmonitor more concise Alex Vandiver via GitGitGadget
2020-10-21 20:52 ` [PATCH 0/2] fsmonitor inline / testing cleanup Taylor Blau
2020-10-21 23:15   ` Nipunn Koorapati
2020-10-22  0:21 ` [PATCH v2 " Nipunn Koorapati via GitGitGadget
2020-10-22  0:21   ` [PATCH v2 1/2] fsmonitor: stop inline'ing mark_fsmonitor_valid / _invalid Alex Vandiver via GitGitGadget
2020-10-22  0:21   ` [PATCH v2 2/2] fsmonitor: make output of test-dump-fsmonitor more concise Alex Vandiver via GitGitGadget
2020-10-22 17:40   ` [PATCH v2 0/2] fsmonitor inline / testing cleanup Taylor Blau
2020-10-22 18:32     ` Junio C Hamano
2020-10-22 18:38       ` Taylor Blau
2020-10-22 19:14         ` Junio C Hamano
2020-10-22 20:59           ` Nipunn Koorapati [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAN8Z4-Vb3qc7eyzczEC7hcf3DmHEXkcV1AGRfC_L0uFKDU2W5A@mail.gmail.com \
    --to=nipunn1313@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).