From owner-freebsd-current@FreeBSD.ORG Tue Dec 9 20:44:42 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B86981065673 for ; Tue, 9 Dec 2008 20:44:42 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout018.mac.com (asmtpout018.mac.com [17.148.16.93]) by mx1.freebsd.org (Postfix) with ESMTP id A06DA8FC21 for ; Tue, 9 Dec 2008 20:44:42 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from lynx.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp018.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KBM00DO2MY5V520@asmtp018.mac.com> for freebsd-current@freebsd.org; Tue, 09 Dec 2008 12:44:30 -0800 (PST) Message-id: <30BECC4D-DD91-4C13-8F0B-5A2AE59DFC5D@mac.com> From: Marcel Moolenaar To: Scott Long In-reply-to: <493ED621.5010006@samsco.org> Date: Tue, 09 Dec 2008 12:44:29 -0800 References: <200812081621.mB8GLMxB041498@lava.sentex.ca> <200812081906.mB8J6oha042222@lava.sentex.ca> <200812082049.mB8KnHSN042710@lava.sentex.ca> <84A7F176-5A74-48AC-859A-C0D4C7CBCB48@mac.com> <7.1.0.9.0.20081208173515.13f62e88@sentex.net> <200812091457.mB9EvLSD047534@lava.sentex.ca> <493EA759.4000504@samsco.org> <0E8F5AD4-A139-413E-A760-A1BEDDF44BAA@mac.com> <493ED621.5010006@samsco.org> X-Mailer: Apple Mail (2.929.2) Cc: freebsd-current@freebsd.org, Mike Tancsa Subject: Re: uart vs sio differences ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 20:44:42 -0000 On Dec 9, 2008, at 12:33 PM, Scott Long wrote: > > Yup, my mistake. However, I think that the semaphore spinwait in > uart_sched_softih() is the source of the problems here. It's not a semaphore spinwait. It's just an atomic operation: 1. read old, 2. calculate new from old, 3. atomic_cmpset(old, new) 4. goto 1 if 3 fails. The loop iterates only if ttypend got changed between 1 and 3. There's no spinwaiting and no semaphore-like behaviour. FYI, -- Marcel Moolenaar xcllnt@mac.com