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  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Priorities of epicsThreads on Linux
From: Andrew Johnson <[email protected]>
To: [email protected]
Date: Wed, 22 Apr 2009 09:40:08 -0500
Hi Jun-ichi,

On Wednesday 22 April 2009 07:47:51 [email protected] wrote:
>
> Thank you very much for the information.
>
> Just say "YES"...
> Is that all what I have to do?

Well, almost.  Linux only allows processes to use the pthreads real-time 
priorities if the process is sufficiently privileged (because it's easy to 
code a Denial of Service attack to bring down the OS if you have that 
privilege).  There's probably a Capability (CAP_xx) that controls this, but I 
don't know what it is.  The easiest way to provide that is to run the IOC as 
root, which I don't recommend on a general-use system for security reasons 
but should be Ok on a dedicated machine.

There is a test program called epicsThreadPriorityTest that you can run from 
your base/src/libCom/test/O.<arch> directory which tells you whether the 
threads are being scheduled strictly by priority or not, so you should be 
able to use that to experiment.

HTH,

- Andrew

> ----- Original Message -----
>
> > [email protected] wrote:
> > > Dear All;
> > >
> > > I've recently come to notice that the real-time performance of Linux
> > > kernel is incredibly improving (against my expectations).
> > >
> > > http://www.osadl.org/Single-View.111+M5b96e97f67b.0.html
> > >
> > > I'd like to know if the implementation of OSD-library is implemented
>
> in
>
> > > such a manner that the kernel-level threads can reflect the priority
> > > given by the user to the scheduling of epicsThreads?
> > >
> > > In other words, can I benefit from the improvement of Linux kernel
> > > without making any changes in EPICS source codes?
> >
> > in file base/configure/CONFIG_SITE
> >
> > change
> >
> > USE_POSIX_THREAD_PRIORITY_SCHEDULING = NO
> >
> > to
> >
> > USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES
> >
> > Also you must start the IOC as root.
> >
> > Marty



-- 
The best FOSS code is written to be read by other humans -- Harold Welte

Replies:
Re: Priorities of epicsThreads on Linux jun-ichi.odagiri
References:
Priorities of epicsThreads on Linux jun-ichi.odagiri
Re: Priorities of epicsThreads on Linux Marty Kraimer
Re: Priorities of epicsThreads on Linux jun-ichi.odagiri

Navigate by Date:
Prev: back propagating error states Leicester, PJ (Pete)
Next: Re: back propagating error states Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Priorities of epicsThreads on Linux jun-ichi.odagiri
Next: Re: Priorities of epicsThreads on Linux jun-ichi.odagiri
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·