All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: <linux-rt-users@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Sekhar Nori <nsekhar@ti.com>,
	linux-arm <linux-arm-kernel@lists.infradead.org>
Subject: Re: [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report
Date: Thu, 14 Jan 2016 22:11:09 +0200	[thread overview]
Message-ID: <569800DD.7090102@ti.com> (raw)
In-Reply-To: <5696B025.8020909@ti.com>

Hi Sebastian,

On 01/13/2016 10:14 PM, Grygorii Strashko wrote:
> On 01/13/2016 01:41 PM, Grygorii Strashko wrote:
>> On 01/12/2016 07:15 PM, Sebastian Andrzej Siewior wrote:
>>> * Grygorii Strashko | 2015-12-28 20:00:09 [+0200]:
>>>
>>>
>>>> 3) Seems there are some problem with HIGHMEM :(. System crashes if I'm trying
>>>>      to run hackbench (see log 1). I can run hackbench only if HIGHMEM is disabled.
>>>>      I've also tried to disable CONFIG_CPU_SW_DOMAIN_PAN, CONFIG_ARM_PATCH_PHYS_VIRT,
>>>>      and CONFIG_CPUSETS, before disabling HIGHMEM.
>>>>      Sorry, I'll not able to investigate it further because of Christmas holidays here.
>>>
>>> I see. It seems not to trigger anything on x86.
>>
>> Yah. I saw other reports - it seems this issue is not triggered on ARM SMP also
>> (as per report from Tim Sander). Will try to dig deeper.
>>
> 
> I did more tests, but still don't know what is wrong.
> 1) vanilla 4.4 - no issue
> 2) 4.4-rt: CONFIG_PREEMPT_RT_BASE=n and CONFIG_PREEMPT_RT_FULL=n -- no issue
> 3) 4.4-rt: CONFIG_DEBUG_HIGHMEM=y -- issue is present log1
> 4) 4.4-rt: this is interesting ;)
> I can run hackbench few times without issues If I run hackbench with RT priority (log2)
> But I got crash immediately once I run it using non-RT priorities.


Seems I've found root cause of the issue - FIX_KMAP_BEGIN offset need to be taken into
account in switch_kmaps() and below diff fixes this issue for me.
What I'm not fully understand is why I'm the only one who hit this issue :(
New functionality was added by commit:
commit a5f4c561b3b19a9bc43a81da6382b0098ebbc1fb
    ARM: 8415/1: early fixmap support for earlycon

and it is enabled by default.

Luckiness :(

diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
index deabc36..b9b4f9c 100644
--- a/arch/arm/mm/highmem.c
+++ b/arch/arm/mm/highmem.c
@@ -167,7 +167,7 @@ void switch_kmaps(struct task_struct *prev_p, struct task_struct *next_p)
         * Clear @prev's kmap_atomic mappings
         */
        for (i = 0; i < prev_p->kmap_idx; i++) {
-               int idx = i + KM_TYPE_NR * smp_processor_id();
+               int idx = FIX_KMAP_BEGIN + i + KM_TYPE_NR * smp_processor_id();
 
                set_fixmap_pte(idx, __pte(0));
        }
@@ -175,7 +175,7 @@ void switch_kmaps(struct task_struct *prev_p, struct task_struct *next_p)
         * Restore @next_p's kmap_atomic mappings
         */
        for (i = 0; i < next_p->kmap_idx; i++) {
-               int idx = i + KM_TYPE_NR * smp_processor_id();
+               int idx = FIX_KMAP_BEGIN + i + KM_TYPE_NR * smp_processor_id();
 
                if (!pte_none(next_p->kmap_pte[i]))
                        set_fixmap_pte(idx, next_p->kmap_pte[i]);

-- 
regards,
-grygorii

WARNING: multiple messages have this Message-ID (diff)
From: grygorii.strashko@ti.com (Grygorii Strashko)
To: linux-arm-kernel@lists.infradead.org
Subject: [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report
Date: Thu, 14 Jan 2016 22:11:09 +0200	[thread overview]
Message-ID: <569800DD.7090102@ti.com> (raw)
In-Reply-To: <5696B025.8020909@ti.com>

Hi Sebastian,

On 01/13/2016 10:14 PM, Grygorii Strashko wrote:
> On 01/13/2016 01:41 PM, Grygorii Strashko wrote:
>> On 01/12/2016 07:15 PM, Sebastian Andrzej Siewior wrote:
>>> * Grygorii Strashko | 2015-12-28 20:00:09 [+0200]:
>>>
>>>
>>>> 3) Seems there are some problem with HIGHMEM :(. System crashes if I'm trying
>>>>      to run hackbench (see log 1). I can run hackbench only if HIGHMEM is disabled.
>>>>      I've also tried to disable CONFIG_CPU_SW_DOMAIN_PAN, CONFIG_ARM_PATCH_PHYS_VIRT,
>>>>      and CONFIG_CPUSETS, before disabling HIGHMEM.
>>>>      Sorry, I'll not able to investigate it further because of Christmas holidays here.
>>>
>>> I see. It seems not to trigger anything on x86.
>>
>> Yah. I saw other reports - it seems this issue is not triggered on ARM SMP also
>> (as per report from Tim Sander). Will try to dig deeper.
>>
> 
> I did more tests, but still don't know what is wrong.
> 1) vanilla 4.4 - no issue
> 2) 4.4-rt: CONFIG_PREEMPT_RT_BASE=n and CONFIG_PREEMPT_RT_FULL=n -- no issue
> 3) 4.4-rt: CONFIG_DEBUG_HIGHMEM=y -- issue is present log1
> 4) 4.4-rt: this is interesting ;)
> I can run hackbench few times without issues If I run hackbench with RT priority (log2)
> But I got crash immediately once I run it using non-RT priorities.


Seems I've found root cause of the issue - FIX_KMAP_BEGIN offset need to be taken into
account in switch_kmaps() and below diff fixes this issue for me.
What I'm not fully understand is why I'm the only one who hit this issue :(
New functionality was added by commit:
commit a5f4c561b3b19a9bc43a81da6382b0098ebbc1fb
    ARM: 8415/1: early fixmap support for earlycon

and it is enabled by default.

Luckiness :(

diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
index deabc36..b9b4f9c 100644
--- a/arch/arm/mm/highmem.c
+++ b/arch/arm/mm/highmem.c
@@ -167,7 +167,7 @@ void switch_kmaps(struct task_struct *prev_p, struct task_struct *next_p)
         * Clear @prev's kmap_atomic mappings
         */
        for (i = 0; i < prev_p->kmap_idx; i++) {
-               int idx = i + KM_TYPE_NR * smp_processor_id();
+               int idx = FIX_KMAP_BEGIN + i + KM_TYPE_NR * smp_processor_id();
 
                set_fixmap_pte(idx, __pte(0));
        }
@@ -175,7 +175,7 @@ void switch_kmaps(struct task_struct *prev_p, struct task_struct *next_p)
         * Restore @next_p's kmap_atomic mappings
         */
        for (i = 0; i < next_p->kmap_idx; i++) {
-               int idx = i + KM_TYPE_NR * smp_processor_id();
+               int idx = FIX_KMAP_BEGIN + i + KM_TYPE_NR * smp_processor_id();
 
                if (!pte_none(next_p->kmap_pte[i]))
                        set_fixmap_pte(idx, next_p->kmap_pte[i]);

-- 
regards,
-grygorii

  reply	other threads:[~2016-01-14 20:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-28 18:00 [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report Grygorii Strashko
2015-12-28 18:00 ` [4.4-rc6-rt1 PATCH 1/2] kernel/sched/core.c: UP: fix 'implicit declaration of function 'update_migrate_disable' Grygorii Strashko
2015-12-28 18:00   ` Grygorii Strashko
2015-12-28 18:00 ` [4.4-rc6-rt1 PATCH 2/2] kernel/time/timer.c: UP: fix undefined reference to `del_timer_sync' Grygorii Strashko
2016-01-12 16:47   ` Sebastian Andrzej Siewior
2016-01-12 17:15 ` [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report Sebastian Andrzej Siewior
2016-01-13 11:41   ` Grygorii Strashko
2016-01-13 20:14     ` Grygorii Strashko
2016-01-14 20:11       ` Grygorii Strashko [this message]
2016-01-14 20:11         ` Grygorii Strashko
2016-01-14 21:30         ` Russell King - ARM Linux
2016-01-14 21:30           ` Russell King - ARM Linux
2016-01-15 11:35           ` Grygorii Strashko
2016-01-15 11:35             ` Grygorii Strashko
2016-01-15 11:36             ` Russell King - ARM Linux
2016-01-15 11:36               ` Russell King - ARM Linux

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=569800DD.7090102@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=nsekhar@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.