<feed xmlns='http://www.w3.org/2005/Atom'>
<title>starfive-tech/linux.git/kernel, branch rt-linux-release</title>
<subtitle>StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)</subtitle>
<id>https://git.radix-linux.su/starfive-tech/linux.git/atom?h=rt-linux-release</id>
<link rel='self' href='https://git.radix-linux.su/starfive-tech/linux.git/atom?h=rt-linux-release'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/'/>
<updated>2023-11-06T11:36:13+00:00</updated>
<entry>
<title>cpupri: a work around for non-rt test panic</title>
<updated>2023-11-06T11:36:13+00:00</updated>
<author>
<name>Minda Chen</name>
<email>minda.chen@starfivetech.com</email>
</author>
<published>2023-10-26T08:46:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=5322763afa20323701d14a95e2e07a5db3ae48b7'/>
<id>urn:sha1:5322763afa20323701d14a95e2e07a5db3ae48b7</id>
<content type='text'>
kernel BUG at kernel/sched/cpupri.c:151!
The same issue can be seen in link.
https://www.spinics.net/lists/kernel/msg4184866.html

Signed-off-by: Minda Chen &lt;minda.chen@starfivetech.com&gt;
</content>
</entry>
<entry>
<title>x86: Support for lazy preemption</title>
<updated>2023-11-06T11:24:51+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2012-11-01T10:03:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=b824ffe7d30adf721b7ff53b67bf2f90f17164a1'/>
<id>urn:sha1:b824ffe7d30adf721b7ff53b67bf2f90f17164a1</id>
<content type='text'>
Implement the x86 pieces for lazy preempt.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>x86/entry: Use should_resched() in idtentry_exit_cond_resched()</title>
<updated>2023-11-06T11:24:51+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2020-06-30T09:45:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=3a2082769702a96b80d8f1c7c6420df7237ec826'/>
<id>urn:sha1:3a2082769702a96b80d8f1c7c6420df7237ec826</id>
<content type='text'>
The TIF_NEED_RESCHED bit is inlined on x86 into the preemption counter.
By using should_resched(0) instead of need_resched() the same check can
be performed which uses the same variable as 'preempt_count()` which was
issued before.

Use should_resched(0) instead need_resched().

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>signal/x86: Delay calling signals in atomic</title>
<updated>2023-11-06T11:24:50+00:00</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2015-07-14T12:26:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=3bdf070a42b297f08bc9f14bc0f5de2d08dcf8b7'/>
<id>urn:sha1:3bdf070a42b297f08bc9f14bc0f5de2d08dcf8b7</id>
<content type='text'>
On x86_64 we must disable preemption before we enable interrupts
for stack faults, int3 and debugging, because the current task is using
a per CPU debug stack defined by the IST. If we schedule out, another task
can come in and use the same stack and cause the stack to be corrupted
and crash the kernel on return.

When CONFIG_PREEMPT_RT is enabled, spin_locks become mutexes, and
one of these is the spin lock used in signal handling.

Some of the debug code (int3) causes do_trap() to send a signal.
This function calls a spin lock that has been converted to a mutex
and has the possibility to sleep. If this happens, the above issues with
the corrupted stack is possible.

Instead of calling the signal right away, for PREEMPT_RT and x86_64,
the signal information is stored on the stacks task_struct and
TIF_NOTIFY_RESUME is set. Then on exit of the trap, the signal resume
code will send the signal when preemption is enabled.

[ rostedt: Switched from #ifdef CONFIG_PREEMPT_RT to
  ARCH_RT_DELAYS_SIGNAL_SEND and added comments to the code. ]

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
[bigeasy: also needed on 32bit as per Yang Shi &lt;yang.shi@linaro.org&gt;]
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>sysfs: Add /sys/kernel/realtime entry</title>
<updated>2023-11-06T11:24:49+00:00</updated>
<author>
<name>Clark Williams</name>
<email>williams@redhat.com</email>
</author>
<published>2011-07-31T02:55:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=fc2867ac4c8774e8ba733ad46e36e54c901d4016'/>
<id>urn:sha1:fc2867ac4c8774e8ba733ad46e36e54c901d4016</id>
<content type='text'>
Add a /sys/kernel entry to indicate that the kernel is a
realtime kernel.

Clark says that he needs this for udev rules, udev needs to evaluate
if its a PREEMPT_RT kernel a few thousand times and parsing uname
output is too slow or so.

Are there better solutions? Should it exist and return 0 on !-rt?

Signed-off-by: Clark Williams &lt;williams@redhat.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>sched: Add support for lazy preemption</title>
<updated>2023-11-06T11:24:49+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2012-10-26T17:50:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=4d49bc4d923b17bf504fb96d2382e79fb854a01d'/>
<id>urn:sha1:4d49bc4d923b17bf504fb96d2382e79fb854a01d</id>
<content type='text'>
It has become an obsession to mitigate the determinism vs. throughput
loss of RT. Looking at the mainline semantics of preemption points
gives a hint why RT sucks throughput wise for ordinary SCHED_OTHER
tasks. One major issue is the wakeup of tasks which are right away
preempting the waking task while the waking task holds a lock on which
the woken task will block right after having preempted the wakee. In
mainline this is prevented due to the implicit preemption disable of
spin/rw_lock held regions. On RT this is not possible due to the fully
preemptible nature of sleeping spinlocks.

Though for a SCHED_OTHER task preempting another SCHED_OTHER task this
is really not a correctness issue. RT folks are concerned about
SCHED_FIFO/RR tasks preemption and not about the purely fairness
driven SCHED_OTHER preemption latencies.

So I introduced a lazy preemption mechanism which only applies to
SCHED_OTHER tasks preempting another SCHED_OTHER task. Aside of the
existing preempt_count each tasks sports now a preempt_lazy_count
which is manipulated on lock acquiry and release. This is slightly
incorrect as for lazyness reasons I coupled this on
migrate_disable/enable so some other mechanisms get the same treatment
(e.g. get_cpu_light).

Now on the scheduler side instead of setting NEED_RESCHED this sets
NEED_RESCHED_LAZY in case of a SCHED_OTHER/SCHED_OTHER preemption and
therefor allows to exit the waking task the lock held region before
the woken task preempts. That also works better for cross CPU wakeups
as the other side can stay in the adaptive spinning loop.

For RT class preemption there is no change. This simply sets
NEED_RESCHED and forgoes the lazy preemption counter.

 Initial test do not expose any observable latency increasement, but
history shows that I've been proven wrong before :)

The lazy preemption mode is per default on, but with
CONFIG_SCHED_DEBUG enabled it can be disabled via:

 # echo NO_PREEMPT_LAZY &gt;/sys/kernel/debug/sched_features

and reenabled via

 # echo PREEMPT_LAZY &gt;/sys/kernel/debug/sched_features

The test results so far are very machine and workload dependent, but
there is a clear trend that it enhances the non RT workload
performance.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>genirq: update irq_set_irqchip_state documentation</title>
<updated>2023-11-06T11:24:48+00:00</updated>
<author>
<name>Josh Cartwright</name>
<email>joshc@ni.com</email>
</author>
<published>2016-02-11T17:54:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=a06dc8952021a6a6a864e6d2a976c10f5024eeee'/>
<id>urn:sha1:a06dc8952021a6a6a864e6d2a976c10f5024eeee</id>
<content type='text'>
On -rt kernels, the use of migrate_disable()/migrate_enable() is
sufficient to guarantee a task isn't moved to another CPU.  Update the
irq_set_irqchip_state() documentation to reflect this.

Signed-off-by: Josh Cartwright &lt;joshc@ni.com&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Link: https://lkml.kernel.org/r/20210917103055.92150-1-bigeasy@linutronix.de
</content>
</entry>
<entry>
<title>random: Make it work on rt</title>
<updated>2023-11-06T11:24:47+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2012-08-21T18:38:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=7e2ed03be9e3e4206dd950fecb7d1b8e0bf5fa70'/>
<id>urn:sha1:7e2ed03be9e3e4206dd950fecb7d1b8e0bf5fa70</id>
<content type='text'>
Delegate the random insertion to the forced threaded interrupt
handler. Store the return IP of the hard interrupt handler in the irq
descriptor and feed it into the random generator as a source of
entropy.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>panic: skip get_random_bytes for RT_FULL in init_oops_id</title>
<updated>2023-11-06T11:24:47+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2015-07-14T12:26:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=290e2dd97dee8962b42b20df60abc27a87ab7168'/>
<id>urn:sha1:290e2dd97dee8962b42b20df60abc27a87ab7168</id>
<content type='text'>
Disable on -RT. If this is invoked from irq-context we will have problems
to acquire the sleeping lock.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>rcu: Delay RCU-selftests</title>
<updated>2023-11-06T11:24:46+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2021-03-10T14:09:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=9369bb9e53d0af3f0bbae92e55d28ebd5f80a0ae'/>
<id>urn:sha1:9369bb9e53d0af3f0bbae92e55d28ebd5f80a0ae</id>
<content type='text'>
Delay RCU-selftests until ksoftirqd is up and running.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
</feed>
