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

Re: buffer head and buffer pages





> > mapped data. Will both these pages ( the page that holds
> > the buffer_head
> > structure and buffer page that contains the actual data)
> > mapped to the
> > process OR only the page with the buffer_head is mapped
> > to the process ?
>
>  The buffer head is never mapped into user address space.
> It is a kernel data structure and doesn't have to be
> accessed from userspace.
>  The buffer itself holds data from a file. If the file
> is mmap'ed (or is executable code), then the page is
> mapped into user space. If the file is accessed using
> read/write, then it isn't.

  Thanks for the reply. If  for a page, that is mapped to a process,
page->buffers is non-null
then does that mean that the page contains data from the mmapped file ?
and one more thing, in function try_to_swap_out() the page for which
page->buffers is non-null then we do not free the page then. Why dont we
free the buffers then ?

 Thanks,
 Raghu


>
> Hope this helps,
> Ravi.
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/