From owner-svn-src-head@FreeBSD.ORG Sat Feb 18 00:35:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C88C0106564A; Sat, 18 Feb 2012 00:35:12 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 8F33F8FC0A; Sat, 18 Feb 2012 00:35:12 +0000 (UTC) Received: from julian-mac.elischer.org (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id q1I0YwuV028572 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 17 Feb 2012 16:34:59 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <4F3EF28E.5030004@freebsd.org> Date: Fri, 17 Feb 2012 16:36:30 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.26) Gecko/20120129 Thunderbird/3.1.18 MIME-Version: 1.0 To: Marcel Moolenaar References: <201202160511.q1G5BZNk099785@svn.freebsd.org> <20120216181210.K1423@besplex.bde.org> <4F3CC40D.4000307@freebsd.org> <4F3CC5C4.7020501@FreeBSD.org> <4F3CC8A5.3030107@FreeBSD.org> <20120216174758.GA64180@nargothrond.kdm.org> <20120217053341.R1256@besplex.bde.org> <20120217000846.GA7641@nargothrond.kdm.org> <4F3D9D03.6020507@FreeBSD.org> <9CB7ECE8-FF10-43BE-9EBD-16953BE3B193@xcllnt.net> <4F3E0596.6040808@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: marcel@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, "Kenneth D. Merry" , Andriy Gapon , src-committers@freebsd.org, Bruce Evans , svn-src-head@freebsd.org Subject: Re: svn commit: r231814 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2012 00:35:12 -0000 > On Feb 16, 2012, at 11:45 PM, Julian Elischer wrote: > *snip* >>> The message buffer does not have to be a chunk of memory that >>> we circularly scribble to. It can be a per-cpu linked list of >>> messages even. > *snip* > >> that is an intersting thought.. though.. how would you sort them into order for >> printing? >> >> maybe a single atomic 64 bit int that is incremented per message. > Yes. Though, a timestamp should do the trick as well. In a multi-core > system, you won't have pure or absolute sequentially anymore. For > messages that are "printed" at the proverbial "same time" on different > cores, ordering is very hard, if not impossible, to determine. A single > atomic counter would force sequentially, but would effectively introduce > serialization, just like locking, and would make a per-cpu message > buffer/list/whatever less useful. bit a single atomic op, while expensive would be within the cost I could live with. > The theory: the closer in time independent messages are printed (on > different cores), the least important their ordering becomes. not necessarily. sometimes teh order is important to find the problem.. ("look, it read it before the other one wrote it").