On Fri, Aug 13, 2004 at 12:08:34 -0400, Lei Yang wrote: > Hello, > > Could anyone please tell me what PAGE_CACHE_SIZE is for? I saw it here > in /mm/filemap.c The code you showed walks pages in page cache. If there are more pages, the current one is PAGE_CACHE_SIZE bytes. If it's the last one, it is the remainder (size & ~PAGE_CACHE_MASK) bytes. The PAGE_CACHE_SHIFT is the "order" of bytes in one page. The PAGE_CACHE_SIZE is the number of bytes in one page and is equal to (1 << PAGE_CACHE_SHIFT). And PAGE_CACHE_MASK is the bytes significant for selecting a page, ie. ~(PAGE_CACHE_SIZE - 1). ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb@xxxxxx>
Attachment:
signature.asc
Description: Digital signature