|
|
| version 1.19, 2004/03/23 22:54:32 | version 1.20, 2004/05/13 17:40:19 |
|---|---|
| Line 698 RestartScan: | Line 698 RestartScan: |
| /* | /* |
| * scan this entry one page at a time | * scan this entry one page at a time |
| */ | */ |
| while(addr < cend) { | while (addr < cend) { |
| /* | /* |
| * Check pmap first, it is likely faster, also | * Check pmap first, it is likely faster, also |
| * it can provide info as to whether we are the | * it can provide info as to whether we are the |
| Line 709 RestartScan: | Line 709 RestartScan: |
| vm_pindex_t pindex; | vm_pindex_t pindex; |
| vm_ooffset_t offset; | vm_ooffset_t offset; |
| vm_page_t m; | vm_page_t m; |
| int s; | |
| /* | /* |
| * calculate the page index into the object | * calculate the page index into the object |
| */ | */ |
| offset = current->offset + (addr - current->start); | offset = current->offset + (addr - current->start); |
| pindex = OFF_TO_IDX(offset); | pindex = OFF_TO_IDX(offset); |
| m = vm_page_lookup(current->object.vm_object, | |
| pindex); | |
| /* | /* |
| * if the page is resident, then gather information about | * if the page is resident, then gather |
| * it. | * information about it. spl protection is |
| * required to maintain the object | |
| * association. And XXX what if the page is | |
| * busy? What's the deal with that? | |
| */ | */ |
| s = splvm(); | |
| m = vm_page_lookup(current->object.vm_object, | |
| pindex); | |
| if (m && m->valid) { | if (m && m->valid) { |
| mincoreinfo = MINCORE_INCORE; | mincoreinfo = MINCORE_INCORE; |
| if (m->dirty || | if (m->dirty || |
| Line 731 RestartScan: | Line 738 RestartScan: |
| mincoreinfo |= MINCORE_REFERENCED_OTHER; | mincoreinfo |= MINCORE_REFERENCED_OTHER; |
| } | } |
| } | } |
| splx(s); | |
| } | } |
| /* | /* |