Changeset 24605

Show
Ignore:
Timestamp:
03/27/08 00:42:43 (2 months ago)
Author:
bonefish
Message:
Fixed a quasi-livelock in steal_pages() as proposed in ticket #1929.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • haiku/trunk/src/system/kernel/vm/vm_page.cpp

    r24571 r24605  
    12241224                } 
    12251225                if (tried) { 
    1226                         // we had our go, but there are pages left, let someone else 
    1227                         // try 
     1226                        // We tried all potential pages, but one or more couldn't be stolen 
     1227                        // at that time (likely because their cache was locked). No one 
     1228                        // else will have any better luck, so we'll just retry a little 
     1229                        // later. 
     1230                        // TODO: Think about better strategies. E.g. if our condition 
     1231                        // variables had timeouts, we could just wait with timeout on 
     1232                        // the free page queue condition variable, which could might 
     1233                        // succeed earlier. 
    12281234                        locker.Unlock(); 
    1229                         sFreePageCondition.NotifyOne(); 
    1230                         locker.Lock()
     1235                        snooze(10000); 
     1236                        continue
    12311237                } 
    12321238