Re: page_allocation

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

 



Prasanna,

generic_file_read()
       do_generic_file_read()

In do_generic_file_read(), you first try to find the data in page-cache, ==> 
page_hash(mapping,index) and __find_page_nolock(mapping,index,hash)
functions.....

If we get the corresponding page from page-cache and page data is Uptodate, then we are good-to-go, else address_space's ops readpage() called on that page. 

If we do not find the corres. page in page-cache, page_cache_alloc() and add_to_page_cache() path will be taken. Then, the readpage() is done for the alloc'ed page.

Hope this helps.

Thanks,
Vinod



On Wed, 22 Sep 2004 prasanna wakhare wrote :
>Hi,
>Regarding ramfs,it performs read and most other
>filesystems including nfs do with generic_file_read,
>which i think might calss the readpage operation
>internal to filesystem,the readpage arguments consists
>of
>(struct file *,struct page *) .....
>this means the page allocation is dine by VFS itself?
>If this is true most filesystems including NFS
>explicitly allocates Page,
>I'm really confused regarding relation of Page cache
>and file system,
>Please if someone clear my doubts....
>Thanks
>Prasanna
>
>
>
>_______________________________
>Do you Yahoo!?
>Declare Yourself - Register online to vote today!
>http://vote.yahoo.com
>
>--
>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