tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: uvn_fp2 [was: Help with issue with mpt(4) driver]



On Mon, 28 Jan 2013, Brian Buhrow wrote:

> (gdb) print pg
> $1 = (struct vm_page *) 0xc40c4cd0
> (gdb) print *pg
> $2 = {rb_node = {rb_nodes = {0x0, 0x0}, rb_info = 3275287704}, pageq = {
>     queue = {tqe_next = 0xc338ec98, tqe_prev = 0xc1425ad4}, list = {
>       le_next = 0xc338ec98, le_prev = 0xc1425ad4}}, listq = {queue = {
>       tqe_next = 0xc338ec98, tqe_prev = 0xc24efd8c}, list = {
>       le_next = 0xc338ec98, le_prev = 0xc24efd8c}}, uanon = 0x0, 
>   uobject = 0xd37c6684, offset = 18808832, flags = 140, loan_count = 0, 
>   wire_count = 0, pqflags = 512, phys_addr = 3140771840, mdpage = {mp_pp = {
>       pp_lock = {u = {mtxa_owner = 1537}}, pp_u = {u_pte = {pte_ptp = 0x0, 
>           pte_va = 3504025600}, u_head = {pvh_list = {lh_first = 0x0}}, 
>         u_link = 0x0}, pp_flags = 1 '\001', pp_attrs = 7 '\a'}}}

If I did my math right, flags of 140 is 0x8c which is PG_TABLED, PG_CLEAN, 
and PG_RDONLY.

Since the PG_BUSY bit is not set the page is not locked.
And the lack of PG_WANTED means there should be no waiters on the page.

Hm.  Is it possible we have a condition where there are multiple waiters 
for a page, but when the waiters are woken up, one of them grabs 
the page but PG_BUSY and PG_WANTED bits are cleared and the other waiters 
are forgotten?

Anyway, you may want to enable UVMHIST in the kernel and look at the logs.  
They should tell you the sequence of operations on that page, assuming the 
logs don't roll over.  (You may need to do some kernel hacking 'cause last 
time I tried UVMHIST it had initialization issues which required 
reordering things in init_main.c.)  [What you're doing now is like trying 
to reconstruct an airplane collision just from the debris left on the 
ground.  You need to enable the flight recorder.]

Eduardo


Home | Main Index | Thread Index | Old Index