From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27892 invoked by alias); 29 Jun 2005 10:47:14 -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 27857 invoked by uid 22791); 29 Jun 2005 10:47:10 -0000 Received: from ns2328.ovh.net (HELO ns1.neotion.com) (213.186.42.156) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 29 Jun 2005 10:47:10 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by ns1.neotion.com (Postfix) with ESMTP id 764EBF803A; Wed, 29 Jun 2005 12:36:43 +0200 (CEST) Received: from ns1.neotion.com ([127.0.0.1]) by localhost (ns1.neotion.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03672-04; Wed, 29 Jun 2005 12:36:43 +0200 (CEST) Received: from srvmail.neotion.com (mail-relay.neotion.int [192.168.3.1]) by ns1.neotion.com (Postfix) with ESMTP id 1D415F8007; Wed, 29 Jun 2005 12:36:43 +0200 (CEST) Received: from localhost (localhost.atsky.fr [127.0.0.1]) by srvmail.neotion.com (Postfix) with ESMTP id A73933B0019; Wed, 29 Jun 2005 12:46:44 +0200 (CEST) Received: from srvmail.neotion.com ([127.0.0.1]) by localhost (srvmail.neotion.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09358-05; Wed, 29 Jun 2005 12:46:43 +0200 (CEST) Received: from passerelle.neotion.int (passerelle.neotion.int [10.0.0.141]) by srvmail.neotion.com (Postfix) with ESMTP id C019D3B0018; Wed, 29 Jun 2005 12:46:43 +0200 (CEST) Received: from localhost (localhost.neotion.int [127.0.0.1]) by passerelle.neotion.int (Postfix) with ESMTP id 66E79F70055; Wed, 29 Jun 2005 12:24:06 +0200 (CEST) Received: from passerelle.neotion.int ([127.0.0.1]) by localhost (passerelle.neotion.int [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10916-01; Wed, 29 Jun 2005 12:24:06 +0200 (CEST) Received: from ArnaudC (ArnaudC.neotion.int [190.50.0.20]) by passerelle.neotion.int (Postfix) with ESMTP id 47A64F70054; Wed, 29 Jun 2005 12:24:06 +0200 (CEST) From: "Arnaud Chataignier" To: "'Hook, James'" , Date: Wed, 29 Jun 2005 10:47:00 -0000 Message-ID: <01ce01c57c97$d6d275b0$0100a8c0@ArnaudC> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable In-Reply-To: Subject: [ECOS] RE : [ECOS] possible fix for eth_drv_recv blocking DSR X-SW-Source: 2005-06/txt/msg00285.txt.bz2 James, As you had no answer and I know it, I will try to help. There should be no DSR in an Ethernet driver device. Your ISR should only ask for a DSR call. The DSR is handled in the IO ethernet part, not in the device driver. The IO ethernet DSR only triggers the execution of the Network alarm thread, which then calls your ethernet driver 'deliver' function. Your deliver function is thus called from a thread, and there is no interrupt lock/unlock to be done in cyg_splx and spl_any. Regards, Arnaud. -----Message d'origine----- De : ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-owner@ecos.sourceware.org] De la part de Hook, James Envoy=E9 : vendredi 24 juin 2005 19:35 =C0 : ecos-discuss@sources.redhat.com Objet : [ECOS] possible fix for eth_drv_recv blocking DSR 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 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss