On Wed, Feb 27, 2013 at 3:30 AM, Srivatsa S. Bhat
wrote:
> On 02/26/2013 09:55 PM, Lai Jiangshan wrote:
>> On Tue, Feb 26, 2013 at 10:22 PM, Srivatsa S. Bhat
>> wrote:
>>>
>>> Hi Lai,
>>>
>>> I'm really not convinced that piggy-backing on
On Tue, Feb 26, 2013 at 10:22 PM, Srivatsa S. Bhat
wrote:
>
> Hi Lai,
>
> I'm really not convinced that piggy-backing on lglocks would help
> us in any way. But still, let me try to address some of the points
> you raised...
>
> On 02/26/2013 06:29 PM, Lai Jiangshan w
On Mon, Feb 18, 2013 at 8:38 PM, Srivatsa S. Bhat
wrote:
> Using global rwlocks as the backend for per-CPU rwlocks helps us avoid many
> lock-ordering related problems (unlike per-cpu locks). However, global
> rwlocks lead to unnecessary cache-line bouncing even when there are no
> writers present
On Tue, Feb 26, 2013 at 3:26 AM, Srivatsa S. Bhat
wrote:
> Hi Lai,
>
> On 02/25/2013 09:23 PM, Lai Jiangshan wrote:
>> Hi, Srivatsa,
>>
>> The target of the whole patchset is nice for me.
>
> Cool! Thanks :-)
>
>> A question: How did you find out the
On Tue, Feb 26, 2013 at 5:02 PM, Srivatsa S. Bhat
wrote:
> On 02/26/2013 05:47 AM, Lai Jiangshan wrote:
>> On Tue, Feb 26, 2013 at 3:26 AM, Srivatsa S. Bhat
>> wrote:
>>> Hi Lai,
>>>
>>> On 02/25/2013 09:23 PM, Lai Jiangshan wrote:
>>>> Hi, S
On Tue, Feb 26, 2013 at 8:17 AM, Lai Jiangshan wrote:
> On Tue, Feb 26, 2013 at 3:26 AM, Srivatsa S. Bhat
> wrote:
>> Hi Lai,
>>
>> On 02/25/2013 09:23 PM, Lai Jiangshan wrote:
>>> Hi, Srivatsa,
>>>
>>> The target of the whole patchset is ni
On Tue, Feb 26, 2013 at 3:26 AM, Srivatsa S. Bhat
wrote:
> Hi Lai,
>
> On 02/25/2013 09:23 PM, Lai Jiangshan wrote:
>> Hi, Srivatsa,
>>
>> The target of the whole patchset is nice for me.
>
> Cool! Thanks :-)
>
>> A question: How did you find out the
untested draft here.
Thanks,
Lai
PS: Some HA tools(I'm writing one) which takes checkpoints of
virtual-machines frequently, I guess this patchset can speedup the
tools.
>From 01db542693a1b7fc6f9ece45d57cb529d9be5b66 Mon Sep 17 00:00:00 2001
From: Lai Jiangshan
Date: Mon, 25 Feb 2013
edule offline_pool() to clear workers.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 109 ++-
1 files changed, 98 insertions(+), 11 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 0b1e6f2..ffdc1db 100644
--- a/k
erent implementation.
On Tue, Feb 19, 2013 at 3:50 AM, Tejun Heo wrote:
> Hello, Lai.
>
> On Tue, Feb 19, 2013 at 12:12:14AM +0800, Lai Jiangshan wrote:
>> +/**
>> + * get_work_cwq - get cwq of the work
>> + * @work: the work item of interest
>> + *
>> + * CON
On 19/02/13 00:12, Lai Jiangshan wrote:
Core patches are patch 1, patch 9, patch 13
Patch 1: enhance locking
Patch 9: recorde worker id to work->data instead of pool id
lookup worker via worker ID if offq
Patch 13:also lookup worker via worker ID if running&&queued,
std worker_pool, this patch solves it.
This patch slows down the very-slow-path destroy_worker(), if it is required,
we will move the synchronize_sched() out.
Signed-off-by: Lai Jiangshan
---
include/linux/workqueue.h | 20 +++---
kernel/workqueue.c| 140 ++---
When a work is dequeued via try_to_grab_pending(), its pool id is recored
in work->data. but this recording is useless when the work is not running.
In this patch, we only record pool id when the work is running.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 11 +--
1 fi
Add new worker->id which is allocated from worker_idr. This
will be used to record the last running worker in work->data.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 28
kernel/workqueue_internal.h |1 +
2 files changed, 29 insertions
Allow we use delayed_flags only in different path in later patches.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c |8
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 7ac6824..cdd5523 100644
--- a/kernel/workqueue.c
ument. we choice the later one.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 18 +-
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index b47d1af..b987195 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@
is de-associated to the pool.
It is done with pool->lock held in ether set of above
Thus we have this semantic:
If pool->lock is held and worker->pool==pool, we can determine that
the worker is associated to the pool now.
Signed-off-by: Lai Jiangshan
---
ker
Use already-known "cwq" instead of get_work_cwq(work) in try_to_grab_pending()
and cwq_activate_first_delayed().
It avoid unneeded calls to get_work_cwq() which becomes not so light-way
in later patches.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 11 +--
1 files
Since we don't use the hashtable, thus we can use list to implement
the for_each_busy_worker().
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 27 ++-
kernel/workqueue_internal.h |9 +++--
2 files changed, 13 insertions(+), 23 deletions(-)
pool->busy_list is touched when the worker processes every work.
if this code is moved out, we reduce this touch.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
in
check)
get_work_cwq() requires the caller hold the pool lock and
the work must be *owned* by the pool.
or we can provide even more loose semantic,
but we don't need loose semantic in any case currently, KISS.
Signed-off-by: Lai Jiangshan
---
include/linux/workqueue.h |3
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c |8 +---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index cdd5523..ab5c61a 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -544,9 +544,11 @@ static inline unsigned
worker_maybe_bind_and_lock() uses both @task and @current and the same time,
they are the same(worker_maybe_bind_and_lock() can only be called by current
worker task)
We make it uses @current only.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c |7 +++
1 files changed, 3
We will use worker->id for global worker id.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 20 +++-
kernel/workqueue_internal.h |2 +-
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index f90d
color bits is not used when offq, so we reuse them for pool IDs.
thus we will have more pool IDs.
Signed-off-by: Lai Jiangshan
---
include/linux/workqueue.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index
ool,
It will still look up the worker.
But this lookup is neeeded in later patches.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 170 ---
1 files changed, 93 insertions(+), 77 deletions(-)
diff --git a/kernel/workqueue.
6-8: ensure modification to worker->pool is under pool lock held
Patch 14: remove hashtable totally
other patch is preparing-patch or cleanup.
Lai Jiangshan (15):
workqueue: add lock_work_pool()
workqueue: allow more work_pool id space
workqueue: remname worker->id to worker->id_in_p
Hi, tj
Thank you for adding this one.
Would you deffer "workqueue: rename cpu_workqueue to pool_workqueue" a
little? I don't want to rebase my almost-ready work again(not a good
reason... but please...)
I will answer your other emails soon and sent the patches.
Thanks,
Lai
On 14/02/13 11:2
Hi, Paul
These (https://lkml.org/lkml/2012/11/29/123) are still not merged.
Thanks,
lai
On 05/02/13 01:18, Paul E. McKenney wrote:
Hello, Ingo,
The major features of this series are:
1. Changes to rcutorture and to RCU documentation. Posted to LKML at
https://lkml.org/lkml/2013
On Wed, Feb 6, 2013 at 2:53 AM, Tejun Heo wrote:
> Hello,
>
> On Tue, Feb 05, 2013 at 08:06:54PM +0800, Lai Jiangshan wrote:
>> >>@@ -3453,15 +3451,13 @@ unsigned int work_busy(struct work_struct *work)
>> >> {
>> >>struct worker_pool *pool = get_
On Wed, Feb 6, 2013 at 12:45 AM, Tejun Heo wrote:
> Hey, Lai.
>
> On Tue, Feb 05, 2013 at 11:00:42PM +0800, Lai Jiangshan wrote:
>> The @cpu can be WORK_CPU_UNBOUND, and the current code will delay
>> to determine on which cpu should this work be queued until timeout,
>&
On Tue, Feb 5, 2013 at 5:04 AM, Tejun Heo wrote:
> Hello, Lai.
>
> Generally, I *really* like where you're headed but like before it's a
> bit difficult for me to apply the patches as-is. Please read on.
>
> On Fri, Feb 01, 2013 at 02:41:23AM +0800, Lai Jiangs
On Tue, Feb 5, 2013 at 6:12 AM, Tejun Heo wrote:
> Hello,
>
> One more thing.
>
> On Fri, Feb 01, 2013 at 02:41:36AM +0800, Lai Jiangshan wrote:
>> @@ -1216,7 +1198,11 @@ static int try_to_grab_pending(struct work_struct
>> *work, bool is_dwork,
>>
于 2013/2/5 5:28, Tejun Heo 写道:
> Hello, again.
>
> On Fri, Feb 01, 2013 at 02:41:26AM +0800, Lai Jiangshan wrote:
>> @@ -110,6 +110,7 @@ struct delayed_work {
>> struct work_struct work;
>> struct timer_list timer;
>> int cpu;
>> +struct
于 2013/2/5 5:28, Tejun Heo 写道:
Hello, again.
On Fri, Feb 01, 2013 at 02:41:26AM +0800, Lai Jiangshan wrote:
@@ -110,6 +110,7 @@ struct delayed_work {
struct work_struct work;
struct timer_list timer;
int cpu;
+ struct workqueue_struct *wq;
Can't we just re
于 2013/2/5 5:34, Tejun Heo 写道:
Hello,
On Fri, Feb 01, 2013 at 02:41:31AM +0800, Lai Jiangshan wrote:
+static struct worker_pool *lock_pool_executing_work(struct work_struct *work,
+ struct worker **worker)
+{
+ unsigned long pool_id
于 2013/2/5 3:54, Tejun Heo 写道:
Hello, Lai.
On Fri, Feb 01, 2013 at 02:41:25AM +0800, Lai Jiangshan wrote:
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 973b290..d474a6c 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -3443,8 +3443,6 @@ EXPORT_SYMBOL_GPL
于 2013/2/5 3:49, Tejun Heo 写道:
Hello, Lai.
On Fri, Feb 01, 2013 at 02:41:24AM +0800, Lai Jiangshan wrote:
In __next_wq_cpu() for_each_*wq_cpu(), the name WORK_CPU_LAST
is proper than WORK_CPU_NONE, convert them to WORK_CPU_LAST.
WORK_CPU_NONE is not used any more, just remove it
work.entry, this patch and the later
two patches make this encoding possible.)
This is the first step of killing CWQ bit of the work which is not queued
on any pool.
Signed-off-by: Lai Jiangshan
---
include/linux/workqueue.h |1 +
kernel/workqueue.c| 32 +++--
Add clear_work_cwq() which clear the CWQ bit when the work is offq when it is
cancelled.
It is the other important step of killing CWQ bit of the work which is
not queued on any pool.
Now, when a work is offq, it has no CWQ bit.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c |7
Now, we has this invariant:
CWQ bit is set and the cwq->pool == pool
<==> the work is queued on the pool
So we can simplify the work-queued-detection-and-lock and remove *mb()s.
(Although rmb()/wmb() is nop in x86, but it is very slow in other arch.)
Signed-off-by: Lai
__queue_work() calls to get_std_worker_pool(), it is indirectly,
we should get it directly from wq/cwq.
It is needed when we introduce non-std worker pool.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c |5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel
__queue_work():
even worker_pool_by_id(pool_id) == get_cwq(cpu, wq)->pool,
It will still call find_worker_executing_work() unconditionally, but it is
it is a very small overhead compared to the lockings and worker_pool_by_id(),
and this overhead will be reduced later.
Signed-off-by: Lai Jiangs
In __next_wq_cpu() for_each_*wq_cpu(), the name WORK_CPU_LAST
is proper than WORK_CPU_NONE, convert them to WORK_CPU_LAST.
WORK_CPU_NONE is not used any more, just remove it.
Signed-off-by: Lai Jiangshan
---
include/linux/workqueue.h |3 +--
kernel/workqueue.c|8
2
Extract lock code from try_to_grab_pending() and name it
lock_pool_queued_work().
It makes the code better readability and make try_to_grab_pending() shorter,
And this new function can be reused by other(later patch).
Add/Use proper locking API.
Signed-off-by: Lai Jiangshan
---
kernel
k
and it is not used any more, just remove it.
Add/Use proper locking API.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 123 ++--
1 files changed, 62 insertions(+), 61 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
in
Even get_work_pool() return NULL, the work may be pending.
Make work_pending() test unconditionally.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c |8 ++--
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 973b290..d474a6c
color bits is not used when offq, so we reuse them for pool IDs.
thus we will have more pool IDs.
Signed-off-by: Lai Jiangshan
---
include/linux/workqueue.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index
d search worker
from hash. We record global worker id for work data and we only need one search.
--PATCH 13
cleanup
--PATCH 1,2,7,11
On top of tj/for-3.9 706026c2141113886f61e1ad2738c9a7723ec69c
Lai Jiangshan (13):
workqueue: remove WORK_CPU_NONE
workqueue: fix work_busy()
w
hed instead.
(local_irq_disable() implies rcu_read_lock_sched(), so we can remove
this overhead.)
Signed-off-by: Lai Jiangshan
---
include/linux/workqueue.h | 18 +++---
kernel/workqueue.c| 126 -
2 files changed, 65 insertions(+), 79 deletions(-)
diff --gi
We know that when the time of the two calls of get_work_pool_id(),
the work is offq, so we can get pool id from work->data directly
and remove the overhead of idr_find() called by get_work_pool_id().
Implement offq_work_pool_id() instead of get_work_pool_id().
Signed-off-by: Lai Jiangs
Add worker->gwid which is allocated from worker_idr. This
will be used to record the last running worker in work->data.
Signed-off-by: Lai Jiangshan
---
kernel/workqueue.c | 28
kernel/workqueue_internal.h |1 +
2 files changed, 29 insertions
git/tj/wq.git for-3.9-remove-gcwq
For the whole patchset
Reviewed-by: Lai Jiangshan
The only concern: get_work_pool() may slow down __queue_work().
I think we can save the pool->id at work_struct->entry.next, It will
simply the code a little. More aggressive, we can save the work_pool
fine
> + with this option on since they don't online memory as movable.
> +
> + Say Y here if you want to hotplug a whole node.
> + Say N here if you want kernel to use memory on all nodes evenly.
Thank you for adding the help text which should have been done
On 11/28/2012 12:08 PM, Jiang Liu wrote:
> On 2012-11-28 11:24, Bob Liu wrote:
>> On Tue, Nov 27, 2012 at 8:49 PM, Tang Chen wrote:
>>> On 11/27/2012 08:09 PM, Bob Liu wrote:
On Tue, Nov 27, 2012 at 4:29 PM, Tang Chen
wrote:
>
> Hi Liu,
>
>
> This feature is used
On 11/30/2012 06:05 AM, Paul E. McKenney wrote:
> On Thu, Nov 29, 2012 at 04:46:09PM +0800, Lai Jiangshan wrote:
>> Old srcu implement requires sp->completed is loaded in
>> RCU-sched(preempt_disable()) section.
>>
>> The new srcu is now not RCU-sched based, it doe
Pack 6 lines of code into 2 lines.
Signed-off-by: Lai Jiangshan
---
kernel/srcu.c |8 ++--
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/kernel/srcu.c b/kernel/srcu.c
index 48d0edb..ac08970 100644
--- a/kernel/srcu.c
+++ b/kernel/srcu.c
@@ -278,12 +278,8 @@ static int
synchronize_srcu() can sleep but it will not sleep if the fast path
succeeds. This annotation will helps us to catch the problem early
if it is called in a wrong contex which can't sleep.
Signed-off-by: Lai Jiangshan
---
kernel/srcu.c |1 +
1 files changed, 1 insertions(+), 0 dele
Hi, Paul
These are tiny cleanups for srcu.
PATCH 4~8 make the code or the comments match the new SRCU.
Thanks,
Lai
Lai Jiangshan (8):
srcu: simplify __srcu_read_unlock() via this_cpu_dec()
srcu: add might_sleep() annotation to synchronize_srcu()
srcu: simple cleanup for
Do you need read-side critical sections that are respected
even though they are in the middle of the idle loop, during
user-mode execution, or on an offlined CPU? If so, SRCU is the
only choice that will work for you.
Signed-off-by: Lai Jiangshan
---
include/linux/s
Do you need read-side critical sections that are respected
even though they are in the middle of the idle loop, during
user-mode execution, or on an offlined CPU? If so, SRCU is the
only choice that will work for you.
Signed-off-by: Lai Jiangshan
---
include/linux/s
The core of srcu is changed, but the comments of synchronize_srcu()
describe the old algorithm. Update it to match the new algorithm.
Signed-off-by: Lai Jiangshan
---
kernel/srcu.c | 10 ++
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/kernel/srcu.c b/kernel/srcu.c
ched_held() here?"
Signed-off-by: Lai Jiangshan
---
kernel/srcu.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/kernel/srcu.c b/kernel/srcu.c
index 38a762f..224400a 100644
--- a/kernel/srcu.c
+++ b/kernel/srcu.c
@@ -294,9 +294,8 @@ int __srcu_read_lock(s
ned-off-by: Lai Jiangshan
---
kernel/srcu.c | 11 +--
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/kernel/srcu.c b/kernel/srcu.c
index 55524f6..38a762f 100644
--- a/kernel/srcu.c
+++ b/kernel/srcu.c
@@ -471,12 +471,11 @@ EXPORT_SYMBOL_GPL(synchronize_srcu);
* Wait f
this_cpu_dec() can do the same thing and sometimes it is better.
(avoid preempt_disable() and use more tiny instructions)
Signed-off-by: Lai Jiangshan
---
kernel/srcu.c |4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/kernel/srcu.c b/kernel/srcu.c
index b363b09
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/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/vmscan.c |4
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
---
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
---
init/main.c |2 +-
1 files changed, 1
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
Acked-by: Christoph Lameter
---
mm/migrate.c |2
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 _
"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
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
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
Acked-by: Hillf Danton
---
drivers/base/node.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
Acked-by: Hillf Danton
---
fs/proc/kcore.c
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(+
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 | 87 +++---
3 files changed, 77 insertions(+), 16 deletions
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 d452ee1..3e52911 100644
--- 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
---
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 3baff25..2ead3c8 100644
--- a/arch/x86/mm/init_64
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
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
---
mm/oom_kill.c |2
vable-node is very important for power-saving,
hardware partitioning and high-available-system(hardware fault management).
Signed-off-by: Lai Jiangshan
---
mm/memory_hotplug.c | 16
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/mm/memory_hotplug.c
n't create task or create other kernel object.
So we disable non-normal-memory-node here, we will enable it
when we prepared.
Signed-off-by: Lai Jiangshan
---
mm/memory_hotplug.c | 40
1 files changed, 40 insertions(+), 0 deletions(-)
rysection is onlined by "online_movable", the kernel
will not have directly reference to the page of the memoryblock,
thus we can remove that memory any time when needed.
When it is online by "online_kernel", the kernel can use it.
When it is online by "online", the zone
ms.
The orignal V1 patchset of "add online_movable" is here:
https://lkml.org/lkml/2012/7/4/145
The new V2 discards the MIGRATE_HOTREMOVE approach, and use a more straight
implementation(only 1 patch).
Lai Jiangshan (22):
mm, memory-hotplug: dynamic configure movable memory and port
d even makes
page-reclaim/watermark
worse. It is against its original purpose/reason.
This adjustment is incorrect/buggy, subtracts unrelated value and violates its
original
purpose, so we simply remove the adjustment.
CC: Mel Gorman
Signed-off-by: Lai Jiangshan
---
mm/page_alloc.c | 20 +
On 10/25/2012 12:17 PM, KOSAKI Motohiro wrote:
> On Wed, Oct 24, 2012 at 5:43 AM, Lai Jiangshan wrote:
>> Currently memory_hotplug only manages the node_states[N_HIGH_MEMORY],
>> it forgets to manage node_states[N_NORMAL_MEMORY]. it may cause
>> node_states[N_NORMAL_MEMO
Hi, KOSAKI
On 09/28/2012 06:03 AM, KOSAKI Motohiro wrote:
> (9/27/12 2:47 AM), Lai Jiangshan wrote:
>> Currently memory_hotplug only manages the node_states[N_HIGH_MEMORY],
>> it forgets to manage node_states[N_NORMAL_MEMORY]. it causes
>> node_states[N_NORMAL_MEMORY] becom
nux-kernel@vger.kernel.org
CC: linux...@kvack.org
Lai Jiangshan (2):
memory_hotplug: fix possible incorrect node_states[N_NORMAL_MEMORY]
slub, hotplug: ignore unrelated node's hot-adding and hot-removing
Documentation/memory-hotplug.txt |5 +-
include/linux/memory.h |1 +
mm/m
ro
CC: Yasuaki Ishimatsu
CC: Rob Landley
CC: Andrew Morton
CC: Jiang Liu
CC: Kay Sievers
CC: Greg Kroah-Hartman
CC: Mel Gorman
CC: 'FNST-Wen Congyang'
CC: linux-...@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: linux...@kvack.org
Signed-off-by: Lai Jiangshan
---
Documen
#x27;
CC: linux-...@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: linux...@kvack.org
Signed-off-by: Lai Jiangshan
---
mm/slub.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index a0d6984..487f0bd 100644
--- a/mm/slub.c
+++ b/mm/s
On 09/29/2012 06:26 AM, KOSAKI Motohiro wrote:
> On Fri, Sep 28, 2012 at 3:19 AM, Lai Jiangshan wrote:
>> HI, Christoph, KOSAKI
>>
>> SLAB always allocates kmem_list3 for all nodes(N_HIGH_MEMORY), also node
>> bug/bad things happens.
>> SLUB always requires km
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
901 - 1000 of 1247 matches
Mail list logo