From: Ding Tianhong <dingtianhong@huawei.com>
To: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <Catalin.Marinas@arm.com>,
Sukie Peng <Sukie.Peng@arm.com>,
"huxinwei@huawei.com" <huxinwei@huawei.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arm64: Flush the process's mm context TLB entries when switching
Date: Tue, 15 Apr 2014 18:20:00 +0800 [thread overview]
Message-ID: <534D07D0.1090807@huawei.com> (raw)
In-Reply-To: <20140415080217.GD17408@arm.com>
On 2014/4/15 16:02, Will Deacon wrote:
> On Tue, Apr 15, 2014 at 03:00:24AM +0100, Ding Tianhong wrote:
>> On 2014/4/14 21:01, Will Deacon wrote:
>>> Hi Ding,
>>>
>>> On Mon, Apr 14, 2014 at 01:03:12PM +0100, Ding Tianhong wrote:
>>>> I met a problem when migrating process by following steps:
>>>>
>>>> 1) The process was already running on core 0.
>>>> 2) Set the CPU affinity of the process to 0x02 and move it to core 1,
>>>> it could work well.
>>>> 3) Set the CPU affinity of the process to 0x01 and move it to core 0 again,
>>>> the problem occurs and the process was killed.
>>>
>>> [...]
>>>
>>>> It was a very strange problem that the PC and LR are both 0, and the esr is
>>>> 0x83000006, it means that the used for instruction access generated MMU faults
>>>> and synchronous external aborts, including synchronous parity errors.
>>>>
>>>> I try to fix the problem by invalidating the process's TLB entries when switching,
>>>> it will make the context stale and pick new one, and then it could work well.
>>>>
>>>> So I think in some situation that after the process switching, the modification of
>>>> the TLB entries in the new core didn't inform all other cores to invalidate the old
>>>> TLB entries which was in the inner shareable caches, and then if the process schedule
>>>> to another core, the old TLB entries may occur MMU faults.
>>>
>>> Yes, it sounds like you don't have your TLBs configured correctly. Can you
>>> confirm that your EL3 firmware is configuring TLB broadcasting correctly
>>> please?
>>>
>>
>> Hi will:
>>
>> Do you mean the SCR_EL3.NS?
>
> No, there's usually a CPU-specific register (called something like actlr or
> ectlr) which contains bit(s) to enable TLB broadcasting in hardware. Which
> CPU are you using?
>
> Will
>
Yes,I set the CPUECTLR.SMP to 1 and enable the core to receive TLB broadcast, then fix the problem,
thanks for your help, And I use arm64-A57.
Regards
Ding
> .
>
prev parent reply other threads:[~2014-04-15 10:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 12:03 [PATCH] arm64: Flush the process's mm context TLB entries when switching Ding Tianhong
2014-04-14 13:01 ` Will Deacon
2014-04-15 2:00 ` Ding Tianhong
2014-04-15 8:02 ` Will Deacon
2014-04-15 10:20 ` Ding Tianhong [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=534D07D0.1090807@huawei.com \
--to=dingtianhong@huawei.com \
--cc=Catalin.Marinas@arm.com \
--cc=Sukie.Peng@arm.com \
--cc=huxinwei@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will.deacon@arm.com \
/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