Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  13 Jan 2021, Isaac Labrie Boulay, Forum, poll_event() is very slow. 
    Reply  13 Jan 2021, Konstantin Olchanski, Forum, poll_event() is very slow. 
       Reply  15 Jan 2021, Isaac Labrie Boulay, Forum, poll_event() is very slow. 
    Reply  13 Jan 2021, Stefan Ritt, Forum, poll_event() is very slow. 
       Reply  14 Jan 2021, Pintaudi Giorgio, Forum, poll_event() is very slow. 
       Reply  14 Jan 2021, Isaac Labrie Boulay, Forum, poll_event() is very slow. 
          Reply  08 Feb 2021, Konstantin Olchanski, Forum, poll_event() is very slow. 
Message ID: 2084     Entry time: 08 Feb 2021     In reply to: 2076
Author: Konstantin Olchanski 
Topic: Forum 
Subject: poll_event() is very slow. 
> I should mention that I was using midas/examples/Triumf/c++/fevme.cxx

this is correct, the fevme frontend is written to do 100% CPU-busy polling.

there is several reasons for this:
- on our VME processors, we have 2 core CPUs, 1st core can poll the VME bus, 2nd core can run 
mfe.c and the ethernet transmitter.
- interrupts are expensive to use (in latency and in cpu use) because kernel handler has to call 
use handler, return back etc
- sub-millisecond sleep used to be expensive and unreliable (on 1-2GHz "core 1" and "core 2" 
CPUs running SL6 and SL7 era linux). As I understand, current linux and current 3+GHz CPUs can 
do reliable microsecond sleep.

K.O.
ELOG V3.1.4-2e1708b5