From owner-svn-src-head@FreeBSD.ORG Fri Feb 17 17:03:15 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 3B1F5106564A; Fri, 17 Feb 2012 17:03:15 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id E26038FC22; Fri, 17 Feb 2012 17:03:14 +0000 (UTC) Received: from [172.23.7.53] (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q1HH32vJ004385 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 17 Feb 2012 09:03:08 -0800 (PST) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=iso-8859-1 From: Marcel Moolenaar In-Reply-To: <4F3E0596.6040808@freebsd.org> Date: Fri, 17 Feb 2012 09:03:02 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: 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> To: Julian Elischer X-Mailer: Apple Mail (2.1257) 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: Fri, 17 Feb 2012 17:03:15 -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? >=20 > 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. The theory: the closer in time independent messages are printed (on different cores), the least important their ordering becomes. --=20 Marcel Moolenaar marcel@xcllnt.net