Re: [PATCH 05/16] odb: move MRU list of packfiles into `struct packfile_store`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Steinhardt <ps@xxxxxx> writes:

> The object database tracks the list of packfiles in most-recently-used
> order, which is mostly used to favor reading from packfiles that contain
> most of the objects that we're currently accessing. With the
> introduction of the `struct packfile_store` we have a better place to
> host this list though.
>
> Move the list accordingly.

[snip]

> diff --git a/packfile.h b/packfile.h
> index 2f84d7d7e6..3022f3a19e 100644
> --- a/packfile.h
> +++ b/packfile.h
> @@ -65,6 +65,9 @@ struct packfile_store {
>  	 */
>  	struct packed_git *packs;
>
> +	/* A most-recently-used ordered version of the packs list. */
> +	struct list_head mru;
> +
>  	/*
>  	 * A map of packfile names to packed_git structs for tracking which
>  	 * packs have been loaded already.
>
> --
> 2.51.0.261.g7ce5a0a67e.dirty

Question: for my understanding, so we maintain a list of `packed_git`
packfiles in `packfile_store.packs` and then the same list is
available in a MRU form in `packfile_store.mru`?

I assume this is to optimize searches to use the mru form? Is there a
reason to not pick the mru list?

Thanks

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux