Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 9 years ago

Closed 9 years ago

Last modified 9 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 Changed 9 years ago by Martin Decky

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).

The question how this relates to mips32 (except for similar symptoms) is still open.

Version 0, edited 9 years ago by Martin Decky (next)

comment:2 in reply to:  1 ; Changed 9 years ago by Jakub Jermář

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).

comment:3 in reply to:  2 ; Changed 9 years ago by Martin Decky

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.

comment:4 in reply to:  3 Changed 9 years ago by Jakub Jermář

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 Changed 9 years ago by Martin Decky

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 Changed 9 years ago by Martin Decky

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