Changing location of disk/filesystem cache

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Fri Oct 11 00:20:49 EDT 2013


On Thu, Oct 10, 2013 at 6:00 PM, Greg Freemyer <greg.freemyer at gmail.com>wrote:

>
>
> Mandeep Sandhu <mandeepsandhu.chd at gmail.com> wrote:
> >On Thu, Oct 10, 2013 at 5:00 PM, Ulka Vaze <ulka.vaze at l2it.com> 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.
>

Ulka, Greg,

Thanks a lot for your inputs.

I have a lot of reading up to do, so I'll come back if have any specific
doubts.

Thanks again.

Regards,
-mandeep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131011/512343d1/attachment.html 


More information about the Kernelnewbies mailing list