Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Feb 2012 16:36:30 -0800
From:      Julian Elischer <julian@freebsd.org>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        marcel@freebsd.org, Eitan Adler <eadler@freebsd.org>, svn-src-all@freebsd.org, "Kenneth D. Merry" <ken@freebsd.org>, Andriy Gapon <avg@freebsd.org>, src-committers@freebsd.org, Bruce Evans <brde@optusnet.com.au>, svn-src-head@freebsd.org
Subject:   Re: svn commit: r231814 - in head/sys: kern sys
Message-ID:  <4F3EF28E.5030004@freebsd.org>
In-Reply-To: <B0FF5A36-FE36-4734-950C-2BB21318161D@xcllnt.net>
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> <B0FF5A36-FE36-4734-950C-2BB21318161D@xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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").






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F3EF28E.5030004>