From: saeed.bishara@gmail.com (saeed bishara)
To: linux-arm-kernel@lists.infradead.org
Subject: HIGHMEM is broken when working in SMP V6 mode
Date: Sun, 23 Jan 2011 18:34:24 +0200 [thread overview]
Message-ID: <AANLkTi=HtLjnOLGVVqWvqToiXdQAm_+cDdZf51M+ABV4@mail.gmail.com> (raw)
In-Reply-To: <20110123145639.GB30094@n2100.arm.linux.org.uk>
On Sun, Jan 23, 2011 at 4:56 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Sun, Jan 23, 2011 at 04:38:01PM +0200, saeed bishara wrote:
>> Hi,
>> I've port 2.6.35 to SMP system that runs in V6 mode, this system
>> doesn't support TLB operations broadcasting by hw, so it uses IPI
>> messages for that. ?when enabling DEBUG_LOCKDEP, I got the following
>> error message while booting the system from NFS:
>
> You've bypassed this check:
>
> ? ? ? ? ? ? ? ?if (is_smp() && tlb_ops_need_broadcast()) {
> ? ? ? ? ? ? ? ? ? ? ? ?/*
> ? ? ? ? ? ? ? ? ? ? ? ? * kmap_high needs to occasionally flush TLB entries,
> ? ? ? ? ? ? ? ? ? ? ? ? * however, if the TLB entries need to be broadcast
> ? ? ? ? ? ? ? ? ? ? ? ? * we may deadlock:
> ? ? ? ? ? ? ? ? ? ? ? ? * ?kmap_high(irqs off)->flush_all_zero_pkmaps->
> ? ? ? ? ? ? ? ? ? ? ? ? * ?flush_tlb_kernel_range->smp_call_function_many
> ? ? ? ? ? ? ? ? ? ? ? ? * ? (must not be called with irqs off)
> ? ? ? ? ? ? ? ? ? ? ? ? */
> ? ? ? ? ? ? ? ? ? ? ? ?reason = "without hardware TLB ops broadcasting";
> ? ? ? ? ? ? ? ?}
>
> so you lose. ?There's reasons why such checks are put in. ?We can not
> support SMP and highmem on systems which do not have TLB broadcasting.
> That's not because the code doesn't support it, it's because there are
> deadlocks which will occur.
thanks, I missed that
>
> The fact is that it is unsafe to send IPIs with IRQs disabled, which
> means you can't IPI a TLB operation and wait for it to complete with IRQs
> disabled.
as I understand it, the lock_kmap() started to disable IRQs in order
to support the vivt and vipt caches, but in SMP (at least in my case),
the caches are PIPT, so I think I can do the following:
1. undef the ARCH_NEEDS_KMAP_HIGH_GET
2. use page_address instead of kmap_high_get()
do you think it will work?
saeed
>
> The kmap code sets up and tears down mappings with IRQs disabled because
> of the need to work with the DMA API. ?This means that it when it wants
> to do a TLB operation (to flush out old mappings) its calling context is
> incompatible with what's required to broadcast that operation in
> software.
>
> There is no solution to this. ?SMP without hardware TLB broadcast is
> incompatible with the requirements of highmem.
>
next prev parent reply other threads:[~2011-01-23 16:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-23 14:38 HIGHMEM is broken when working in SMP V6 mode saeed bishara
2011-01-23 14:56 ` Russell King - ARM Linux
2011-01-23 16:34 ` saeed bishara [this message]
2011-01-23 17:08 ` Russell King - ARM Linux
2011-01-24 8:47 ` saeed bishara
2011-01-24 9:19 ` Russell King - ARM Linux
2011-01-24 9:55 ` saeed bishara
2011-01-24 19:58 ` Nicolas Pitre
2011-01-25 8:37 ` saeed bishara
2011-01-27 17:37 ` Russell King - ARM Linux
2011-01-27 18:40 ` Nicolas Pitre
2011-01-27 19:04 ` Russell King - ARM Linux
2011-01-27 19:45 ` Nicolas Pitre
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='AANLkTi=HtLjnOLGVVqWvqToiXdQAm_+cDdZf51M+ABV4@mail.gmail.com' \
--to=saeed.bishara@gmail.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;
as well as URLs for NNTP newsgroup(s).