Questions:
KHG says that inodes are read from filesystems, which in turn get
their data from buffer. Now if I mmaped (and faulted) a file will it be
both in memory and buffer ? I think it won't since the size of the buffers
is way smaller than the amount of data mmaped. But this brings more
questions -
Is there any limit on the size of the buffer ? My machine has 48megs
ram and it's not exhausted after X starts. If mmaped file were passed thru
buffer the buffer should have expanded.
Assuming that mmaping doesn't bring data thru buffer what happens
if mmaped file (say executable) was open for reading ? will the data be
fetched anew from the disk or will it be retrieved from the inode ?
I think it's the second since both bufferheads and inodes have pointers
to each other.
What if the data was read thru buffer and later requested
to be mmaped ? Would this incur access to disk ? Will the data be
moved from the buffer to the page ?
And - is there an easy way(read kernel function) to find out the blocks
the page contains ? I have the size, the inode and the offset.
I have read KHG and other guides but could find the
information.. I have also looked in the kernel but I haven't puzzled this
out yet.
Any information is very appreciated
Vladimir Dergachev
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html