Re: PG_zero

Andrea Arcangeli
2004-11-02T21:57:25Z

On Tue, Nov 02, 2004 at 01:09:10PM -0800, Andrew Morton wrote:
> The cold pages are mainly intended to be the pages which will be placed
> under DMA transfers. We should never return hot pages in response for a
> request for a cold page.

after the DMA transfer often the cpu will touch the data contents
(all the pagein/reads do that) and the previously cold page will become
hotter than the other hot pages you left in the hot list. I doubt
there's any difference between a cache shoop or a recycle of some cache
entry because we run out of cache (in turn making some random hot cache
as cold). There's a window of time during the dma that may run faster by
allocating hot cache, but in the same window of time some other task may
as well free some hot data in turn avoiding to enter the buddy at all
and to take the zone lock.