Discussion:
testbin/huge problem
(too old to reply)
Greg Wang
2011-07-20 08:57:20 UTC
Permalink
hey,

After implement the on-demand loading function, everything works find except
the huge test.
As I observe, at the very beginning, it goes into infinity loop because its
keep calling as_active(). Since as_active() flush the TLB as default, it
just keep flushing and trying to write the same PTE for the same address (it’s a stack address) again and again.
Moreover, the huge test works great if I remove the TLB flushing code.

I really don't get why its doing that.

Thx,
Greg
Greg Wang
2011-07-20 09:01:58 UTC
Permalink
btw, I understand that removing TLB flushing code will not work with
multi-thread program.
I'm considering to add PID into TLB management.

"Greg Wang" 写入消息 news:j0659i$sj0$***@rumours.uwaterloo.ca...

hey,

After implement the on-demand loading function, everything works find except
the huge test.
As I observe, at the very beginning, it goes into infinity loop because its
keep calling as_active(). Since as_active() flush the TLB as default, it
just keep flushing and trying to write the same PTE for the same address (it’s a stack address) again and again.
Moreover, the huge test works great if I remove the TLB flushing code.

I really don't get why its doing that.

Thx,
Greg
Greg Wang
2011-07-20 23:25:00 UTC
Permalink
Update: I change my implementation to only flush the TLB on context
switching between processes, it works with huge test.
However, the forktest is doing the similar thing. Its going back and forth
between two processes and keep flushing the TLB as huge did.

Wish to have an answer and solution.

"Greg Wang" 写入消息 news:j0659i$sj0$***@rumours.uwaterloo.ca...

hey,

After implement the on-demand loading function, everything works find except
the huge test.
As I observe, at the very beginning, it goes into infinity loop because its
keep calling as_active(). Since as_active() flush the TLB as default, it
just keep flushing and trying to write the same PTE for the same address (it’s a stack address) again and again.
Moreover, the huge test works great if I remove the TLB flushing code.

I really don't get why its doing that.

Thx,
Greg
cs350
2011-07-21 20:21:05 UTC
Permalink
If by flushing you mean invalidation, then you can do it the same way
dumbvm does it.

TLB invalidation should not cause infinite loops, because the relevant
translations should still persist in the process's page table(s).

TLB is just a cache for the page table(s), so all the information can be
easily reloaded.

-Alex
Update: I change my implementation to only flush the TLB on context switching
between processes, it works with huge test.
However, the forktest is doing the similar thing. Its going back and forth
between two processes and keep flushing the TLB as huge did.
Wish to have an answer and solution.
hey,
After implement the on-demand loading function, everything works find except
the huge test.
As I observe, at the very beginning, it goes into infinity loop because its
keep calling as_active(). Since as_active() flush the TLB as default, it
just keep flushing and trying to write the same PTE for the same address
(it’s a stack address) again and again.
Moreover, the huge test works great if I remove the TLB flushing code.
I really don't get why its doing that.
Thx,
Greg
Loading...