Daniel Burrows wrote: > On Thu, Nov 13, 2008 at 08:39:18AM -0800, Daniel Burrows <dburrows@debian.org> was heard to say: >> On Sun, Nov 02, 2008 at 06:10:19PM +0200, "Eugene V. Lyubimkin" <jackyf.devel@gmail.com> was heard to say: >>> These investigations incited me to wonder if we... can simply do mmap(2GiB -1) amount of >>> memory, without any troubles?! >> Not on a 32-bit system you can't -- there's nowhere to put all the mappings. > > Ah, I forgot that Linux has a 3GB address space for processes. I > still wouldn't recommend it, though; you're eating 2/3 of the > process's address space when you might not even need it. Well, as I told earlier (or not maybe?..), user process address space is not polluted by mmap()'ed amount of memory at all. Remember those my 23 GiB :) > If you're going to spend time on fixing how apt accesses its files, > I personally would suggest eliminating the use of mmap altogether, Heh. I wish it was so simple :) Apt using mmap for fast-accessible cache in memory to put various small chunks of info. Using of new/delete should lead to great speeddown of work. > or > maybe seeing if you can mmap just the chunk you need at the time you > need it. Within current cache architecture - we can't. I was about to wrote a big patch for solving this, but recently appeared behavior of mmap() incited me to make an effort (much less code and time) in early experimental apt after Lenny to see if we can use it further. -- Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com Ukrainian C++ Developer, Debian APT contributor
Attachment:
signature.asc
Description: OpenPGP digital signature