[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48F9A441.3030400@cs.helsinki.fi>
Date: Sat, 18 Oct 2008 11:54:25 +0300
From: Pekka Enberg <penberg@...helsinki.fi>
To: Tom Zanussi <zanussi@...cast.net>
CC: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Martin Bligh <mbligh@...gle.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
prasad@...ux.vnet.ibm.com,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Mathieu Desnoyers <compudj@...stal.dyndns.org>,
Steven Rostedt <rostedt@...dmis.org>, od@...e.com,
"Frank Ch. Eigler" <fche@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>, hch@....de,
David Wilder <dwilder@...ibm.com>,
Jens Axboe <jens.axboe@...cle.com>,
Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists