mbox series

[v2,0/5] parisc: fixes for CONFIG_PREEMPT

Message ID 20211009182439.30016-1-svens@stackframe.org (mailing list archive)
Headers show
Series parisc: fixes for CONFIG_PREEMPT | expand

Message

Sven Schnelle Oct. 9, 2021, 6:24 p.m. UTC
Out of curiosity i enabled CONFIG_PREEMPT on my c8000. The kernel didn't
even compile. After fixing compilation i noticed a lot of segmentation
faults - usually a few processes crashed already at boot, with sshd the
most notable one. Most of the time the processes where crashing with a
DTLB or ITLB miss.

With these fixes, i was able to compile a linux kernel on the c8000
with preemption enabled without crashes.

Changes in v2:
- also fix flush_cache_range(), also extend the preemption-disabled
  region to the end of the function, as there's also a tlb flush in
  the last for loop
- add patch to deduplicate code a bit

Sven Schnelle (5):
  parisc: disable preemption during local tlb flush
  parisc: deduplicate code in flush_cache_mm() and flush_cache_range()
  parisc: fix preempt_count() check in entry.S
  parisc: disable preemption in send_IPI_allbutself()
  parisc: fix warning in flush_tlb_all

 arch/parisc/kernel/cache.c | 87 ++++++++++++++++----------------------
 arch/parisc/kernel/entry.S |  4 +-
 arch/parisc/kernel/smp.c   |  4 +-
 arch/parisc/mm/init.c      |  4 +-
 4 files changed, 43 insertions(+), 56 deletions(-)

Comments

Helge Deller Oct. 9, 2021, 8:38 p.m. UTC | #1
On 10/9/21 20:24, Sven Schnelle wrote:
> Out of curiosity i enabled CONFIG_PREEMPT on my c8000. The kernel didn't
> even compile. After fixing compilation i noticed a lot of segmentation
> faults - usually a few processes crashed already at boot, with sshd the
> most notable one. Most of the time the processes where crashing with a
> DTLB or ITLB miss.
>
> With these fixes, i was able to compile a linux kernel on the c8000
> with preemption enabled without crashes.

Thank you Sven.
I've merged this series into my for-next-v5.15 branch:
https://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git/log/?h=for-next-v5.15

Helge



> Changes in v2:
> - also fix flush_cache_range(), also extend the preemption-disabled
>   region to the end of the function, as there's also a tlb flush in
>   the last for loop
> - add patch to deduplicate code a bit
>
> Sven Schnelle (5):
>   parisc: disable preemption during local tlb flush
>   parisc: deduplicate code in flush_cache_mm() and flush_cache_range()
>   parisc: fix preempt_count() check in entry.S
>   parisc: disable preemption in send_IPI_allbutself()
>   parisc: fix warning in flush_tlb_all
>
>  arch/parisc/kernel/cache.c | 87 ++++++++++++++++----------------------
>  arch/parisc/kernel/entry.S |  4 +-
>  arch/parisc/kernel/smp.c   |  4 +-
>  arch/parisc/mm/init.c      |  4 +-
>  4 files changed, 43 insertions(+), 56 deletions(-)
>