Hi, Russell,
I caught the following issue few times on my panda board on lsk. but I track the code
path, looks like the upstream kernel has the same problem too.
the interrupt handler do_undefinstr --> arm_notify_die --> die --> ...
exit_signals --> threadgroup_change_begin --> down_read
and then down_read maybe get into sleep.
Is it a issue which needs to be fixed? or I over concern on this?
[ 30.618469] BUG: sleeping function called from invalid context at kernel/rwsem.c:20
[ 30.618469] in_atomic(): 0, irqs_disabled(): 128, pid: 809, name: jbd2/mmcblk0p2-
[ 30.628540] INFO: lockdep is turned off.
[ 30.638671] irq event stamp: 1372
[ 30.638671] hardirqs last enabled at (1371): [<c00c1fa1>] get_page_from_freelist+0x279/0x434
[ 30.648529] hardirqs last disabled at (1372): [<c050cbb3>] __und_svc+0x33/0x5c
[ 30.658905] softirqs last enabled at (0): [<c002f22a>] copy_process.part.52+0x31a/0xdf4
[ 30.658905] softirqs last disabled at (0): [< (null)>] (null)
[ 30.669433] CPU: 0 PID: 809 Comm: jbd2/mmcblk0p2- Tainted: G D W 3.10.37+ #109
[ 30.682281] [<c001292d>] (unwind_backtrace+0x1/0xcc) from [<c0010279>] (show_stack+0x11/0x14)
[ 30.691314] [<c0010279>] (show_stack+0x11/0x14) from [<c050aae7>] (down_read+0x1f/0x44)
[ 30.699829] [<c050aae7>] (down_read+0x1f/0x44) from [<c00415c5>] (exit_signals+0x19/0xe4)
[ 30.708496] [<c00415c5>] (exit_signals+0x19/0xe4) from [<c0034459>] (do_exit+0x81/0x870)
[ 30.717071] [<c0034459>] (do_exit+0x81/0x870) from [<c00105af>] (die+0x333/0x350)
[ 30.725036] [<c00105af>] (die+0x333/0x350) from [<c0008417>] (do_undefinstr+0x10b/0x13c)
[ 30.733612] [<c0008417>] (do_undefinstr+0x10b/0x13c) from [<c050cbe3>] (__und_svc_finish+0x1/0x3e)
[ 30.743103] Exception stack(0xedd5fc50 to 0xedd5fc98)
[ 30.748443] fc40: c13c14e0 80000000 00000080 00000000
[ 30.757141] fc60: c13c14e0 0000000c eac67284 c13c14e0 edc11518 c0df95c0 c0824410 eac67240
[ 30.765808] fc80: 00000000 edd5fcd8 c00171f9 c00cf998 80000133 ffffffff
[ 30.772827] [<c050cbe3>] (__und_svc_finish+0x1/0x3e) from [<c00cf998>] (page_mapping+0x20/0x38)
[ 30.782073] [<c00cf998>] (page_mapping+0x20/0x38) from [<c00171f9>] (flush_dcache_page+0x1d/0x60)
[ 30.791473] [<c00171f9>] (flush_dcache_page+0x1d/0x60) from [<c00e26c3>] (blk_queue_bounce+0x1a3/0x2a0)
[ 30.801452] [<c00e26c3>] (blk_queue_bounce+0x1a3/0x2a0) from [<c02ca5bb>] (blk_queue_bio+0x1f/0x364)
[ 30.811157] [<c02ca5bb>] (blk_queue_bio+0x1f/0x364) from [<c02c9661>] (generic_make_request+0x65/0x88)
[ 30.821014] [<c02c9661>] (generic_make_request+0x65/0x88) from [<c02c96e5>] (submit_bio+0x61/0x104)
[ 30.830627] [<c02c96e5>] (submit_bio+0x61/0x104) from [<c010f017>] (_submit_bh+0x127/0x19c)
[ 30.839477] [<c010f017>] (_submit_bh+0x127/0x19c) from [<c0194def>] (jbd2_journal_commit_transaction+0x70b/0x161c)
[ 30.850463] [<c0194def>] (jbd2_journal_commit_transaction+0--
Thanks
Alex
From: Oleg Nesterov <oleg(a)redhat.com>
Date: Wed, 16 Apr 2014 17:29:46 +0200
> On 04/16, David Miller wrote:
>>
>> From: Oleg Nesterov <oleg(a)redhat.com>
>> Date: Wed, 16 Apr 2014 17:06:46 +0200
>>
>> > Off-topic, I am just curious... can't someone explain why flush_pfn_alias()
>> > or flush_icache_alias() can't race with itself ? I have no idea what they do,
>> > but what if another thread calls the same function with the same CACHE_COLOUR()
>> > right after set_pte_ext?
>>
>> PTE modifications are supposed to run with the page table lock held.
>
> OK, but __access_remote_vm() doesn't take ptl?
>
> And on arm copy_to_user_page()->flush_ptrace_access()->flush_pfn_alias()
> does this.
Well, for one thing, PTE's can't gain permissions except under mmap_sem
which __access_remote_vm() does hold.
But I see what you're saying, flush_pfn_alias() is doing something
different. It's not making user mappings, but kernel ones in order
to implement the cache flush.
On sparc64 we handle this situation by hand-loading the mappings into
the TLB, doing the operation using the mappings, then flushing it out
of the TLB, all with interrupts disabled.
Furthermore, in ARMs case, the code explicitly states that these
mappings are not used on SMP. See the comment above the FLUSH_ALIAS_START
definition in arch/arm/mm/mm.h
This patchset was previously part of the larger tasks packing patchset [1].
I have splitted the latter in 3 different patchsets (at least) to make the
thing easier.
-configuration of sched_domain topology (this patchset)
-update and consolidation of cpu_power
-tasks packing algorithm
Based on Peter Z's proposal [2][3], this patchset modifies the way to configure
the sched_domain level in order to let architectures to add specific level like
the current BOOK level or the proposed power gating level for ARM architecture.
[1] https://lkml.org/lkml/2013/10/18/121
[2] https://lkml.org/lkml/2013/11/5/239
[3] https://lkml.org/lkml/2013/11/5/449
Change since v3:
- remove last patch which was adding SD_SHARE_POWER_DOMAIN for powerpc's SMT
level
Change since v2:
- remove patch 1 as it has been already applied to metag tree for v3.15
- updates some commit messages
- add new flag description in TOPOLOGY_SD_FLAGS description
Change since v1:
- move sched_domains_curr_level back under #ifdef CONFIG_NUMA
- use function pointer to set flag instead of a plain value.
- add list of tunable flags in the commit message of patch 2
- add SD_SHARE_POWER_DOMAIN flag for powerpc's SMT level
Vincent Guittot (5):
sched: rework of sched_domain topology definition
sched: s390: create a dedicated topology table
sched: powerpc: create a dedicated topology table
sched: add a new SD_SHARE_POWERDOMAIN for sched_domain
sched: ARM: create a dedicated scheduler topology table
arch/arm/kernel/topology.c | 26 +++++
arch/ia64/include/asm/topology.h | 24 ----
arch/powerpc/kernel/smp.c | 31 +++--
arch/s390/include/asm/topology.h | 13 +--
arch/s390/kernel/topology.c | 20 ++++
arch/tile/include/asm/topology.h | 33 ------
include/linux/sched.h | 49 +++++++-
include/linux/topology.h | 128 +++-----------------
kernel/sched/core.c | 244 ++++++++++++++++++++-------------------
9 files changed, 255 insertions(+), 313 deletions(-)
--
1.9.1
CPUFREQ_ASYNC_NOTIFICATION was initially designed for drivers which don't want
core to send notifications for them as they wouldn't finish frequency
transitions in ->target_index().
But there were other kinds of drivers as well who don't have straight forward
implementations of ->target_index() routines and wanted to handle notifications
themselves.
Patch: 7dbf694 (cpufreq: distinguish drivers that do asynchronous notifications)
missed addressing these drivers and that caused these drivers to send double
notifications. Initially cpufreq core sends a notification for these and then
the drivers themselves.
It might not cause a big problem for kernels (3.13/3.14) which doesn't have this
patch in: 12478cf (cpufreq: Make sure frequency transitions are serialized), as
this came in v3.15-rc1. Reason being, we are sending an extra notification for
the same frequency, and so other kernel code that depends on it shouldn't behave
badly.
Above patch broke things as it forces serialization of notifications, so that we
aren't configuring same hardware registers simultaneously.
Reported-by: Meelis Roos <mroos(a)linux.ee>
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
Hi Rafael,
This one is for rc3 surely :)
Also, as I mentioned above it might not create any problems for 3.13 and 3.14.
And so I havne't cc'd stable for those kernels. Please add them in case you feel
its still better to get it fixed.
drivers/cpufreq/longhaul.c | 1 +
drivers/cpufreq/powernow-k6.c | 1 +
drivers/cpufreq/powernow-k7.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c
index d00e5d1..41f3d28 100644
--- a/drivers/cpufreq/longhaul.c
+++ b/drivers/cpufreq/longhaul.c
@@ -909,6 +909,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)
}
static struct cpufreq_driver longhaul_driver = {
+ .flags = CPUFREQ_ASYNC_NOTIFICATION,
.verify = cpufreq_generic_frequency_table_verify,
.target_index = longhaul_target,
.get = longhaul_get,
diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c
index 49f120e..080bbb9 100644
--- a/drivers/cpufreq/powernow-k6.c
+++ b/drivers/cpufreq/powernow-k6.c
@@ -242,6 +242,7 @@ static unsigned int powernow_k6_get(unsigned int cpu)
}
static struct cpufreq_driver powernow_k6_driver = {
+ .flags = CPUFREQ_ASYNC_NOTIFICATION,
.verify = cpufreq_generic_frequency_table_verify,
.target_index = powernow_k6_target,
.init = powernow_k6_cpu_init,
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c
index f911645..fccfc25 100644
--- a/drivers/cpufreq/powernow-k7.c
+++ b/drivers/cpufreq/powernow-k7.c
@@ -677,6 +677,7 @@ static int powernow_cpu_exit(struct cpufreq_policy *policy)
}
static struct cpufreq_driver powernow_driver = {
+ .flags = CPUFREQ_ASYNC_NOTIFICATION,
.verify = cpufreq_generic_frequency_table_verify,
.target_index = powernow_target,
.get = powernow_get,
--
1.7.12.rc2.18.g61b472e
Hi all concerned:
there will have some problems about the external software components like iptables when they are running in kernel 64 . because these components interactive by netlink and share structures between the usrer space and kernel space. How the juice team work to meet these problems? whether the juice team have noticed and verify these android external components.
Best Regards
Peter