From: Lars Schneider <larsxschneider@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eric Wong <e@80x24.org>, Git Mailing List <git@vger.kernel.org>,
tboegi@web.de, Johannes.Schindelin@gmx.de
Subject: Re: [PATCH v1 2/2] read-cache: make sure file handles are not inherited by child processes
Date: Thu, 8 Sep 2016 07:57:39 +0200 [thread overview]
Message-ID: <F33245FC-C53A-4977-8E72-68AF3D2BB8BB@gmail.com> (raw)
In-Reply-To: <xmqqtwdrmuvo.fsf@gitster.mtv.corp.google.com>
> On 07 Sep 2016, at 20:23, Junio C Hamano <gitster@pobox.com> wrote:
>
> Eric Wong <e@80x24.org> writes:
>
>> We probably should be using O_NOATIME for all O_RDONLY cases
>> to get the last bit of performance out (especially since
>> non-modern-Linux systems probably still lack relatime).
>
> No, please do not go there.
>
> The user can read from a file in a working tree using "less",
> "grep", etc., and they all update the atime, so should "git grep".
> We do not use atime ourselves on these files but we should let
> outside tools rely on the validity of atime (e.g. "what are the
> files that were looked at yesterday?").
>
> If you grep for noatime in our current codebase, you'd notice that
> we use it only for files in objects/ hierarchy, and that makes very
> good sense. These files are what we create for our _sole_ use and
> no other tools can peek at them and expect to get any useful
> information out of them (we hear from time to time that virus
> scanners leaving open file descriptors on them causing trouble, but
> that is an example of a useless access), and that makes a file in
> objects/ hierarchy a fair game for noatime optimization.
How do we deal with read-cache:ce_compare_data, though?
By your definition above we shouldn't use NOATIME since the read file
is not in objects/. However, the file read is not something the user
explicitly triggers. The read is part of the Git internal "clean"
machinery.
What would you suggest? Should I open the file with or without NOATIME?
Thanks,
Lars
next prev parent reply other threads:[~2016-09-08 6:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-05 21:11 [PATCH v1 0/2] Use CLOEXEC to avoid fd leaks larsxschneider
2016-09-05 21:11 ` [PATCH v1 1/2] sha1_file: open window into packfiles with CLOEXEC larsxschneider
2016-09-05 22:27 ` Eric Wong
2016-09-06 9:36 ` Jakub Narębski
2016-09-06 11:38 ` Johannes Schindelin
2016-09-07 13:20 ` Lars Schneider
2016-09-07 18:17 ` Eric Wong
2016-09-05 21:11 ` [PATCH v1 2/2] read-cache: make sure file handles are not inherited by child processes larsxschneider
2016-09-06 11:41 ` Johannes Schindelin
2016-09-06 21:06 ` Eric Wong
2016-09-07 13:39 ` Lars Schneider
2016-09-07 18:10 ` Eric Wong
2016-09-07 18:23 ` Junio C Hamano
2016-09-08 5:57 ` Lars Schneider [this message]
2016-09-08 17:37 ` Junio C Hamano
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=F33245FC-C53A-4977-8E72-68AF3D2BB8BB@gmail.com \
--to=larsxschneider@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=e@80x24.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tboegi@web.de \
/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).