Mandeep Sandhu <mandeepsandhu.chd@xxxxxxxxx> wrote: >On Thu, Oct 10, 2013 at 5:00 PM, Ulka Vaze <ulka.vaze@xxxxxxxx> wrote: > >> Hi, >> disk cache is same as filesystem cache. Also called buffer cache. >> This is implemneted below fs layer. >> It is basically a cache of disk blocks mainatined in RAM. (In pages) >> called buffers. >> > >Ok. So this won't contain "files" but rather "blocks" many of which >will >represent a single file? The buffer cache knows nothing about files. It may happen to contain the blocks that correspond to a complete file, but the buffer cache doesn't have any way to know that. >> The purpose of this cache is to improve performance as disk devices >are >> slow. >> You can access this cache from the kernel. >> Block layer accesses this from the request structure and commits >blocks on >> disk. >> There are more layers in between like IOschedulers / SCSI etc. >> > >Where does the mapping for file to disk pages/blocks exist? Is it in >the >inode or dentry entries or something else? That is a very filesystem dependent question. In general dentry entries point to inodes and inodes point to blocks of pointers. Those pointers point to actual data blocks. You need to discuss a specific filesystem type to even start to discuss anything specific. Ie. Does the fat filesystem have an equivalent of inodes? >> How does your device accesses files ? >> > >The device itself runs stripped down version of a fairly recent Linux >version (3.x). It has DMA capabilities to transfer content to/from the >hosts memory from/to it's own. If 3.x is really current you have 2 more options at least: dm-cache and bcache. I don't know much about either, but they are going to be better options for I think than the traditional buffer cache. Greg -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies