Re: [PATCH v3] sha1_file: introduce close_one_pack() to close packs on fd pressure

2013-08-02 Thread Brandon Casey
On Fri, Aug 2, 2013 at 9:26 AM, Junio C Hamano wrote: > Brandon Casey writes: > >> +/* >> + * The LRU pack is the one with the oldest MRU window, preferring packs >> + * with no used windows, or the oldest mtime if it has no windows allocated. >> + */ >> +static void find_lru_pack(struct packed_g

Re: [PATCH v3] sha1_file: introduce close_one_pack() to close packs on fd pressure

2013-08-02 Thread Junio C Hamano
Brandon Casey writes: > +/* > + * The LRU pack is the one with the oldest MRU window, preferring packs > + * with no used windows, or the oldest mtime if it has no windows allocated. > + */ > +static void find_lru_pack(struct packed_git *p, struct packed_git **lru_p, > struct pack_window **mru_w

[PATCH v3] sha1_file: introduce close_one_pack() to close packs on fd pressure

2013-08-01 Thread Brandon Casey
When the number of open packs exceeds pack_max_fds, unuse_one_window() is called repeatedly to attempt to release the least-recently-used pack windows, which, as a side-effect, will also close a pack file after closing its last open window. If a pack file has been opened, but no windows have been