Query regarding disk cache in RTEMS
Udit agarwal
dev.madaari at gmail.com
Fri May 18 17:56:59 UTC 2018
On Fri, May 18, 2018 at 11:17 PM, Gedare Bloom <gedare at rtems.org> wrote:
> Udit,
>
> On Thu, May 17, 2018 at 9:13 AM, Udit agarwal <dev.madaari at gmail.com>
> wrote:
> > Hi all,
> > I was looking at the internal working of a benchmark and the way it
> disables
> > cache for direct IO operations, needed to benchmark storage device
> drivers.
> > I have a small query regarding how cache is organized in RTEMS:
> >
> > Usually data transfer model is something like:
> > Application address space --> Page cache --> Write-back cache --> storage
> > device
> > is this model valid for RTEMS too?
> >
> > Moreover, in FreeBSD/Linux, O_DIRECT flag is used with the file
> descriptor
> > to bypass write-back cache. do we have something like that in RTEMS?
> AFAIK,
> > In RTEMS, libblock is used to transfer data to the storage device. So,
> > configuring it like:
> >>
> >> #define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS 0
> >
> > should disable the cache? or is there any other setting that should be
> > tweaked?
> >
>
> I think you are on the right path. We have bdbuf cache as the way to
> buffer block I/O operations. I don't know if that option is enough to
> turn off caching. You should check the user manual, and inspect the
> code.
>
> Sure, We also found that the page cache(that i mentioned up there) was
maintained in newlib itself and can be configured by setvbuf() command.
> > Regards,
> > Udit
> >
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20180518/ecbd0597/attachment-0002.html>
More information about the devel
mailing list