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  <20192020  2021  2022  2023  2024  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  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: devSup driver development differences between base 3.14 and 3.15
From: Abdalla Ahmad via Tech-talk <[email protected]>
To: "[email protected]" <[email protected]>
Date: Wed, 29 May 2019 11:46:23 +0000

Hi

 

When we had EPICS base 3.14.12.3 and .6 we had a driver developed using EPICS devSup model and it was working fine. Now with EPICS base 3.15.6 the driver is running fine for some period of time until, for unknown reason, the server gets 100% CPU usage. After restarting the server I noticed that (through htop) the IOC’s memory usage is actually increasing although not in a high rate. We noticed the same behavior with another driver we developed. The first one was using a standard socket to communicate while the second one is using SNMP v1.

 

The devSup structure is defined in the device support as:

 

struct devsup {

                long number;

                DEVSUPFUN report;

                DEVSUPFUN init;

                DEVSUPFUN init_record;

                DEVSUPFUN get_ioint_info;

                DEVSUPFUN io;

                DEVSUPFUN misc;

} aiDevice = {

                6,

                NULL,

                Init,

                initRecord,

                NULL

                ioRecord,

                NULL

};

 

And drvet structure is defined in the driver support as:

static drvet drvDevice = {

                2,

                NULL,

                Init

};

 

Here is how everything works in the driver:

1.       The drvet init function initializes communication to the configured devices and fills up array of structures each for a single device.

2.       The devSup init record parses the INP field, gets the device name and uses it to get the device from the previous array storing it in the record’s DPVT.

3.       The devSup io record function reads the DPVT and creates a POSIX thread.

4.       This thread is detached and reads the parsed INP field and calls the corresponding function from the driver support.

5.       All driver support functions communicate with the corresponding device, fetch the value and stores it in the record’s VAL pointer.

6.       After that, dbScanLock is called followed by a call to the record’s RECSUPFUN process function pointer, then dbScanUnlock is called.

 

Right now I am investigating the driver’s code for any possible bugs, but I am sure the problem is that we are doing something wrong which was done right with base 3.14.12.3. Where could be the problem? Let me know if further info Is needed.

 

We are aware of the benefits of asyn-based drivers but we did not have time to do something from scratch. It would be very helpful if there are good material on developing asyn-based drivers.

 

Best Regards,

 

Abdalla Ahmad

Control Engineer

SESAME

Allan, Jordan.

Tel: (+962-5) 3511348 , ext. 265

Fax: (+962-5) 3511423

Mob: (+962-7)88183296

www.sesame.org.jo

 


Replies:
RE: devSup driver development differences between base 3.14 and 3.15 Mark Rivers via Tech-talk

Navigate by Date:
Prev: support for SBS IP-Stepper and Technalogix TSV-3000 RF amplifier Pierrick M Hanlet via Tech-talk
Next: Re: Scanning 101 Hinko Kocevar 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: support for SBS IP-Stepper and Technalogix TSV-3000 RF amplifier Peterson, Kevin M. via Tech-talk
Next: RE: devSup driver development differences between base 3.14 and 3.15 Mark Rivers 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  <20192020  2021  2022  2023  2024 
ANJ, 30 May 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·