--- Log opened Wed Jan 08 00:00:44 2014 | ||
-!- rah_ is now known as rah | 09:30 | |
-!- Netsplit *.net <-> *.split quits: vxe | 14:40 | |
-!- Netsplit over, joins: vxe | 14:43 | |
stekern | jonibo: you around? | 15:11 |
---|---|---|
jonibo | yup, for once :) | 15:11 |
jonibo | what's up, stekern? | 15:12 |
stekern | ;) | 15:12 |
stekern | I'm wondering if the PTRS_PER_PGD in pgtable.h isn't wrong for openrisc? | 15:12 |
jonibo | wouldn't be surprised | 15:13 |
stekern | I'm thinking that a patch to correct it would be something like this: http://pastie.org/8614115 | 15:13 |
jonibo | what's it set to | 15:13 |
stekern | it's set to (1<<(PAGE_SHIFT-2)) = 2048 | 15:14 |
stekern | but IMO it should be 256 | 15:14 |
stekern | that formula happens to work for 4k pagetables and it looks like it was copied from cris (which I assume have 4k page tables) | 15:15 |
jonibo | openrisc is one of the few oddballs that has 8k pagetables | 15:15 |
jonibo | pages | 15:15 |
stekern | yes, pages, sorry ;) | 15:15 |
jonibo | i know i've seen this before and I recall leaving it as it was for some reason | 15:16 |
jonibo | ...can't quite recall why, right now | 15:16 |
stekern | probably because it breaks the code in init.c, but I think that was wrong too | 15:16 |
stekern | but I'm not certain about that, that's where I'd like your input | 15:16 |
jonibo | PTRS_PER_PTE... doesn't that seem weird? | 15:18 |
jonibo | isn't a PTE a pointer? | 15:18 |
stekern | I think the name is weird | 15:18 |
stekern | but that's what linux seem to call it ;) | 15:18 |
stekern | isn't it "number of pointers in the last pagetable" | 15:19 |
jonibo | yeah, should be | 15:19 |
jonibo | so we have pgd, pmd, and pte | 15:20 |
jonibo | pte has 2048 pts | 15:20 |
jonibo | pmd has 2048 ptrs | 15:20 |
stekern | and if I understand what that code in init.c does, it fills an area that should represent "the last pagetable" | 15:20 |
jonibo | my head's not working today... how many do we need in the top level then | 15:21 |
jonibo | 256? | 15:21 |
stekern | yes | 15:21 |
jonibo | where in init.c? | 15:21 |
stekern | the thing I change in the pastie I pasted: http://pastie.org/8614115 | 15:22 |
jonibo | ok | 15:22 |
jonibo | ok, right... PTRS_PER_PGD kind of assumes that all the page directories are full | 15:24 |
jonibo | which isn't the case | 15:24 |
jonibo | ok, I think your patch is good | 15:25 |
jonibo | does it have implications elsewhere... is having a correct value of PTRS_PER_PGD useful somewhere else | 15:25 |
stekern | good, I'll smack a nice commit message on it and post it then ;) | 15:26 |
jonibo | please do | 15:26 |
stekern | from what I can see, no, it's only used in arch specific parts | 15:27 |
stekern | so, the only disadvantage with having it wrong was that we spent a couple of cycles extra here: http://lxr.free-electrons.com/source/arch/openrisc/mm/init.c#L143 | 15:29 |
jonibo | I think, when we init a new process, we copy the kernel's page table entries to the new process's page tables, as well... we probably copy too much there, too | 15:31 |
stekern | swapper_pg_dir is set to be 8192 bytes in head.S, which is "wrong" too, but perhaps the _unhandled_stack that is defined after it needs to be page aligned | 15:31 |
jonibo | i don't even remember where unhandled_stack is used | 15:32 |
jonibo | ...i'd say it should definitely be page aligned | 15:32 |
jonibo | swapper_pg_dir size is wrong, yes, but it makes sense to allocate a page for the page directories | 15:32 |
jonibo | ...but I suppose the space could be used for something else if we fixed it up | 15:33 |
jonibo | the alignment of unhandled_stack is easy enough to fix | 15:33 |
stekern | yup | 15:33 |
jonibo | feel free to fix that up, if you want | 15:34 |
jonibo | i'd also be interested in having the swapper_pg_dir preinitialized... it's in .data after all, not .bss | 15:34 |
jonibo | not sure if that's feasible | 15:34 |
stekern | me neither, I can look around a bit what others do with it | 15:36 |
stekern | but, got to run, thanks for the input! | 15:36 |
jonibo | sure, my pleasure | 15:36 |
jonibo | good to hear from you | 15:37 |
stekern | ditto | 15:39 |
-!- olofk_ is now known as olofk | 16:25 | |
--- Log closed Thu Jan 09 00:00:46 2014 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!