EPICS Home

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: Iain Marcuson via Tech-talk <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 21 Nov 2024 19:00:10 +0000

Thank you.  The problem was indeed contention with other threads, caused by a misconfigured value.

 

From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, November 20, 2024 12:40 PM
To: Iain Marcuson <iain.marcuson at sydortechnologies.com>
Cc: tech-talk at aps.anl.gov
Subject: Re: QuadEM Update rate limited by lock

 

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:58AM, 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

 

Click here to report this email as spam.


References:
QuadEM Update rate limited by lock Iain Marcuson via Tech-talk
Re: QuadEM Update rate limited by lock Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: Asyn device support does not reconnect Miroslaw Dach via Tech-talk
Next: autoConnect could not connect when reading a register by modbus relative addressing 沈治邦 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: Re: QuadEM Update rate limited by lock Mark Rivers via Tech-talk
Next: adl2ui segmentation fault - Needs contacts for CaQTDM development Thorne, Keith (Keith) 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