lkml.org 
[lkml]   [2003]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] fix remap of shared read only mappings
    From
    Date
    On Thu, 2003-09-04 at 17:48, Jamie Lokier wrote:
    > One last thought: this is what PROT_SEM is for. Linux doesn't use
    > this in any useful way. But, technically, mmap with MAP_SHARED ad
    > PROT_SEM should enable cache coherence, and that might include
    > aligning the address. Without PROT_SEM an application should not rely
    > on cache coherence.

    I'm not familiar with the PROT_SEM flag. I don't believe it to be
    defined in POSIX.

    However, POSIX does imply levels of cache coherence for both MAP_SHARED
    and MAP_PRIVATE:

    With MAP_SHARED, any change to the underlying object after the mapping
    must become visible to the mapper (although the change may be delayed by
    local caching of the changer's implementation until it is explicitly
    flushed).

    With MAP_PRIVATE it is undefined what happens if the underlying object
    is changed after mapping.

    So regardless of PROT_SEM we have no choice but to worry about cache
    coherence issues on MAP_SHARED mappings.

    James


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

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