Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: Disable highmem with SMP if no h/w TLB broadcasting
Date: Mon, 28 Sep 2009 17:50:35 +0100	[thread overview]
Message-ID: <1254156635.21619.37.camel@pc1117.cambridge.arm.com> (raw)
In-Reply-To: <20090927202937.GA26521@n2100.arm.linux.org.uk>

On Sun, 2009-09-27 at 21:29 +0100, Russell King - ARM Linux wrote:
> We suffer an unfortunate combination of "features" which makes highmem
> support on platforms without hardware TLB maintainence broadcast difficult:
> 
> - we need kmap_high_get() support for DMA cache coherence
> - this requires kmap_high() to take a spinlock with IRQs disabled
> - kmap_high() occasionally calls flush_all_zero_pkmaps() to clear
>   out old mappings
> - flush_all_zero_pkmaps() calls flush_tlb_kernel_range(), which
>   on s/w IPI'd systems eventually calls smp_call_function_many()
> - smp_call_function_many() must not be called with IRQs disabled:

I think the last point above is an artificial restriction. I understand
the possible deadlock situation but we can work around this without
performance penalty.

A patch I keep around is to allow DMA cache maintenance operations to
work correctly on ARM11MPCore (which doesn't broadcast the cache
operations in hardware):

http://www.linux-arm.org/git?p=linux-2.6.git;a=commitdiff;h=8c8d4d8cc50492f57a4a2f91f76d986130d3dfbf

This patch allows IPIs with interrupts disabled by using a combination
of spin_trylock() and polling in the unlikely case that other CPU is
sending an IPI.

I recall that I raised the issue on LKML when the generic SMP call was
introduced but people didn't seem interested in allowing IPIs with
interrupts disabled. If you are interested, the above patch can be split
so that we have an ARM-specific IPI mechanism again and allow interrupts
to be disabled.

Alternatively we can push the fix into the generic code but it needs a
bit more convincing.

-- 
Catalin

      parent reply	other threads:[~2009-09-28 16:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-27 20:29 Disable highmem with SMP if no h/w TLB broadcasting Russell King - ARM Linux
2009-09-28  1:37 ` Nicolas Pitre
2009-09-28 10:11   ` Russell King - ARM Linux
2009-09-28 13:53     ` Nicolas Pitre
2009-09-28 16:50 ` Catalin Marinas [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=1254156635.21619.37.camel@pc1117.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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