lkml.org 
[lkml]   [2008]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH 1/21] relay - Clean up relay_switch_subbuf() and make waking up consumers optional.
    Hi Tom,

    Tom Zanussi wrote:
    > +static inline void relay_update_filesize(struct rchan_buf *buf, size_t length)
    > +{
    > + if (buf->dentry)
    > + buf->dentry->d_inode->i_size += length;
    > + else
    > + buf->early_bytes += length;
    > +
    > + smp_mb();
    > +}

    A minor nit: you should probably add a comment for that memory barrier.
    That is, explain why it is needed. It makes a world of a difference to
    anyone trying to understand what's going on here.


    \
     
     \ /
      Last update: 2008-10-18 11:01    [W:5.091 / U:1.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site