[Linux-cachefs] (no subject)

Peter Staubach staubach at redhat.com
Wed Jan 17 15:28:12 UTC 2007


gaurav wrote:
> i am asking this doubt with respect to block devices files.... with 
> respect
> to cache only
> as we know each process have different address spaces so thus this means
> that if any general process access block device data ,which already is
> present in page cache, will allocate new buffer for the data...  or 
> indeed
> uses the same buffer which is already there to access the data.Jus i 
> want to
> know that new copies of data is created on every access of data ?? 

This question isn't particularly relevant to this group, but we can pursue
it a little further.

Access to a block device, via the read(2) and write(2) calls, results in
cached blocks from the block device being shared.  When a process reads
a block from the block device, the page containing the data is located in
the page cache and is then copied into the buffer, which was specific in
the read(2) or write(2) arguments, in the address space of the process.
If another process running on the same system wants to access the same
block of the block device, then the same page in the page cache will be
used to satisfy requests from this second process.

       ps




More information about the Linux-cachefs mailing list