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
For networking platforms we need to provide one isolated CPU per user space data
plane thread. These CPUs should not be interrupted by kernel at all unless
userspace has requested for some syscalls. And so must live in isolated mode.
Currently, there are background kernel activities that are running on almost
every CPU, like: timers/hrtimers/watchdogs/etc, and these are required to be
migrated to other CPUs.
This patchset tries to migrate un-pinned timers away in the first attempt. And
support for migrating others like hrtimers/workqueues/etc would be added later.
This has only went through basic testing currently on ARM Samsung Exynos board
which only has two CPUs. Separate cpusets were created for these two CPUs and
then timers were migrated from one cpuset to other.
This option was earlier suggested by Peter Z. here.
https://lkml.org/lkml/2014/1/15/186
Please provide your inputs on how this can be improved..
Viresh Kumar (4):
timer: track pinned timers with TIMER_PINNED flag
timer: don't migrate pinned timers
timer: create timer_quiesce_cpu() for cpusets.quiesce option
cpuset: Add cpusets.quiesce option
include/linux/timer.h | 10 +++---
kernel/cpuset.c | 56 +++++++++++++++++++++++++++++++
kernel/timer.c | 92 +++++++++++++++++++++++++++++++++++++++++----------
3 files changed, 136 insertions(+), 22 deletions(-)
--
1.7.12.rc2.18.g61b472e