* Re: Arm me with info - root != real-time
2009-02-23 22:29 Arm me with info - root != real-time Mark Knecht
@ 2009-02-23 22:41 ` Dan
2009-02-23 23:01 ` Gregory Haskins
1 sibling, 0 replies; 3+ messages in thread
From: Dan @ 2009-02-23 22:41 UTC (permalink / raw)
To: Mark Knecht; +Cc: RT
Well from what I read ( http://tapas.affenbande.org/wordpress/ ), an
important advantage of -rt is that you can choose the priorities of
all your threads including IRQs (e.g. to make sure the audio doesn't
glitch when interrupts come in), which you can't do even as root on a
normal kernel.
Dan
2009/2/23 Mark Knecht <markknecht@gmail.com>:
> Hi Ingo, Steven, Thomas and other RT developers,
> As always, thanks for what you do. I've been subscribed here for a
> few years. Don't say much. Do read a lot.
>
> As a user type I've run the RT kernels for years now. 5 years ago
> it was really crucial for my music work. I still use it faithfully.
> However on many lists now I'm seeing new people say there's no need
> for the RT kernel because they run their applications as root and feel
> they get the 'same' or 'good enough' results. I wonder how they know
> if they don't run both and compare but that's their business. I'm
> suspect but not technically deep enough in this subject to have a
> conversation so I thought I'd ask for a little simple (if possible)
> education.
>
> I PROCLAIM - Running an application as root on the standard kernel is
> not as real time capable as running the same application as a normal
> user with proper priorities & permissions on the RT kernel.
>
> True or false?
>
> Is there a source of measured data to show this is true or false?
>
> I know a lot of what you've done over the years is now mainline but
> I don't know how much of it is turned on by default.
>
> Clearly, I think folks don't have their head screwed on tight if
> they are running development apps as root, but people are doing it.
> They don't seem to care about security or the obvious fact that
> running as root might allow an app to erase their hard drive, etc.
> Their minds will change when something goes wrong, but in the meantime
> what can I tell them about this subject to get them to use the RT
> kernel and be as happy as I am with it.
>
> Thanks,
> Mark
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
http://www.mcld.co.uk
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Arm me with info - root != real-time
2009-02-23 22:29 Arm me with info - root != real-time Mark Knecht
2009-02-23 22:41 ` Dan
@ 2009-02-23 23:01 ` Gregory Haskins
1 sibling, 0 replies; 3+ messages in thread
From: Gregory Haskins @ 2009-02-23 23:01 UTC (permalink / raw)
To: Mark Knecht; +Cc: RT
[-- Attachment #1: Type: text/plain, Size: 3558 bytes --]
Hi Mark,
Mark Knecht wrote:
> Hi Ingo, Steven, Thomas and other RT developers,
> As always, thanks for what you do. I've been subscribed here for a
> few years. Don't say much. Do read a lot.
>
> As a user type I've run the RT kernels for years now. 5 years ago
> it was really crucial for my music work. I still use it faithfully.
> However on many lists now I'm seeing new people say there's no need
> for the RT kernel because they run their applications as root and feel
> they get the 'same' or 'good enough' results. I wonder how they know
> if they don't run both and compare but that's their business. I'm
> suspect but not technically deep enough in this subject to have a
> conversation so I thought I'd ask for a little simple (if possible)
> education.
>
> I PROCLAIM - Running an application as root on the standard kernel is
> not as real time capable as running the same application as a normal
> user with proper priorities & permissions on the RT kernel.
>
> True or false?
>
True
Running as root, even on preempt-rt, doesnt really buy you anything
w.r.t. real-time response. What it does do (aside from introduce the
security/stability concerns you mention) is give you implicit permission
to change your scheduling policy/priority, which is part of what is
needed to actually _become_ real-time. Being a root user itself doesn't
actually change anything w.r.t. your scheduling response. And as you
noted, there are other preferable ways to give this capability to a user
without requiring root, and this is generally advised as a better IT policy.
That said: Note that all recent mainline kernels generally employ the
same real-time scheduler as the one used in PREEMPT_RT and have a fairly
high degree of preempt-ability (when suitably configured). Therefore,
you *could* conceivably configure mainline with CONFIG_PREEMPT and set
your scheduler policy/priorities appropriately to achieve a moderate
amount of deterministic behavior. However, note that mainline to date
does not have some of the more fancy RT features found in PREEMPT_RT
such as threaded-irqs (read: priortizable), "sleeping spinlocks", and PI
mutexes that allow you to get the _really_ low latencies. But it may be
"good enough", as your pollees put it, for a given application.
"Acceptable latency" is in the eye of the beholder. ;)
So the short answer is: Running as root doesnt really do anything for
you, but you may be able to get "acceptable" (determined by your app)
real-time performance out of mainline without PREEMPT_RT if you know
what you are doing. YMMV.
HTH
-Greg
> Is there a source of measured data to show this is true or false?
>
> I know a lot of what you've done over the years is now mainline but
> I don't know how much of it is turned on by default.
>
> Clearly, I think folks don't have their head screwed on tight if
> they are running development apps as root, but people are doing it.
> They don't seem to care about security or the obvious fact that
> running as root might allow an app to erase their hard drive, etc.
> Their minds will change when something goes wrong, but in the meantime
> what can I tell them about this subject to get them to use the RT
> kernel and be as happy as I am with it.
>
> Thanks,
> Mark
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread