[lkml]   [2008]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RESEND] [PATCH] VFS: make file->f_pos access atomic on 32bit arch

    At 15:43 08/10/07, Andi Kleen wrote:
    >Hisashi Hifumi <> writes:
    >> Hi Andrew.
    >> Currently reading or writing file->f_pos is not atomic on 32bit environment,
    >> so two or more simultaneous access can corrupt file->f_pos value.
    >> There are some past discussions about this issue, but this is not fixed yet.
    >Have you benchmarked if cmpxchg is cheaper than the seqlock? It's not
    >clear to me a seqlock is really the right locking primitive for
    >this. Normally seqlocks should be used when reading is much more
    >frequent than writing, but it's doubtful that this is actually the
    >case for f_pos.

    Maybe cmpxchg8b is good for i486 or later x86, but i386 or other architectures
    that do not have similar instruction needs some locking primitive. I think lazy
    seqlock is one option for making file->f_pos access atomic.

     \ /
      Last update: 2008-10-07 12:17    [W:0.025 / U:1.428 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site