Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762112AbZFKDZy (ORCPT ); Wed, 10 Jun 2009 23:25:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756968AbZFKDZq (ORCPT ); Wed, 10 Jun 2009 23:25:46 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.124]:41587 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754155AbZFKDZq (ORCPT ); Wed, 10 Jun 2009 23:25:46 -0400 Date: Wed, 10 Jun 2009 23:25:46 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Hidetoshi Seto cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Thomas Gleixner , Peter Zijlstra , Frederic Weisbecker , Theodore Tso , Arnaldo Carvalho de Melo , Mathieu Desnoyers , Lai Jiangshan , "Martin J. Bligh" , Christoph Hellwig , Li Zefan , Huang Ying , "H. Peter Anvin" , Masami Hiramatsu Subject: Re: [PATCH 3/3] ring-buffer: add design document In-Reply-To: <4A3076C9.2030203@jp.fujitsu.com> Message-ID: References: <20090610195311.767699959@goodmis.org> <20090610195525.429316815@goodmis.org> <4A3076C9.2030203@jp.fujitsu.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1726 Lines: 52 On Thu, 11 Jun 2009, Hidetoshi Seto wrote: > Steven Rostedt wrote: > > + > > + +------+ > > + |reader| RING BUFFER > > + |page |-------------------+ > > + +------+ <---------------+ v > > + | ^ +---+ +---+ +---+ > > + | | | |-->| |-->| | > > + | | | |<--| |<--| |<-+ > > + | | +---+ +---+ +---+ | > > + | | | ^ | | > > + | | +-------------+ | | > > + | +-----------------------------+ | > > + +------------------------------------+ > > It seems the middle of three pages have 2 prev arrows... ? Yes that is a mistake. Thanks, I'll fix it. > > + > > +It does a cmpxchg with the pointer to the previous head page to make it > > +point to the reader page. Note that the new pointer does not have the HEADER > > +flag set. This action atomically moves the head page forward. > > + > > + +------+ > > + |reader| RING BUFFER > > + |page |-------H-----------+ > > + +------+ <---------------+ v > > + | ^ +---+ +---+ +---+ > > + | | | |-->| |-->| | > > + | | | |<--| |<--| |<-+ > > + | | +---+ +---+ +---+ | > > + | | | ^ | | > > + | | +-------------+ | | > > + | +-----------------------------+ | > > + +------------------------------------+ > > + > > Ditto. Ditto too ;-) Thanks, -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/