Re: Page Replacement in 2.6.10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rik,
Yes that would work :) I was looking at a 32 bit identifier, but seems like that won't happen. However, just one more question.


kswapd calls balance_pgdat() which inturns calls 2 major functions:
- shrink_zone
- shrink_slab

shrink_zone calls shrink_cache, which creates a list of pages that it should evict. It then calls shrink_list with this list. shrink_list calls try_to_unmap, which does this:

if (PageAnon(page))
                ret = try_to_unmap_anon(page);
        else
                ret = try_to_unmap_file(page);


Now here's where i'm confused:
Where are the disk buffers being handled? wasn't the page cache and buffer cache unified to give the "new and improved" page cache? To elaborate, suppose i read a file from disk via a read() for instance. The disk blocks that i read would be cached somewhere right? I assumed it would be in the "buffer cache", which in Linux's case is the page cache. But i cannot see these types of pages being handled :(
Thanks
Rahul




Rik van Riel wrote:

On Sun, 27 Mar 2005, Rahul Iyer wrote:



ok, i can store the swp_entry_t as an id for the anonymous pages... but what
about file backed ones? there doesn't seem to be any id as there needs to be
none. Am i right here?



How about storing (mapping, offset) tuples ?




-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux