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

Re: [PATCH v2 2/2] convert: Stream from fd to required clean filter instead of mmap

From
Duy Nguyen <pclouds@gmail.com>
Date
Aug 17, 2014, 11:33 UTC
Message-ID
<CACsJy8BUBfQeny4iu6nZ+pCy84_=8EEfEHY3pWLpx_1PLCwC5w@mail.gmail.com>
In-Reply-To
<C1695CEB-B278-422A-90D6-C3EAD8B6638C@zib.de>
On Sun, Aug 17, 2014 at 5:25 PM, Steffen Prohaska <prohaska@zib.de> wrote:
Show 18 quoted lines
>
> On Aug 17, 2014, at 9:27 AM, Jeff King <peff@peff.net> wrote:
>
>> On Sat, Aug 16, 2014 at 06:26:08PM +0200, Steffen Prohaska wrote:
>>
>>>> Is the 15MB limit supposed to be imposed somewhere or is it just a guide
>>>> of how much memory we expect Git to use in this scenario?
>>>
>>> The test should confirm that the the file that is added is not mmapped
>>> to memory.  The process size should be relatively small independently
>>> of the size of the file that is added.  I wanted to keep the file size
>>> small.  The chosen sizes worked for me on Mac and Linux.
>>
>> Measuring memory usage seems inherently a bit flaky for the test suite.
>> It's also a little out of place, as the test suite is generally about
>> correctness and outcomes, and this is a performance issue.
>
> For files >2GB on a 32-bit system (e.g. msysgit), filtering with the previous code always failed.  Now it works.  I created the patch to change git from 'fundamentally doesn't handle this' to 'works as expected'.

I deal with similar problem and added $GIT_ALLOC_LIMIT to test large blob code. Maybe we could add $GIT_MMAP_LIMIT? I don't suppose we call xmmap/xmalloc so often that the extra test would slow git down.

-- 
Duy
Previous: Steffen ProhaskaNext: Jeff King
Message 11 of 13 in “Stream fd to clean filter”
  1. 0/2 Stream fd to clean filterSteffen Prohaska, Aug 6, 2014
  2. 1/2 convert: Refactor would_convert_to_git() to single arg 'path'Steffen Prohaska, Aug 6, 2014
  3. 2/2 convert: Stream from fd to required clean filter instead of mmapSteffen Prohaska, Aug 6, 2014
  4. John KeepingAug 16, 2014
  5. Steffen ProhaskaAug 16, 2014
  6. Andreas SchwabAug 16, 2014
  7. Steffen ProhaskaAug 17, 2014
  8. Andreas SchwabAug 17, 2014
  9. Jeff KingAug 17, 2014
  10. Steffen ProhaskaAug 17, 2014
  11. Duy NguyenAug 17, 2014
  12. Jeff KingAug 19, 2014
  13. Steffen ProhaskaAug 19, 2014

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.