From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751829AbYJRI6T (ORCPT ); Sat, 18 Oct 2008 04:58:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750910AbYJRI6J (ORCPT ); Sat, 18 Oct 2008 04:58:09 -0400 Received: from courier.cs.helsinki.fi ([128.214.9.1]:42645 "EHLO mail.cs.helsinki.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750787AbYJRI6H (ORCPT ); Sat, 18 Oct 2008 04:58:07 -0400 Message-ID: <48F9A441.3030400@cs.helsinki.fi> Date: Sat, 18 Oct 2008 11:54:25 +0300 From: Pekka Enberg User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: Tom Zanussi CC: Linux Kernel Mailing List , Martin Bligh , Peter Zijlstra , prasad@linux.vnet.ibm.com, Linus Torvalds , Thomas Gleixner , Mathieu Desnoyers , Steven Rostedt , od@suse.com, "Frank Ch. Eigler" , Andrew Morton , hch@lst.de, David Wilder , Jens Axboe , Eduard - Gabriel Munteanu Subject: Re: [RFC PATCH 1/21] relay - Clean up relay_switch_subbuf() and make waking up consumers optional. References: <1224137126.16328.220.camel@charm-linux> In-Reply-To: <1224137126.16328.220.camel@charm-linux> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.