From mboxrd@z Thu Jan 1 00:00:00 1970 References: <560AB34B.5020300@xenomai.org> From: Philippe Gerum Message-ID: <560AB938.8090905@xenomai.org> Date: Tue, 29 Sep 2015 18:15:52 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] Interrupt latency close to 1ms on powerpc Xenomai 2.6.4 List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "PRADHAN, MAKARAND (RC-CA)" , "Xenomai@xenomai.org" On 09/29/2015 06:04 PM, PRADHAN, MAKARAND (RC-CA) wrote: >> Are you playing with the T_LOCK bit? > > Yes. We do T_LOCK to lock the scheduler while we are in a critical section. Is that why the scheduler does not kick in immediately after the HW int? If the IRQ happens while some task holds the scheduler lock, the answer is yes, that is the point of it. The scheduler lock is an ugly construct inherited from the dark ages of RTOS. Xenomai being about properly emulating these for running legacy code is the only reason why this anti-feature is present. I would strongly recommend to use a mutual exclusion mechanism with a finer granularity. -- Philippe.