Re: [RFC PATCH 1/21] relay - Clean up relay_switch_subbuf() and makewaking up consumers optional.

From: Pekka Enberg
Date: Sat Oct 18 2008 - 04:58:21 EST


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