[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] [[!tag open_issue_gnumach]] # IRC, freenode, #hurd, 2012-04-23 btw, i'm running a gnumach version using red-black trees for vm map entries braunr: sounds fashionable ;-) braunr: with some perf improvement? looks promising for our ext2fs instances showing several thousands of map entries youpi: i'm not using it for lookups yet but the tree is there, maintained, used for both regular and copy maps, and it doesn't crash good :) antrik: isn't it ? :) youpi: and the diff stat is like 50/15 braunr: what's the goal of using the fashionable trees? antrik: speeding up lookups in address spaces braunr: so the idea is that if we have a heavily fragmented address space, the performance penalty is smaller? yes OK I take it you gave up on attempts to actually decrease fragmentation?... it's not as good as reducing fragmentation, which requires implementing a powerful merge, but it's still better yes it's too messy for my brain :/ I see oh it will add some overhead though I guess log(n) ? but if there is a significant performance gain, it'll be worth it yes i was more thinking about the memory overhead right now it's a linear list? I don't think we care nowadays :) antrik: yes ouch antrik: yes ... :> the original authors expected vm maps to have like 30 entries so they used a list for the maps, and a hash table for the object/offset to physical page lookups there is a small lookup cache though, which is a nice optimization my code now uses it first, and falls back to the RB tree if the hint didn't help braunr: well, don't forget to check whether it actually *is* still an optimisation, when using fashionable trees ;-) antrik: i checked that already :) i did the same in x15 I see both bsd and linux uses a similar technique use* (well, bsd actually use what is done in mach :) (or perhaps the other way around... ;-) ) i don't think so, as the bsd vm is really the mach vm but we don't care much oh, right... that part actually went full circle youpi: i have a patch ready for test on machines with significant amounts of map entries (e.g. the buildds ..) youpi: i won't have time for tests tonight, are you interested ? (i've been running it for 15 minutes without any issue for now) I'd say post to the list ok braunr: your patch uses the rb tree for lookups, right? braunr: the buildd using rbtree seems swift but maybe it's just a psychologic effect :) the chroot ext2fs already has 1392 lines in vminfo an rbtree can't hurt there :) braunr: it really seems faster the reboot might have helped too benchmarks shall say for now, I'll just let ironforge use it youpi: it's always fast after a reboot ;-) sure but still I mean *obviously* the reboot has helped but it might not be all at least it feels so and obviously only benchmarks can say the major benefit AIUI is rather that the slowdown happening over time will be less noticable [[performance/degradation]]. "over time" is actually quite fast ext2 fills up very quickly when you build a package it went up to 1700 lines very quickly and stabilized around there yeah, it can be very fast under heavy load that's why I say reboot seems not all it's already not so fresh with 1700 lines in vminfo well, I don't know how much of the slowdown I'm experiencing (after doing stuff under memory pressure) is actually related to VM map fragmentation... might be all, might be none, might be something in between then try his patch guess I should play a bit with vminfo... well, currently I actually experience pretty little slowdown, as for certain reasons (only indirectly related to the Hurd) I'm not running mutt on this machine, so I don't really have memory pressure... ## IRC, freenode, #hurd, 2012-04-24 youpi: yes, it uses bst lookups youpi: FYI, the last time i checked, one ext2fs instance had 4k+ map entries, and another around 7.5k (on ironforge) ## IRC, freenode, #hurd, 2012-04-24 braunr: $ sudo vminfo 624 | wc -l 22957 there's no way it can not help :) youpi: 23k, that's really huge ## IRC, freenode, #hurd, 2012-04-26 youpi: any new numbers wrt the rbtree patch ? well, buildd times are not really accurate :) but what I can tell is that it managed to build qtwebkit fine ok so the patch is probably safe :) i'll commit it soon then I'd say feel free to, yes thanks ## IRC, freenode, #hurd, 2012-04-27 elmig: don't expect anything grand though, this patch is mostly useful when address spaces get really fragmented, which mainly happens on buildds (and it only speeds lookups, which isn't as good as reducing fragmentation; things like fork still have to copy thousands of map entries) [[glibc/fork]]. ## IRC, freenode, #hurdfr, 2012-06-02 braunr: oh, un bug de rbtree Assertion `diff != 0' failed in file "vm/vm_map.c", line 1002 c'est dans rbtree_insert() vm_map_enter (vm/vm_map.c:1002). vm_map (vm/vm_user.c:373). syscall_vm_map (kern/ipc_mig.c:657). erf j'ai tué mon débuggueur, je ne peux pas inspecter plus le peu qui me reste c'est qu'apparemment target_map == 1, size == 0, mask == 0 anywhere = 1 youpi: ça signifie sûrement que des adresses overlappent je rejetterai un coup d'oeil sur le code demain (si ça se trouve c'est un bug rare de la vm, le genre qui fait crasher le noyau) (enfin jveux dire, qui faisait crasher le noyau de façon très obscure avant le patch rbtree)