From: Yasuaki Ishimatsu
memblock.current_limit is set directly though memblock_set_current_limit()
is prepared. So fix it.
Signed-off-by: Yasuaki Ishimatsu
Signed-off-by: Lai Jiangshan
---
arch/x86/kernel/setup.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
---
kernel/kthread.c |2 +-
1 files changed, 1
"memblock_find_in_range_node()"
Signed-off-by: Yasuaki Ishimatsu
Signed-off-by: Lai Jiangshan
---
mm/memblock.c |5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/memblock.c b/mm/memblock.c
index ee2e307..50ab53c 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
suaki Ishimatsu
Signed-off-by: Lai Jiangshan
---
arch/x86/mm/numa.c |8 ++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index 2d125be..a86e315 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -223,9 +223,13 @@ static void _
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
Acked-by: Christoph Lameter
---
mm/migrate.c |2
for policies. is_valid_nodemask() need to be changed to match it.
Fix: check all zones, even its zoneid > policy_zone.
Use nodes_intersects() instead open code to check it.
Signed-off-by: Lai Jiangshan
Reported-by: Wen Congyang
---
mm/mempolicy.c | 36 ++--
1
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
---
init/main.c |2 +-
1 files changed, 1
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
Acked-by: Hillf Danton
---
Documentation/cgroups
make online_movable/online_kernel can empty a zone
or can move memory to a empty zone.
Signed-off-by: Lai Jiangshan
---
mm/memory_hotplug.c | 51 +--
1 files changed, 45 insertions(+), 6 deletions(-)
diff --git a/mm/memory_hotplug.c b/mm
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
Acked-by: Hillf Danton
---
mm/vmscan.c |4
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
---
mm/mempolicy.c | 12 ++--
1 files
2 of them).
Signed-off-by: Lai Jiangshan
---
Documentation/kernel-parameters.txt |9 +
mm/page_alloc.c | 29 -
2 files changed, 37 insertions(+), 1 deletions(-)
diff --git a/Documentation/kernel-parameters.txt
b/Documentation/kernel-para
On 08/26/2013 01:43 AM, Paul E. McKenney wrote:
> On Sun, Aug 25, 2013 at 11:19:37PM +0800, Lai Jiangshan wrote:
>> Hi, Steven
>>
>> Any comments about this patch?
>
> For whatever it is worth, it ran without incident for two hours worth
> of rcutorture on my P5 tes
of
> CPUs in a "small" system is defined by a new NO_HZ_FULL_SYSIDLE_SMALL
> Kconfig parameter, which defaults to 8. Note that this is a build-time
> definition.
>
> Signed-off-by: Paul E. McKenney
> Cc: Frederic Weisbecker
> Cc: Steven Rostedt
> Cc: Lai Jian
On 08/27/2013 12:24 AM, Paul E. McKenney wrote:
> On Mon, Aug 26, 2013 at 01:45:32PM +0800, Lai Jiangshan wrote:
>> On 08/20/2013 10:47 AM, Paul E. McKenney wrote:
>>> From: "Paul E. McKenney"
>>>
>>> This commit adds the state machine that takes the
On Wed, Sep 5, 2012 at 6:37 PM, Lai Jiangshan wrote:
> when the newly created needs to be rebound. exile it!
> it will rebind itself in worker_thead().
>
> It just prepares, this code is useless until
> "we unbind/rebind without manager_mutex"
>
> Signed-off-by:
On 09/06/2012 03:49 AM, Tejun Heo wrote:
> Hello,
>
> On Wed, Sep 05, 2012 at 06:37:42PM +0800, Lai Jiangshan wrote:
>> Ensure the gcwq->flags is only accessed with gcwq->lock held.
>> And make the code more easier to understand.
>>
>> In all current cal
it is too complicated for 3.6.
>
> On Wed, Sep 05, 2012 at 06:37:39PM +0800, Lai Jiangshan wrote:
>> static void idle_worker_rebind(struct worker *worker)
>> {
>> struct global_cwq *gcwq = worker->pool->gcwq;
>>
>> -/* CPU must be online at this p
On 09/06/2012 07:11 AM, Tejun Heo wrote:
> On Tue, Sep 04, 2012 at 11:16:32PM -0700, Tejun Heo wrote:
>> Currently, rebind_workers() and idle_worker_rebind() are two-way
>> interlocked. rebind_workers() waits for idle workers to finish
>> rebinding and rebound idle workers wait for rebind_workers(
On 09/05/2012 09:12 AM, Tejun Heo wrote:
> Hello, Lai.
>
> On Sun, Sep 02, 2012 at 12:28:22AM +0800, Lai Jiangshan wrote:
>> If hotplug code grabbed the manager_mutex and worker_thread try to create
>> a worker, the manage_worker() will return false and worker_thread go to
On 09/06/2012 02:31 AM, Tejun Heo wrote:
> On Wed, Sep 05, 2012 at 06:37:40PM +0800, Lai Jiangshan wrote:
>> because old busy_worker_rebind_fn() have to wait until all idle worker
>> finish.
>> so we have to use two flags WORKER_UNBOUND and WORKER_REBIND to avoid
>
On 09/06/2012 10:53 AM, Minchan Kim wrote:
> Normally, MIGRATE_ISOLATE type is used for memory-hotplug.
> But it's irony type because the pages isolated would exist
> as free page in free_area->free_list[MIGRATE_ISOLATE] so people
> can think of it as allocatable pages but it is *never* allocatable
On 09/06/2012 04:18 PM, Minchan Kim wrote:
> Hello Lai,
>
> On Thu, Sep 06, 2012 at 04:14:51PM +0800, Lai Jiangshan wrote:
>> On 09/06/2012 10:53 AM, Minchan Kim wrote:
>>> Normally, MIGRATE_ISOLATE type is used for memory-hotplug.
>>> But it's irony type
On 09/06/2012 04:18 PM, Minchan Kim wrote:
> Hello Lai,
>
> On Thu, Sep 06, 2012 at 04:14:51PM +0800, Lai Jiangshan wrote:
>> On 09/06/2012 10:53 AM, Minchan Kim wrote:
>>> Normally, MIGRATE_ISOLATE type is used for memory-hotplug.
>>> But it's irony type
On 09/06/2012 04:04 AM, Tejun Heo wrote:
> Hello, Lai.
>
> On Wed, Sep 05, 2012 at 06:37:47PM +0800, Lai Jiangshan wrote:
>> gcwq_unbind_fn() unbind manager by ->manager pointer.
>>
>> rebinding-manger, unbinding/rebinding newly created worker are done by
&g
_relax();
goto again;
}
/* release manager positions */
static void gcwq_release_management_and_unlock(struct global_cwq *gcwq)
{
struct worker_pool *pool;
for_each_worker_pool(pool, gcwq)
mutex_unlock(&pool->manager_mutex);
spin_unlock_irq(&am
On 09/07/2012 12:51 AM, Tejun Heo wrote:
> Hello, Lai.
>
> On Thu, Sep 06, 2012 at 09:04:06AM +0800, Lai Jiangshan wrote:
>>> This doesn't change anything. You're just moving the test to the
>>> caller with comments there explaining how it won't chan
On 09/07/2012 04:08 AM, Tejun Heo wrote:
>>From 985aafbf530834a9ab16348300adc7cbf35aab76 Mon Sep 17 00:00:00 2001
> From: Tejun Heo
> Date: Thu, 6 Sep 2012 12:50:41 -0700
>
> To simplify both normal and CPU hotplug paths, while CPU hotplug is in
> progress, manager_mutex is held to prevent one of
rebase if I don't need to respin the patchset
as V7 ?)
Patch3,4 fix depletion problem, it is simple enough. it goes to 3.6.
Patch 5,6,7 are clean up. -> 3.7
Lai Jiangshan (7):
workqueue: ensure the wq_worker_sleeping() see the right flags
workqueue: async idle rebinding
workque
t;manager
on worker_pool and let hotplug code(gcwq_unbind_fn()) handle it.
also fix too_many_workers() to use this pointer.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 12 ++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/wo
ngly do local wake up.
so we use one write/modify instruction explicitly instead.
This bug will not occur on idle workers, because they have another
WORKER_NOT_RUNNING flags.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c |7 +--
1 files changed, 5 insertions(+), 2 deletions(-)
eed to
use two flags, just one is enough. remove WORKER_REBIND from busy rebinding.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c |9 +
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index d9765c4..4863162 100644
--
moved to the bottom of manage_workers().
Other result of narrowed C.S. manager_workers() becomes
simpler.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 63
1 files changed, 29 insertions(+), 34 deletions(-)
diff --git a/kernel/workqu
rectly, worker rebind itself when it is noticed.
Manager worker will be noticed by the bit of GCWQ_DISASSOCIATED and
WORKER_UNBIND. Because the %UNBOUND bit of manager can't be cleared
while it is managing workers. maybe_rebind_manager() will be noticed
when rebind_workers() happens.
Signed-of
of workers.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 21 -
1 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 4863162..aa46308 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
and don't release gcwq->lock.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 100 +---
1 files changed, 25 insertions(+), 75 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 050b2a5..3dd7ce2 100644
--- a/kernel/
On Sat, Sep 8, 2012 at 7:41 AM, Tejun Heo wrote:
> I think this should do it. Can you spot any hole with the following
> patch?
>
> Thanks.
>
> Index: work/kernel/workqueue.c
> ===
> --- work.orig/kernel/workqueue.c
> +++ work/kernel
On Sun, Sep 9, 2012 at 1:27 AM, Lai Jiangshan wrote:
> On Sun, Sep 9, 2012 at 1:12 AM, Lai Jiangshan wrote:
>> The patch set is based on 3b07e9ca26866697616097044f25fbe53dbab693 of wq.git
>>
>> Patch 1,2 are accepted. Patch 1 goes to 3.6. tj has a replacement goes
>>
On Sun, Sep 9, 2012 at 1:12 AM, Lai Jiangshan wrote:
> The patch set is based on 3b07e9ca26866697616097044f25fbe53dbab693 of wq.git
>
> Patch 1,2 are accepted. Patch 1 goes to 3.6. tj has a replacement goes
> to 3.6 instead of Patch 2. so Patch2 will go to 3.7. Patch2 will need
> t
On Sun, Sep 9, 2012 at 1:32 AM, Tejun Heo wrote:
> On Sat, Sep 08, 2012 at 10:29:50AM -0700, Tejun Heo wrote:
>> > hotplug code can't iterate manager. not rebind_work() nor UNBOUND for
>> > manager.
>>
>> Ah, right. It isn't either on idle or busy list. Maybe have
>> pool->manager pointer?
>
>
On Sun, Sep 9, 2012 at 1:37 AM, Tejun Heo wrote:
> Hello, Lai.
>
> On Sun, Sep 09, 2012 at 01:27:37AM +0800, Lai Jiangshan wrote:
>> On Sun, Sep 9, 2012 at 1:12 AM, Lai Jiangshan wrote:
>> > The patch set is based on 3b07e9ca26866697616097044f25fbe53dbab693 of
>>
On Sun, Sep 9, 2012 at 1:40 AM, Tejun Heo wrote:
> Hello, Lai.
>
> On Sun, Sep 09, 2012 at 01:12:53AM +0800, Lai Jiangshan wrote:
>> +/* does the manager need to be rebind after we just release gcwq->lock */
>> +static void maybe_rebind_manager(struct worker *manage
On Sun, Sep 9, 2012 at 1:50 AM, Tejun Heo wrote:
> Hello, Lai.
>
> On Sun, Sep 09, 2012 at 01:46:59AM +0800, Lai Jiangshan wrote:
>> > * Instead of MANAGING, add pool->manager.
>> >
>> > * Fix the idle depletion bug by using pool->manager for
On Sun, Sep 9, 2012 at 1:53 AM, Tejun Heo wrote:
> Hello,
>
> On Sun, Sep 09, 2012 at 01:50:41AM +0800, Lai Jiangshan wrote:
>> >> + if (worker_maybe_bind_and_lock(manager))
>> >> + worker_clr_flags(manager, WORKER_UNBOUND);
>&g
>
> Hmmm... so, I'm having some difficulty communicating with you. We
> need two separate patch series. One for for-3.6-fixes and the other
> for restructuring on top of for-3.7 after the fixes are merged into
> it.
>
> As you currently posted, the patches are based on for-3.7 and fixes
> and res
On Sun, Sep 9, 2012 at 2:11 AM, Tejun Heo wrote:
> On Sun, Sep 09, 2012 at 02:07:50AM +0800, Lai Jiangshan wrote:
>> when we release gcwq->lock and then grab it, we leave a hole that things
>> can be changed.
>>
>> I don't want to open a hole. if the hole has bu
On Sun, Sep 9, 2012 at 3:02 AM, Tejun Heo wrote:
> Hello, Lai.
>
> On Sun, Sep 09, 2012 at 02:34:02AM +0800, Lai Jiangshan wrote:
>> in 3.6 busy_worker_rebind() handle WORKER_REBIND bit,
>> not WORKER_UNBOUND bit.
>>
>> busy_worker_rebind() takes struct work_
When hotplug happens, the plug code will also grab the manager_mutex,
it will break too_many_workers()'s assumption, and make too_many_workers()
ugly(kick the timer wrongly, no found bug).
To avoid assumption-coruption, we add the original POOL_MANAGING_WORKERS back.
Signed-off-by: Lai Jian
naly, if it fails, unbind itself.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 31 ++-
1 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 383548e..74434c8 100644
--- a/kernel/workqueue.c
+++ b/kernel/
new V2 discards the MIGRATE_HOTREMOVE approach, and use a more straight
implementation(only 1 patch).
Lai Jiangshan (22):
page_alloc.c: don't subtract unrelated memmap from zone's present
pages
memory_hotplug: fix missing nodemask management
slub, hotplug: ignore unrelated node's
So a new proper approach is needed to do it similarly
and new approach should also handle other long living unreclaimable memory.
Current blindly subtracted-present-pages-size approach does wrong, remove it.
Signed-off-by: Lai Jiangshan
---
mm/page_alloc.c | 20 +---
1 files c
use [index] = init_value
use N_x instead of hardcode.
Make it more readability and easy to add new state.
Signed-off-by: Lai Jiangshan
---
drivers/base/node.c | 20 ++--
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/base/node.c b/drivers/base
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
Acked-by: Hillf Danton
---
Documentation/cgroups
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
Acked-by: Hillf Danton
---
fs/proc/kcore.c
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
---
mm/mempolicy.c | 12 ++--
1 files
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
Acked-by: Hillf Danton
---
mm/oom_kill.c |2
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
Acked-by: Christoph Lameter
---
mm/migrate.c |2
Signed-off-by: Lai Jiangshan
---
include/linux/memblock.h |1 +
mm/memblock.c|5 -
mm/page_alloc.c |6 +-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 19dc455..f2977ae 100644
--- a
2 of them).
Signed-off-by: Lai Jiangshan
---
Documentation/kernel-parameters.txt |9 +
mm/page_alloc.c | 29 -
2 files changed, 37 insertions(+), 1 deletions(-)
diff --git a/Documentation/kernel-parameters.txt
b/Documentation/kernel-para
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
---
mm/memcontrol.c | 18 +-
mm
-off-by: Lai Jiangshan
---
arch/x86/mm/init_64.c |4 +++-
mm/page_alloc.c | 40 ++--
2 files changed, 25 insertions(+), 19 deletions(-)
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 2b6b4a3..005f00c 100644
--- a/arch/x86/mm/init_64
From: Yasuaki Ishimatsu
memblock.current_limit is set directly though memblock_set_current_limit()
is prepared. So fix it.
Signed-off-by: Yasuaki Ishimatsu
Signed-off-by: Lai Jiangshan
---
arch/x86/kernel/setup.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a
All are prepared, we can actually introduce N_MEMORY.
add CONFIG_MOVABLE_NODE make we can use it for movable-dedicated node
Signed-off-by: Lai Jiangshan
---
drivers/base/node.c |6 ++
include/linux/nodemask.h |4
mm/Kconfig |8
mm/page_alloc.c
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
---
kernel/kthread.c |2 +-
1 files changed, 1
ories, and helps for THP.
Current constraints: Only the memoryblock which is adjacent to the ZONE_MOVABLE
can be onlined from ZONE_NORMAL to ZONE_MOVABLE.
For opposite onlining behavior, we also introduce "online_kernel" to change
a memoryblock of ZONE_MOVABLE to ZONE_KERNEL when online.
update nodemasks management for N_MEMORY
Signed-off-by: Lai Jiangshan
---
Documentation/memory-hotplug.txt |5 +++-
include/linux/memory.h |1 +
mm/memory_hotplug.c | 49 +
3 files changed, 48 insertions(+), 7 deletions
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
Acked-by: Hillf Danton
---
drivers/base/node.c
make online_movable/online_kernel can empty a zone
or can move memory to a empty zone.
Signed-off-by: Lai Jiangshan
---
mm/memory_hotplug.c | 51 +--
1 files changed, 45 insertions(+), 6 deletions(-)
diff --git a/mm/memory_hotplug.c b/mm
"memblock_find_in_range_node()"
Signed-off-by: Yasuaki Ishimatsu
Signed-off-by: Lai Jiangshan
---
mm/memblock.c |5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/memblock.c b/mm/memblock.c
index fbf5efc..f726b5e 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
suaki Ishimatsu
Signed-off-by: Lai Jiangshan
---
arch/x86/mm/numa.c |8 ++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index 2d125be..a86e315 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -223,9 +223,13 @@ static void _
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
Acked-by: Christoph Lameter
---
mm/vmstat.c |4
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
---
init/main.c |2 +-
1 files changed, 1
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan
Acked-by: Hillf Danton
---
mm/vmscan.c |4
SLUB only fucus on the nodes which has normal memory, so ignore the other
node's hot-adding and hot-removing.
so we only do something when marg->status_change_nid_normal > 0.
Signed-off-by: Lai Jiangshan
---
mm/slub.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
d
In one word, we need a N_MEMORY. We just intrude it as an alias to
N_HIGH_MEMORY and fix all im-proper usages of N_HIGH_MEMORY in late patches.
Signed-off-by: Lai Jiangshan
Acked-by: Christoph Lameter
Acked-by: Hillf Danton
---
include/linux/nodemask.h |1 +
1 files changed, 1 insertions(+
hotplug.
Also add @status_change_nid_normal to struct memory_notify, thus
the memory hotplug callbacks know whether the node_states[N_NORMAL_MEMORY]
are changed.
Signed-off-by: Lai Jiangshan
---
Documentation/memory-hotplug.txt |5 ++-
include/linux/memory.h |1 +
mm
We only require cmpxchg()&retry when task is exiting.
xchg() is enough in other cases like original code in ac3d0da8.
So we try our best to use xchg() and avoid competition&latency
from task_work_add().
Also remove the inner loop
Signed-off-by: Lai Jiangshan
---
diff --git a/kernel/tas
struct lglocks use their own lock_key/lock_dep_map which are defined
in struct lglock. DEFINE_LGLOCK_LOCKDEP() is unused now, so we remove it
and save a small piece of memory.
Signed-off-by: Lai Jiangshan
---
include/linux/lglock.h |9 -
1 files changed, 0 insertions(+), 9 deletions
The per_cpu locks are not used outside nor exported.
Add a "static" linkage keyword to it.
Signed-off-by: Lai Jiangshan
---
include/linux/lglock.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/lglock.h b/include/linux/lglock.h
index 45eff7
When if the lglock don't to be exported,
we can use DEFINE_STATIC_LGLOCK().
Signed-off-by: Lai Jiangshan
---
fs/file_table.c|2 +-
include/linux/lglock.h |8 +++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/fs/file_table.c b/fs/file_table.c
index 70
for task_work_run() and move the logic
of exit_task_work() out from task_work_run().
Signed-off-by: Lai Jiangshan
---
diff --git a/include/linux/task_work.h b/include/linux/task_work.h
index ca5a1cf..1e686a5 100644
--- a/include/linux/task_work.h
+++ b/include/linux/task_work.h
@@ -15,10 +15,6 @@ ini
On 10/18/2012 04:28 AM, Steven Rostedt wrote:
> On Wed, Oct 17, 2012 at 11:07:21AM -0400, Mikulas Patocka wrote:
>>>
>>> Even the previous patch is applied, percpu_down_read() still
>>> needs mb() to pair with it.
>>
>> percpu_down_read uses rcu_read_lock which should guarantee that memory
>> acce
Ping.
On Mon, Apr 15, 2013 at 12:41 AM, Lai Jiangshan wrote:
> I found the early-increasing nr_running in wq_worker_waking_up() is useless
> in many cases. it tries to avoid waking up idle workers for pending work item.
> but delay increasing nr_running does not increase waking up idl
On Sat, Apr 20, 2013 at 2:11 AM, Tejun Heo wrote:
> Hey,
>
> On Fri, Apr 19, 2013 at 06:10:57AM +0800, Lai Jiangshan wrote:
>> Ping.
>
> Sorry, I've been at collab summit / lsf. Plus, it's a bit too late
> for for-3.10 anyway. Anyways, after glancing over it,
Please forget all my other patches.
But these 1/7 and 2/7 __WQ_FREEZING patches can be in 3.10
On Thu, Apr 4, 2013 at 10:12 PM, Tejun Heo wrote:
> Hello, Lai.
>
> On Thu, Apr 04, 2013 at 10:05:32AM +0800, Lai Jiangshan wrote:
>> @@ -4757,25 +4747,16 @@ void thaw_
would remove the need for
> the developer to predict which locks will be highly contended.
>
> This commit allows ticket locks to automatically switch between pure
> ticketlock and queued-lock operation as needed. If too many CPUs are
> spinning on a given ticket lock, a queue struc
ate code and update comments (Steven Rostedt). ]
> [ paulmck: Address Eric Dumazet review feedback. ]
> [ paulmck: Use Lai Jiangshan idea to eliminate smp_mb(). ]
> [ paulmck: Expand ->head_tkt from s32 to s64 (Waiman Long). ]
> [ paulmck: Move cpu_relax() to main spin loop (Steven
ode and update comments (Steven Rostedt). ]
> [ paulmck: Address Eric Dumazet review feedback. ]
> [ paulmck: Use Lai Jiangshan idea to eliminate smp_mb(). ]
> [ paulmck: Expand ->head_tkt from s32 to s64 (Waiman Long). ]
> [ paulmck: Move cpu_relax() to main spin loop (Steven
On Thu, Jun 13, 2013 at 11:22 PM, Paul E. McKenney
wrote:
> On Thu, Jun 13, 2013 at 10:55:41AM +0800, Lai Jiangshan wrote:
>> On 06/12/2013 11:40 PM, Paul E. McKenney wrote:
>> > Breaking up locks is better than implementing high-contention locks, but
>> > if we must
On 06/14/2013 07:57 AM, Paul E. McKenney wrote:
> On Fri, Jun 14, 2013 at 07:25:57AM +0800, Lai Jiangshan wrote:
>> On Thu, Jun 13, 2013 at 11:22 PM, Paul E. McKenney
>> wrote:
>>> On Thu, Jun 13, 2013 at 10:55:41AM +0800, Lai Jiangshan wrote:
>>>> On 06/12/2
On 06/14/2013 07:57 AM, Paul E. McKenney wrote:
> On Fri, Jun 14, 2013 at 07:25:57AM +0800, Lai Jiangshan wrote:
>> On Thu, Jun 13, 2013 at 11:22 PM, Paul E. McKenney
>> wrote:
>>> On Thu, Jun 13, 2013 at 10:55:41AM +0800, Lai Jiangshan wrote:
>>>> On 06/12/2
{
ret = -ENOENT;
}
clk_prepare_unlock();
return ret;
}
===
Could you retry with the following patch?
Thanks,
Lai
>From 5e26b626724139070148df9f6bd0607bc7bc3812 Mon Sep 17 00:00:00 2001
From: Lai Jiangshan
Date: Mon, 3 Jun 2013 16:59:50 +0
On 06/11/2013 08:51 AM, Linus Torvalds wrote:
> On Mon, Jun 10, 2013 at 5:44 PM, Steven Rostedt wrote:
>>
>> OK, I haven't found a issue here yet, but youss are beiing trickssy! We
>> don't like trickssy, and we must find preiouss!!!
>
> .. and I personally have my usual reservations. I absol
On Mon, Jun 10, 2013 at 3:36 AM, Paul E. McKenney
wrote:
> Breaking up locks is better than implementing high-contention locks, but
> if we must have high-contention locks, why not make them automatically
> switch between light-weight ticket locks at low contention and queued
> locks at high conte
On Tue, Jun 11, 2013 at 10:48 PM, Lai Jiangshan wrote:
> On Mon, Jun 10, 2013 at 3:36 AM, Paul E. McKenney
> wrote:
>> Breaking up locks is better than implementing high-contention locks, but
>> if we must have high-contention locks, why not make them automatically
>> swi
This commit allows ticket locks to automatically switch between pure
> ticketlock and queued-lock operation as needed. If too many CPUs are
> spinning on a given ticket lock, a queue structure will be allocated
> and the lock will switch to queued-lock operation. When the lock becomes
> f
On Wed, Jun 12, 2013 at 9:58 AM, Steven Rostedt wrote:
> On Wed, 2013-06-12 at 09:19 +0800, Lai Jiangshan wrote:
>
>> > +
>> > +/*
>> > + * Hand the lock off to the first CPU on the queue.
>> > + */
>> > +void tkt_q_do_wake(arch_spinlock_t
Hi, TJ
After long time(again) thought.
I think this patchset has this problem:
the work may be running on wrong CPU when
there is online cpu in its wq's cpumask.
example:
node0(cpu0,cpu1),node1(cpu2,cpu3),
wq's cpumask: 1,3
the pwq of this wq on the node1's cpumask: 3
current online cpu: 0-2.
so
On 07/16/2013 10:41 PM, Srivatsa S. Bhat wrote:
> Hi,
>
> I have been seeing this warning every time during boot. I haven't
> spent time digging through it though... Please let me know if
> any machine-specific info is needed.
>
> Regards,
> Srivatsa S. Bhat
>
>
> --
On 07/27/2013 07:19 AM, Paul E. McKenney wrote:
> From: "Paul E. McKenney"
>
> At least one CPU must keep the scheduling-clock tick running for
> timekeeping purposes whenever there is a non-idle CPU. However, with
> the new nohz_full adaptive-idle machinery, it is difficult to distinguish
> bet
201 - 300 of 1247 matches
Mail list logo