Query regarding disk cache in RTEMS

Gedare Bloom gedare at rtems.org
Fri May 18 17:47:15 UTC 2018


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.

> Regards,
> Udit
>
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list