From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4A004385.7020200@domain.hid> Date: Tue, 05 May 2009 15:47:49 +0200 From: Gilles Chanteperdrix MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-help] gatekeeper/0 List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: henning.richter@domain.hid Cc: xenomai@xenomai.org henning.richter@domain.hid wrote: > > > henning.richter@domain.hid wrote: >>> Hi, >>> >>> running a xenomai task in which I am sending a single Frame (size ~500 >>> byte) from my EtherCAT Master to some Beckhoff slaves has latencies > around >>> 200 us. >>> While running that task, top shows that gatekeeper/0 (with RT priority) > has >>> 30% CPU usage. >>> What is the task of this gatekeeper and can this cause my high > latencies? >> The gatekeeper is used when a taks is migrating from secondary mode to >> primary mode. The gatekeeper itself can not cause the high latencies, >> but the fact that a task runs in secondary mode can. >> >> To check if this is what happens, check the MSW column in >> /proc/xenomai/stat for the thread which has latencies issues. If MSW is >> increasing then you have a problem. > >> To find where your thread switches to secondary mode, use the technique >> demonstrated in examples/native/sigxcpu.c. > > -- > Gilles. > > So thank your for defining my problem. > Now I am sure that there my thread is switching to secondary mode > as the MSW column increases rapidly while running my application. > Can I also use the ipipe tracer or LTTng to find the place where it > switches the modes as I don't have the > xenomai examples installed. Yes, you can use the I-pipe tracer, but reading the output might be a bit complicated. Examples are part of Xenomai sources freely available on Xenomai web site. -- Gilles.