Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#344 closed defect (fixed)

as_area_destroy() broken on ppc32

Reported by: Martin Decky Owned by: Martin Decky
Priority: critical Milestone: 0.5.0
Component: helenos/kernel/ppc32 Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description (last modified by Martin Decky)

The implementation of as_area_destroy() seems to be broken on ppc32. The framebuffer server is killed due to various memory management problems. The user space heap allocator has been extensively examined and tested on other platforms and it doesn't seem to be the culprit.

The problem can be worked around by removing the memory sharing code in the framebuffer server. The problem can be completely worked around by changing the kernel function sys_as_area_destroy() into a no-op.

Change History (6)

comment:1 by Martin Decky, 13 years ago

Owner: changed from Jakub Jermář to Martin Decky
Status: newaccepted

Fixed in mainline,987 for ppc32. Initially, the Page Hash Table was used more like a huge TLB on ppc32. However, this is slightly misguided since the PHT is closer to Translation Storage Buffer on sparc64 (except that it is mandatory, while TLB is optional on ppc32). Currently the PHT gets invalidated correctly in as_area_destroy() and friends (although the current solution is suboptimal).

Last edited 13 years ago by Martin Decky (previous) (diff)

in reply to:  1 ; comment:2 by Jakub Jermář, 13 years ago

Replying to decky:

Fixed in mainline,987 for ppc32. Initially, the Page Hash Table was used more like a huge TLB on ppc32. However, this is slightly misguided since the PHT is closer to Translation Storage Buffer on sparc64 (except that it is mandatory, while TLB is optional on ppc32). Currently the PHT gets invalidated correctly in as_area_destroy() and friends (although the current solution is suboptimal).

So what was the actual problem? IMO, it should not matter much whether the PHT is viewed either as an TLB or as an TSB. Note that the two are being invalidated together inside the TLB shootdown critical section (or very close to each other).

in reply to:  2 ; comment:3 by Martin Decky, 13 years ago

So what was the actual problem? IMO, it should not matter much whether the PHT is viewed either as an TLB or as an TSB. Note that the two are being invalidated together inside the TLB shootdown critical section (or very close to each other).

The problem was that the PHT was not invalidated at all in this particular case, only the real TLB was.

in reply to:  3 comment:4 by Jakub Jermář, 13 years ago

The problem was that the PHT was not invalidated at all in this particular case, only the real TLB was.

Oh, ok. I see. tlb_invalidate_pages() and tlb_invalidate_all() didn't do the right thing, whereas tlb_invalidate_asid() did.

comment:7 by Martin Decky, 13 years ago

Description: modified (diff)
Resolution: fixed
Status: acceptedclosed
Summary: as_area_destroy() broken on mips32, ppc32as_area_destroy() broken on ppc32

The ticket has been edited to talk only about the ppc32 issue, which has been already solved. A separate ticket for mips32 will be created.

comment:8 by Martin Decky, 13 years ago

Component: helenos/kernel/genarchhelenos/kernel/ppc32
Note: See TracTickets for help on using tickets.