From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32466 invoked by alias); 24 Jun 2005 17:40:39 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 32340 invoked by uid 22791); 24 Jun 2005 17:40:36 -0000 Received: from mh1dmz1.bloomberg.com (HELO mh1dmz1.bloomberg.com) (199.172.169.36) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 24 Jun 2005 17:40:36 +0000 Received: from ns9.bloomberg.com (ns9.bloomberg.com [160.43.164.52]) by mh1dmz1.bloomberg.com with ESMTP for ecos-discuss@sources.redhat.com; Fri, 24 Jun 2005 13:40:32 -0400 Received: from ny2535-dr.corp.bloomberg.com (ny2535-dr.bloomberg.com [172.20.193.74]) by ns9.bloomberg.com (8.11.7p1+Sun/8.10.2) with ESMTP id j5OHZW301528 for ; Fri, 24 Jun 2005 13:35:32 -0400 (EDT) Received: from tk2525.corp.bloomberg.com (unverified) by ny2535-dr.corp.bloomberg.com (Content Technologies SMTPRS 4.3.17) with ESMTP id for ; Fri, 24 Jun 2005 13:35:32 -0400 Received: from ny2532.corp.bloomberg.com ([172.20.73.71]) by tk2525.corp.bloomberg.com with Microsoft SMTPSVC(5.0.2195.6713); Sat, 25 Jun 2005 02:35:31 +0900 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 24 Jun 2005 17:40:00 -0000 Message-Id: <7AB442CEEA0CA04E8DBFEC23DA1759D7066959@ny2532.corp.bloomberg.com> From: "Hook, James" To: Subject: [ECOS] possible fix for eth_drv_recv blocking DSR X-SW-Source: 2005-06/txt/msg00253.txt.bz2 I mask Ethernet driver interrupts at the top of spl_any(), and unmask Ethernet driver interrupts at the bottom of cyg_splx(). This prevents a DSR from executing while the splx_mutex is owned by another thread. This solution assumes that the only time a DSR will be delayed by the scheduler is if the thread that was interrupted had locked the scheduler for some reason. The FreeBSD stack threads do not lock the scheduler so the interrupt mask and mutex acquire operations in spl_any should be atomic. Is this a correct assumption to make? I am worried that a FreeBSD thread will mask the Ethernet driver interrupts while a DSR is pending, and then the DSR will preempt the FreeBSD thread causing a race condition. If the ECOS scheduler guarantees that a DSR will execute immediately after its ISR, then this should not be a problem. Is this the case? Thanks, James Hook -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss