Print this page
re #13613 rb4516 Tunables needs volatile keyword


 327 
 328         while (plist != NULL) {
 329                 pp = plist;
 330                 page_sub(&plist, pp);
 331                 page_io_unlock(pp);
 332                 if (flags & B_ERROR) {
 333                         /*LINTED: constant in conditional context*/
 334                         VN_DISPOSE(pp, B_INVAL, 0, kcred);
 335                 } else {
 336                         (void) page_release(pp, 0);
 337                 }
 338         }
 339 }
 340 
 341 /*
 342  * Automagic pageout.
 343  * When memory gets tight, start freeing pages popping out of the
 344  * write queue.
 345  */
 346 int     write_free = 1;
 347 pgcnt_t pages_before_pager = 200;       /* LMXXX */
 348 
 349 /*
 350  * Routine to be called when page-out's complete.
 351  * The caller, typically VOP_PUTPAGE, has to explicity call this routine
 352  * after waiting for i/o to complete (biowait) to free the list of
 353  * pages associated with the buffer.  These pages must be locked
 354  * before i/o is initiated.
 355  *
 356  * If a write error occurs, the pages are marked as modified
 357  * so the write will be re-tried later.
 358  */
 359 
 360 void
 361 pvn_write_done(page_t *plist, int flags)
 362 {
 363         int dfree = 0;
 364         int pgrec = 0;
 365         int pgout = 0;
 366         int pgpgout = 0;
 367         int anonpgout = 0;




 327 
 328         while (plist != NULL) {
 329                 pp = plist;
 330                 page_sub(&plist, pp);
 331                 page_io_unlock(pp);
 332                 if (flags & B_ERROR) {
 333                         /*LINTED: constant in conditional context*/
 334                         VN_DISPOSE(pp, B_INVAL, 0, kcred);
 335                 } else {
 336                         (void) page_release(pp, 0);
 337                 }
 338         }
 339 }
 340 
 341 /*
 342  * Automagic pageout.
 343  * When memory gets tight, start freeing pages popping out of the
 344  * write queue.
 345  */
 346 int     write_free = 1;
 347 volatile pgcnt_t pages_before_pager = 200;      /* LMXXX */
 348 
 349 /*
 350  * Routine to be called when page-out's complete.
 351  * The caller, typically VOP_PUTPAGE, has to explicity call this routine
 352  * after waiting for i/o to complete (biowait) to free the list of
 353  * pages associated with the buffer.  These pages must be locked
 354  * before i/o is initiated.
 355  *
 356  * If a write error occurs, the pages are marked as modified
 357  * so the write will be re-tried later.
 358  */
 359 
 360 void
 361 pvn_write_done(page_t *plist, int flags)
 362 {
 363         int dfree = 0;
 364         int pgrec = 0;
 365         int pgout = 0;
 366         int pgpgout = 0;
 367         int anonpgout = 0;