Messages in this thread | | | Date | Sat, 18 Oct 2008 11:54:25 +0300 | From | Pekka Enberg <> | Subject | Re: [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.
| |