<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/read-cache.c, branch v2.31.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.31.7</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.31.7'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2021-03-19T22:25:38Z</updated>
<entry>
<title>Merge branch 'rs/calloc-array'</title>
<updated>2021-03-19T22:25:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-19T22:25:38Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=92ccd7b7529a852583c5033ba28b4414cd2f7654'/>
<id>urn:sha1:92ccd7b7529a852583c5033ba28b4414cd2f7654</id>
<content type='text'>
CALLOC_ARRAY() macro replaces many uses of xcalloc().

* rs/calloc-array:
  cocci: allow xcalloc(1, size)
  use CALLOC_ARRAY
  git-compat-util.h: drop trailing semicolon from macro definition
</content>
</entry>
<entry>
<title>Merge branch 'js/fsmonitor-unpack-fix'</title>
<updated>2021-03-19T22:25:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-19T22:25:37Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1dd4e7452295618b20703deffc4241bf7dd4be4f'/>
<id>urn:sha1:1dd4e7452295618b20703deffc4241bf7dd4be4f</id>
<content type='text'>
The data structure used by fsmonitor interface was not properly
duplicated during an in-core merge, leading to use-after-free etc.

* js/fsmonitor-unpack-fix:
  fsmonitor: do not forget to release the token in `discard_index()`
  fsmonitor: fix memory corruption in some corner cases
</content>
</entry>
<entry>
<title>fsmonitor: do not forget to release the token in `discard_index()`</title>
<updated>2021-03-17T19:19:28Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-03-17T15:30:49Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4abc57848d8ace8218952c7376fa397c0850392c'/>
<id>urn:sha1:4abc57848d8ace8218952c7376fa397c0850392c</id>
<content type='text'>
In 56c6910028a (fsmonitor: change last update timestamp on the
index_state to opaque token, 2020-01-07), we forgot to adjust
`discard_index()` to release the "last-update" token: it is no longer a
64-bit number, but a free-form string that has been allocated.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use CALLOC_ARRAY</title>
<updated>2021-03-14T00:00:09Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2021-03-13T16:17:22Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ca56dadb4b65ccaeab809d80db80a312dc00941a'/>
<id>urn:sha1:ca56dadb4b65ccaeab809d80db80a312dc00941a</id>
<content type='text'>
Add and apply a semantic patch for converting code that open-codes
CALLOC_ARRAY to use it instead.  It shortens the code and infers the
element size automatically.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ns/raise-write-index-buffer-size'</title>
<updated>2021-03-01T22:02:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-01T22:02:58Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ada7c5fae5ba8c1fab4fc90131ae4058e0cb9271'/>
<id>urn:sha1:ada7c5fae5ba8c1fab4fc90131ae4058e0cb9271</id>
<content type='text'>
Raise the buffer size used when writing the index file out from
(obviously too small) 8kB to (clearly sufficiently large) 128kB.

* ns/raise-write-index-buffer-size:
  read-cache: make the index write buffer size 128K
</content>
</entry>
<entry>
<title>Merge branch 'jh/fsmonitor-prework'</title>
<updated>2021-03-01T22:02:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-01T22:02:56Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=700696bcfc8dc0bbb763ba8a0c91688ad6c1fa7b'/>
<id>urn:sha1:700696bcfc8dc0bbb763ba8a0c91688ad6c1fa7b</id>
<content type='text'>
Preliminary changes to fsmonitor integration.

* jh/fsmonitor-prework:
  fsmonitor: refactor initialization of fsmonitor_last_update token
  fsmonitor: allow all entries for a folder to be invalidated
  fsmonitor: log FSMN token when reading and writing the index
  fsmonitor: log invocation of FSMonitor hook to trace2
  read-cache: log the number of scanned files to trace2
  read-cache: log the number of lstat calls to trace2
  preload-index: log the number of lstat calls to trace2
  p7519: add trace logging during perf test
  p7519: move watchman cleanup earlier in the test
  p7519: fix watchman watch-list test on Windows
  p7519: do not rely on "xargs -d" in test
</content>
</entry>
<entry>
<title>read-cache: make the index write buffer size 128K</title>
<updated>2021-02-24T21:40:30Z</updated>
<author>
<name>Neeraj Singh</name>
<email>neerajsi@ntdev.microsoft.com</email>
</author>
<published>2021-02-18T02:48:26Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f279894d283101e8e7427347a5469a8731820872'/>
<id>urn:sha1:f279894d283101e8e7427347a5469a8731820872</id>
<content type='text'>
Writing an index 8K at a time invokes the OS filesystem and caching code
very frequently, introducing noticeable overhead while writing large
indexes. When experimenting with different write buffer sizes on Windows
writing the Windows OS repo index (260MB), most of the benefit came by
bumping the index write buffer size to 64K. I picked 128K to ensure that
we're past the knee of the curve.

With this change, the time under do_write_index for an index with 3M
files goes from ~1.02s to ~0.72s.

Signed-off-by: Neeraj Singh &lt;neerajsi@ntdev.microsoft.com&gt;
Acked-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>read-cache: log the number of scanned files to trace2</title>
<updated>2021-02-17T01:14:34Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2021-02-03T15:34:46Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=15268d12bef12a40753767882088f4fcfefb3b2b'/>
<id>urn:sha1:15268d12bef12a40753767882088f4fcfefb3b2b</id>
<content type='text'>
Report the number of files in the working directory that were read and
their hashes verified in `refresh_index()`.

FSMonitor improves the performance of commands like `git status` by
avoiding scanning the disk for changed files.  Let's measure this.

Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Reviewed-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>read-cache: log the number of lstat calls to trace2</title>
<updated>2021-02-17T01:14:34Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2021-02-03T15:34:45Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a98e0f2d317818bfcb7f3c9cf53dfad2334e8ca7'/>
<id>urn:sha1:a98e0f2d317818bfcb7f3c9cf53dfad2334e8ca7</id>
<content type='text'>
Report the total number of calls made to lstat() inside of refresh_index().

FSMonitor improves the performance of commands like `git status` by
avoiding scanning the disk for changed files.  This can be seen in
`refresh_index()`.  Let's measure this.

Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Reviewed-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>read-cache: try not to peek into `struct {lock_,temp}file`</title>
<updated>2021-01-06T21:53:32Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2021-01-05T19:23:50Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6a8c89d053059b97adb846fce1d22f6d7704c56a'/>
<id>urn:sha1:6a8c89d053059b97adb846fce1d22f6d7704c56a</id>
<content type='text'>
Similar to the previous commits, try to avoid peeking into the `struct
lock_file`. We also have some `struct tempfile`s -- let's avoid looking
into those as well.

Note that `do_write_index()` takes a tempfile and that when we call it,
we either have a tempfile which we can easily hand down, or we have a
lock file, from which we need to somehow obtain the internal tempfile.
So we need to leave that one instance of peeking-into. Nevertheless,
this commit leaves us not relying on exactly how the path of the
tempfile / lock file is stored internally.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Reviewed-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
