From owner-freebsd-smp Mon Mar 25 16:39:46 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 82FFE37B400; Mon, 25 Mar 2002 16:39:40 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id LAA22807; Tue, 26 Mar 2002 11:39:32 +1100 Date: Tue, 26 Mar 2002 11:39:59 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Doug Rabson Cc: John Baldwin , Jake Burkholder , , Andy Isaacson Subject: Re: printf locking (was Re: FreeBSD 4.5: Second CPU Not Working on Dell PowerEdge 1650) In-Reply-To: <20020325190742.B99274-100000@salmon.nlsystems.com> Message-ID: <20020326112755.P3192-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, 25 Mar 2002, Doug Rabson wrote: > On Mon, 25 Mar 2002, John Baldwin wrote: > > > > > Hmmmm. Well, we really need proper printf locking (which probably shouldn't > > use blocking locks). > > Weren't there some patches (from chuckp?) floating around to do this. > Something along the lines of a trylock which buffers characters > somewhere if it fails. I wanted this (again) recently - I couldn't work > out why syscons kept wedging until I remembered there were no locks on the > console. In the end, I just switched to a serial console. Message buffer locking also broken. It apparently never even used splhigh() except for addlog() and log(). I think cp's patch was to fix this and not to fix syscons. kvprintf() and console output routines are not permitted to block or delay console output, since they may be called from ddb from almost anywhere. syscons has 2 types of locking bugs: - it sometimes wanders into the scheduling code for things related to delayed screen updates - it doesn't have any locking for its screen pointer or data structure updates. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message