Re: [9fans] kernel bug

2014-06-04 Thread Anthony Martin
erik quanstrom quans...@quanstro.net once said: i don't know where a history of stuff older than sources (2002) is. /n/sources/extra/9hist Anthony

Re: [9fans] kernel bug

2014-06-03 Thread cinap_lenrek
good catch. thank you. -- cinap

Re: [9fans] kernel bug

2014-06-03 Thread Anthony Martin
Yoann Padioleau p...@fb.com once said: in the newseg() function there is: [...] I think it should be if(mapsize (SEGMAPSIZE)) mapsize = SEGMAPSIZE; Yes, you're correct. The code allows the creation of a segment VM map with more than SEGMAPSIZE Ptes. Personally, I'd remove

Re: [9fans] kernel bug

2014-06-03 Thread erik quanstrom
I think it should be if(mapsize (SEGMAPSIZE)) mapsize = SEGMAPSIZE; hmm. i think this code is correct. ssegmap is a static map to handle small segments. small segments fit in ssegmap. the point must have been to avoid malloc. this test is a little more questionable

Re: [9fans] kernel bug

2014-06-03 Thread andrey mirtchovski
i don't know where a history of stuff older than sources (2002) is. http://swtch.com/plan9history/

Re: [9fans] kernel bug

2014-06-03 Thread erik quanstrom
too bad, i don't see anthony's diff, and i get this error (perhaps unrelated) Too many diffs (26 25). Stopping. - erik

Re: [9fans] kernel bug

2014-06-03 Thread Charles Forsyth
On 3 June 2014 02:14, Yoann Padioleau p...@fb.com wrote: if(mapsize (SEGMAPSIZE*PTEPERTAB)) mapsize = (SEGMAPSIZE*PTEPERTAB); ... I made the change you suggest in the PAE kernel but perhaps Erik missed it during his merge: if(mapsize nelem(s-ssegmap)){ mapsize *= 2;

Re: [9fans] kernel bug

2014-06-03 Thread erik quanstrom
I made the change you suggest in the PAE kernel but perhaps Erik missed it during his merge: if(mapsize nelem(s-ssegmap)){ mapsize *= 2; if(mapsize SEGMAPSIZE) mapsize = SEGMAPSIZE; s-map = smalloc(mapsize*sizeof(Pte*)); s-mapsize = mapsize; } ok. good. that's what happened. perhaps

Re: [9fans] kernel bug

2014-06-03 Thread Charles Forsyth
On 3 June 2014 18:08, erik quanstrom quans...@quanstro.net wrote: ok. good. that's what happened. perhaps some change needs to be made to segattach to mirror this change. I think this is independent. In ibrk I changed the test from using newsize to calculating mapsize first and checking

Re: [9fans] kernel bug

2014-06-03 Thread Charles Forsyth
Looking at the diffs I can see how it might easily be missed, since there are many other changes to allow for different page sizes. It's different again in the 64-bit version, where I really went over the top (nice 1914 centenary reference there) on changes. I'd better put that code somewhere

[9fans] kernel bug

2014-06-02 Thread Yoann Padioleau
Hi, in the newseg() function there is: mapsize = ROUND(size, PTEPERTAB)/PTEPERTAB; if(mapsize nelem(s-ssegmap)){ mapsize *= 2; if(mapsize (SEGMAPSIZE*PTEPERTAB)) mapsize = (SEGMAPSIZE*PTEPERTAB); s-map = smalloc(mapsize*sizeof(Pte*));