git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] check_updates(): effective removal of cache entries marked CE_REMOVE

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 18, 2009, 22:44 UTC
Message-ID
<alpine.LFD.2.00.0902181436390.21686@localhost.localdomain>
In-Reply-To
<1234995483-933-1-git-send-email-barvik@broadpark.no>
On Wed, 18 Feb 2009, Kjetil Barvik wrote:
> 
> To fix this, and use an O(N) algorithm instead, where N is the number
> of cache_entries, we delete/remove all entries in one loop through all
> entries.

Ack. We've had things like this before. I'm somewhat surprised that it is noticeable even in the "o->update" case (since I would have expected the cost of actually doing an unlink() to swamp the memmove overhead), but the patch looks obviously correct.

Looking at the numbers, I guess it's not _really_ noticeable - it's 1.8% of git user-space time, which in turn is about 75% of total time, so it's not a huge improvement, but I'll certainly ack it anyway as being the right thing to do. Every little bit helps.

			Linus
Previous: Kjetil BarvikNext: Alex Riesen
Message 2 of 8 in “check_updates(): effective removal of cache entries marked CE_REMOVE”
  1. check_updates(): effective removal of cache entries marked CE_REMOVEKjetil Barvik, Feb 18, 2009
  2. Linus TorvaldsFeb 18, 2009
  3. Alex RiesenFeb 19, 2009
  4. Kjetil BarvikFeb 19, 2009
  5. Junio C HamanoFeb 20, 2009
  6. Kjetil BarvikFeb 20, 2009
  7. Johannes SchindelinFeb 20, 2009
  8. Kjetil BarvikFeb 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.