All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory Haskins <ghaskins@novell.com>
To: Mark Knecht <markknecht@gmail.com>
Cc: RT <linux-rt-users@vger.kernel.org>
Subject: Re: Arm me with info - root != real-time
Date: Mon, 23 Feb 2009 18:01:55 -0500	[thread overview]
Message-ID: <49A32AE3.7020408@novell.com> (raw)
In-Reply-To: <5bdc1c8b0902231429r320efb5by507f3cb26c2d5162@mail.gmail.com>

[-- 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 --]

      parent reply	other threads:[~2009-02-23 22:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49A32AE3.7020408@novell.com \
    --to=ghaskins@novell.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=markknecht@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.