From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24187 invoked by alias); 3 Dec 2013 13:37:18 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 24175 invoked by uid 89); 3 Dec 2013 13:37:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: dub0-omc2-s3.dub0.hotmail.com Received: from Unknown (HELO dub0-omc2-s3.dub0.hotmail.com) (157.55.1.142) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Dec 2013 13:37:16 +0000 Received: from DUB122-W52 ([157.55.1.136]) by dub0-omc2-s3.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 3 Dec 2013 05:37:08 -0800 X-TMN: [PU3rG0qt/Zw74AWB//E4Neo9D+Vz3Dj4] Message-ID: From: Bernd Edlinger To: Peter Graf , "ecos-discuss@ecos.sourceware.org" Date: Tue, 03 Dec 2013 13:37:00 -0000 In-Reply-To: <529DBE350200007E0000ABD9@Groupware> References: <529DBE350200007E0000ABD9@Groupware> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Subject: RE: [ECOS] Massive ISR to DSR delay caused by free() X-SW-Source: 2013-12/txt/msg00001.txt.bz2 On Tue, 3 Dec 2013 11:19:17, Peter Graf wrote: > > Hi, > > under rare circumstances, we experienced a massive timing overflow of a c= yclical DSR. It turned out to be an issue with JFFS2, occurring after a sys= tem reboot if long files had been written to the filesystem before. > > I found that the issue was only caused by JFFS2's > > malloc-ecos.c: jffs2_free_full_dnode() > > By using an oscilloscope, I could see that after the ISR was served, the = DSR was delayed, just because free() was called by jffs2_free_full_dnode().= More precisely, the CPU time was spent in memalloc's > > mvarimpl.inl: Cyg_Mempool_Variable_Implementation::insert_free_block() > > At first I thought it was a locking issue within JFFS2. But in the end I = could not see any scheduler locks which might have caused it. > > I now have indications, that it could be a general issue with free(). A c= all to free() from even a low priority thread seems to delay DSR execution = after the ISR! > > The allocator is compiled to be thread-safe, but in my opinion it would b= e a major drawback if even a low priority thread could not call free() with= out delaying a critical DSR. > > Can someone confirm this behaviour? Is it intended? > > Many thanks, > Peter > > > > > -- > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss > This sounds like a know deficiency of the very first Doug-Lee Malloc. Maybe you want check if this patch works for you? http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001634 Regards Bernd Edlinger.=20=09=09=20=09=20=20=20=09=09=20=20 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss