EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
<== Date ==> <== Thread ==>

Subject: Re: QuadEM Update rate limited by lock
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Iain Marcuson <iain.marcuson at sydortechnologies.com>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 20 Nov 2024 17:39:48 +0000
Hi Iain,

lock() should not take 6 ms, it should be a few microseconds at most. Your lock must be waiting for another thread. 

You only need to call lock() for threads that you create, not for functions called from other threads, like writeInt32, etc.  

drvTetrAMM.cpp is a good example. readThread() holds the lock except when it is waiting for input from the device (which is most of the time).

Mark

Sent from my iPhone

On Nov 20, 2024, at 10:58 AM, Iain Marcuson via Tech-talk <tech-talk at aps.anl.gov> wrote:



I am writing EPICS for a QuadEM, based on designs in the distribution.  The data come at 200 Hz, and my benchmarking in EPICS shows that I receive at that rate with very low jitter.  Following the examples of other electrometers, I lock() before computePositions() and callParamCallbacks().  I have observed that the lock() takes about 6 ms, which is too long for the full packet rate.  Is this a normal time for the lock()?  I believe I have eliminated other calls for the lock() in my code, although a calltree shows lock()s in the callbacks.

 

Thank you,

 

Iain.



This message has been scanned for malware by Forcepoint. www.forcepoint.com


Replies:
RE: QuadEM Update rate limited by lock Iain Marcuson via Tech-talk
References:
QuadEM Update rate limited by lock Iain Marcuson via Tech-talk

Navigate by Date:
Prev: QuadEM Update rate limited by lock Iain Marcuson via Tech-talk
Next: Re: I implemented the Model 3 of EPICS motor driver support, but the VAL and RBV of motor record are zero after IOC reboot. LiangChih Chiang via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
Navigate by Thread:
Prev: QuadEM Update rate limited by lock Iain Marcuson via Tech-talk
Next: RE: QuadEM Update rate limited by lock Iain Marcuson via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
ANJ, 21 Nov 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·