[lkml]   [1998]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Real time cache management functions
    On Tue, 16 Jun 1998, Jeff Millar wrote:

    > What features do real time OS's such as VxWorks have that Linux doesn't?
    > A guy at work commented that VxWorks has functions to enable or disable
    > caching of memory ranges and Linux would need similar functions to compete
    > in our moderatly real time (10-30ms) applications. I've seen the recent
    > patches for MTRR on the intel processors, which sounds similar to what he
    > wants.
    > But why intel unique? Does Linux control caching in a cross-platform
    > portable way?

    For 10-30ms performance I would suspect that simply mlocking your
    memory so it never gets paged out would be sufficient. If memory
    caching worries you then what you can do about it depends on the
    processor/architecture you are using. For reasonably new Intel
    processors which support MTRR you can explicitly *disable* caching
    of a given region of memory. For Cyrix processors you can do the
    same thing with their address region registers. Note the emphasis
    on *disable*. You remove by the fluctuation caused by caching
    effects by removing the potential performance gains from caching.
    If you need that hard a real time behaviour you should probably
    be using the real time Linux patches and putting your main code in
    a kernel module so you can tune things directly.

    Of course, if you have a Cyrix 6x86MX you also have the option
    of locking down *L1* cache lines which would give you maximum
    execution speed with no cache artifacts. Everything else loses
    because you have less L1 cache available for them - but a Cyrix
    has a fairly generous L1 cache as they go these days, you could
    run a full CPM86 system in it :-) (Hmmm...)

    What Linux lacks is a generalised interface to all the possible
    ways of manipulating cache control mechanisms. I find it difficult
    to consider this a serious problem though - if you care that much
    about cache artifacts you should be specifying hardware as well
    so you only need specifics.


    | Mike Jagdis | Internet: |
    | Roan Technology Ltd. | |
    | 54A Peach Street, Wokingham | Telephone: +44 118 989 0403 |
    | RG40 1XG, ENGLAND | Fax: +44 118 989 1195 |

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to

     \ /
      Last update: 2005-03-22 13:43    [W:0.019 / U:6.572 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site