linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Friesen <chris.friesen@windriver.com>
To: linux-rt-users@vger.kernel.org
Subject: high-priority RT CPU-hog applications and kernel threads
Date: Wed, 14 Oct 2020 10:37:55 -0600	[thread overview]
Message-ID: <f1441440-1c54-0ff8-eaee-4f7330e0a8a7@windriver.com> (raw)

Hi,

I'm on the CentOS 7 RT kernel but I'm hoping the general principles 
still apply.

I've got a system with a number of CPUs set aside for housekeeping and 
others dedicated to low-latency applications.  We have "irqaffinity", 
"rcu_nocbs", "nohz_full", and "isolcpus" set up to try to isolate the 
application CPUs as much as possible, with RCU threads affined to the 
housekeeping CPUs where possible.  (rcuc/N is still on the application 
CPUs.)  We have CONFIG_RCU_BOOST=y and CONFIG_RCU_KTHREAD_PRIO=2.

One packet-processing application wants to run in a busy-loop pulling 
packets off queues and shoving them onto other queues.  No actual system 
calls that context-switch into the kernel, only calls to get a timestamp 
which are handled by the vDSO.  Testing has shown better jitter if we 
run this higher priority than all the kernel threads, but I wanted to 
make sure this was kosher since the various tuning guides seem to 
recommend against running high-RT-priority CPU hogs.

Is it okay to run the application higher-priority than all the RCU 
threads since the bulk of the work is offloaded to the housekeeping 
CPUs?  Would we need "rcu_nocb_poll" to run the application 
higher-priority than rcuc/N?

Is it okay to run the application higher-priority than ktimersoftd/N 
given that the application doesn't use timers and nothing else should be 
running on that CPU?

Is it okay run the application higher-priority than the irq threads or 
is that a moot point as long as we affine all the irq threads to the 
housekeeping CPUs?

Is there anything else I'm missing?  Basically as much as possible I 
just want this CPU to be entirely dedicated to the application, with 
nothing else running on it.  Most of the tuning guides want the kernel 
threads higher-priority than the application though, and I'd like to 
avoid that if possible.

Thanks,
Chris


                 reply	other threads:[~2020-10-14 16:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=f1441440-1c54-0ff8-eaee-4f7330e0a8a7@windriver.com \
    --to=chris.friesen@windriver.com \
    --cc=linux-rt-users@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).