K 10 svn:author V 5 markj K 8 svn:date V 27 2016-05-23T06:13:35.750854Z K 7 svn:log V 1674 Run dirty pages through the inactive queue before the laundry queue. This change modifies the active queue aging scan to place dirty pages in the inactive queue rather than the laundry queue. vm_page_advise() is modified similarly. One side effect of this change is that dirty pages are given more time to be reactivated instead of being paged out. However, this is not its primary motivation. Pushing dirty pages through the inactive queue establishes a temporal relationship between the inactive and laundry queues and results in a more cohesive LRU page replacement mechanism. In the absence of this change, the pagedaemon and laundry threads have little information about each other's activity, and we can say little about the relative ages of the pages at the beginning of the inactive and laundry queues at a given point in time. However, in general we would prefer to avoid laundering a given page until some number of clean pages have been reclaimed in an attempt to satisfy a page shortage. The implemented laundering policy uses the ratio of dirty to clean inactive pages to set a minimum threshold for laundering, but without a shared queue, we cannot be satisfied that all less-recently-used clean pages have been reclaimed before deciding to launder a dirty page. A downside to this change is that the pagedaemons are forced to expend more CPU cycles handling dirty pages, as they must now examine dirty pages twice. However, this cost is small relative to that of a swap pageout. It may be reasonable to move vnode-backed pages directly to the laundry queue, but this change aims to minimize differences in behaviour with respect to HEAD. Reviewed by: alc END