lkml.org 
[lkml]   [2006]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] splice : two smp_mb() can be omitted
    This patch deletes two calls to smp_mb() that were done after mutex_unlock() 
    that contains an implicit memory barrier.

    The first one in splice_to_pipe(), where 'do_wakeup' is set to true only if
    pipe->inode is set (and in this case the
    if (pipe->inode)
    mutex_unlock(&pipe->inode->i_mutex);
    is done too)

    The second one in link_pipe(), following inode_double_unlock() that contains
    calls to mutex_unlock() too.

    Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
    --- linux/fs/splice.c 2006-10-31 07:49:52.000000000 +0100
    +++ linux-ed/fs/splice.c 2006-10-31 08:04:58.000000000 +0100
    @@ -248,7 +248,6 @@
    mutex_unlock(&pipe->inode->i_mutex);

    if (do_wakeup) {
    - smp_mb();
    if (waitqueue_active(&pipe->wait))
    wake_up_interruptible(&pipe->wait);
    kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
    @@ -1518,7 +1517,6 @@
    * If we put data in the output pipe, wakeup any potential readers.
    */
    if (ret > 0) {
    - smp_mb();
    if (waitqueue_active(&opipe->wait))
    wake_up_interruptible(&opipe->wait);
    kill_fasync(&opipe->fasync_readers, SIGIO, POLL_IN);
    \
     
     \ /
      Last update: 2006-10-31 08:29    [W:0.067 / U:29.504 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site