Skip to content

Allocate cache entries from mem_pool

Jameson Miller git 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest8 patches 3 repliesIn review
  2. v58 patches 7 repliesSuperseded
  3. v48 patches 4 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v37 patches9 repliesSuperseded
v25 patches9 repliesSuperseded
v10 of 5 patches0 repliesSuperseded

Changes in v6 from the cover letter

- Updated commit messages for:
7581156e8a read-cache: teach refresh_cache_entry to take istate 2c962aa0cd block alloc: add lifecycle APIs for cache_entry structs

- Use oidcpy function instead of hashcpy function

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8read-cache: teach refresh_cache_entry to take istatecache.h merge-recursive.c read-cache.c+7 -60 replies
2/8read-cache: teach make_cache_entry to take object_idapply.c builtin/checkout.c builtin/difftool.c +5 more+18 -112 replies
3/8block alloc: add lifecycle APIs for cache_entry structsapply.c blame.c builtin/checkout.c +10 more+165 -921 reply
4/8mem-pool: only search head block for available spacemem-pool.c+4 -40 replies
5/8mem-pool: add life cycle management functionsmem-pool.c mem-pool.h+61 -80 replies
6/8mem-pool: fill out functionalitymem-pool.c mem-pool.h+55 -00 replies
7/8block alloc: allocate cache entries from mem_poolcache.h mem-pool.c read-cache.c +2 more+167 -390 replies
8/8block alloc: add validations around cache_entry lifecylecache.h git.c mem-pool.c +2 more+68 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH v6 0/8] Allocate cache entries from mem_pool

Changes since v5:
- Updated commit messages for:
7581156e8a read-cache: teach refresh_cache_entry to take istate 2c962aa0cd block alloc: add lifecycle APIs for cache_entry structs

- Use oidcpy function instead of hashcpy function

### Interdiff (v5..v6):

read-cache.c +2 -2
index ba31e929e8..fd67e2e8a4 100644
@@ -814,7 +814,7 @@ struct cache_entry *make_cache_entry(struct index_state *istate,
 	len = strlen(path);
 	ce = make_empty_cache_entry(istate, len);
 
-	hashcpy(ce->oid.hash, oid->hash);
+	oidcpy(&ce->oid, oid);
 	memcpy(ce->name, path, len);
 	ce->ce_flags = create_ce_flags(stage);
 	ce->ce_namelen = len;
@@ -840,7 +840,7 @@ struct cache_entry *make_transient_cache_entry(unsigned int mode, const struct o
 	len = strlen(path);
 	ce = make_empty_transient_cache_entry(len);
 
-	hashcpy(ce->oid.hash, oid->hash);
+	oidcpy(&ce->oid, oid);
 	memcpy(ce->name, path, len);
 	ce->ce_flags = create_ce_flags(stage);
 	ce->ce_namelen = len;

### Patches

Jameson Miller (8):
read-cache: teach refresh_cache_entry to take istate
read-cache: teach make_cache_entry to take object_id block alloc: add lifecycle APIs for cache_entry structs
mem-pool: only search head block for available space
mem-pool: add life cycle management functions
mem-pool: fill out functionality
block alloc: allocate cache entries from mem_pool block alloc: add validations around cache_entry lifecyle

 apply.c                |  24 ++--
 blame.c                |   5 +-
 builtin/checkout.c     |   8 +-
 builtin/difftool.c     |   6 +-
 builtin/reset.c        |   2 +-
 builtin/update-index.c |  26 ++--
 cache.h                |  64 +++++++++-
 git.c                  |   3 +
 mem-pool.c             | 114 ++++++++++++++++--
 mem-pool.h             |  23 ++++
 merge-recursive.c      |   4 +-
 read-cache.c           | 264 ++++++++++++++++++++++++++++++++++-------
 resolve-undo.c         |   4 +-
 split-index.c          |  58 +++++++--
 tree.c                 |   4 +-
 unpack-trees.c         |  40 ++++---
 16 files changed, 515 insertions(+), 134 deletions(-)

base-commit: ed843436dd4924c10669820cc73daf50f0b4dabd

Signature · 1 line
2.17.1