After boot phase, 'n' always exist.
So add 'likely' macro for helping compiler.
Acked-by: Christoph Lameter c...@linux.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slub.c b/mm/slub.c
index 8b95364..ddbd401 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1005,7 +1005,7
is always false and
we always go to second iteration.
This patch correct this problem.
After that, we don't need return value of put_cpu_partial().
So remove it.
v2: calculate nr of objects using new.objects and new.inuse.
It is more accurate way than before.
Signed-off-by: Joonsoo Kim iamjoonsoo
On Fri, Jan 18, 2013 at 10:55:01AM -0500, Steven Rostedt wrote:
On Fri, 2013-01-18 at 10:04 -0500, Steven Rostedt wrote:
Just to be more complete:
CPU0CPU1
c = __this_cpu_ptr(s-cpu_slab);
Hello, Tejun.
On Wed, Jan 16, 2013 at 05:42:32PM -0800, Tejun Heo wrote:
Hello,
Currently, on the backend side, there are two layers of abstraction.
For each CPU and the special unbound wq-specific CPU, there's one
global_cwq. gcwq in turn hosts two worker_pools - one for normal
priority,
On Wed, Jan 16, 2013 at 05:42:47PM -0800, Tejun Heo wrote:
global_cwq is now nothing but a container for per-pcu standard
s/per-pcu/per-cpu/
worker_pools. Declare the worker pools directly as
cpu/unbound_std_worker_pools[] and remove global_cwq.
* get_gcwq() is replaced with
:
coverletter: refer a link related to this work
[2/3]: drop @flags of find_static_vm_vaddr
Rebased on v3.8-rc4
v1-v2:
[2/3]: patch description is improved.
Rebased on v3.7-rc7
Joonsoo Kim (3):
ARM: vmregion: remove vmregion code entirely
ARM: static_vm: introduce an infrastructure for static
From: Joonsoo Kim js1...@gmail.com
Now, there is no user for vmregion.
So remove it.
Signed-off-by: Joonsoo Kim js1...@gmail.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile
index 8a9c4cb..4e333fa 100644
--- a/arch/arm/mm/Makefile
From: Joonsoo Kim js1...@gmail.com
In current implementation, we used ARM-specific flag, that is,
VM_ARM_STATIC_MAPPING, for distinguishing ARM specific static mapped area.
The purpose of static mapped area is to re-use static mapped area when
entire physical address range of the ioremap request
From: Joonsoo Kim js1...@gmail.com
A static mapped area is ARM-specific, so it is better not to use
generic vmalloc data structure, that is, vmlist and vmlist_lock
for managing static mapped area. And it causes some needless overhead and
reducing this overhead is better idea.
Now, we have newly
worker_pool
rather than the array so that every pool is aligned.
Signed-off-by: Tejun Heo t...@kernel.org
Cc: Joonsoo Kim js1...@gmail.com
---
Rebased on top of the current wq/for-3.9 and Joonsoo's comments
applied.
Thanks.
kernel/workqueue.c | 46
Now, we have newly introduced APIs which reduce copy overhead of
zsmalloc for objects on page boundary.
So use it in zcache.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/drivers/staging/zcache/zcache-main.c
b/drivers/staging/zcache/zcache-main.c
index 52b43b7..d1dee76 100644
.
Using this information, we can do memcpy without overhead.
For USE_PGTABLE_MAPPING case, we can avoid flush cache and tlb overhead
via these API.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
---
These are [RFC] patches, because I don't test and
I don't have test environment, yet. Just compile
Now, we have newly introduced APIs which reduce copy overhead of
zsmalloc for objects on page boundary.
So use it in zram.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index fb4a7c9..554a742 100644
--- a/drivers
On Tue, Jan 15, 2013 at 03:46:17PM +, Christoph Lameter wrote:
On Tue, 15 Jan 2013, Joonsoo Kim wrote:
There is a subtle bug when calculating a number of acquired objects.
After acquire_slab() is executed at first, page-inuse is same as
page-objects, then, available is always 0. So
On Tue, Jan 15, 2013 at 03:36:10PM +, Christoph Lameter wrote:
On Tue, 15 Jan 2013, Joonsoo Kim wrote:
These didn't make any error previously, because we normally don't free
objects which comes from kmem_cache's first slab and kmem_cache_node's.
And these slabs are on the partial
Hello, Liu Bo.
On Wed, Jan 16, 2013 at 11:03:13AM +0800, Liu Bo wrote:
This adds a leak decoder callback so that slab destruction
can use to generate debugging output for the allocated objects.
Callers like btrfs are using their own leak tracking which will
manage allocated objects in a
that, it's fine to allow preemption.
How about this?
It's based on v3.8-rc3.
I'm not test this patch, yet.
Just for sharing my idea to fix a problem.
-8---
From aaf529e347b7deb8c35dd484abc9166a5d3c0629 Mon Sep 17 00:00:00 2001
From: Joonsoo Kim iamjoonsoo
This name doesn't represent specific meaning.
So rename it to imply it's purpose.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 26058d0..e6f8783 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6814,7 +6814,7
cur_ld_moved is reset if env.flags hit LBF_NEED_BREAK.
So, there is possibility that we miss doing resched_cpu().
Correct it as changing position of resched_cpu()
before checking LBF_NEED_BREAK.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/kernel/sched/fair.c b/kernel/sched
...@linux.vnet.ibm.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 70631e8..25c798c 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5014,14 +5014,20 @@ static int load_balance(int this_cpu, struct rq
*this_rq,
struct lb_env env
Vaddagiri va...@linux.vnet.ibm.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index e6f8783..d4c6ed0 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6814,6 +6814,7 @@ struct task_group root_task_group;
LIST_HEAD
to other cpus and, of course, this situaltion may be continued after
we change the target cpu. So this patch clear LBF_ALL_PINNED in order
to mitigate useless redoing overhead, if can_migrate_task() is failed
by above reason.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/kernel/sched
Some validation for task moving is performed in move_tasks() and
move_one_task(). We can move these code to can_migrate_task()
which is already exist for this purpose.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 97498f4..849bc8e
be moved as cpu affinity. But, currently,
if imbalance is not large enough to task's load, we leave LBF_ALL_PINNED
flag and 'redo' is triggered. This is not our intention, so correct it.
These are based on v3.8-rc7.
Joonsoo Kim (8):
sched: change position of resched_cpu() in load_balance
...@linux.vnet.ibm.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 0c6aaf6..97498f4 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5016,8 +5016,15 @@ static int load_balance(int this_cpu, struct rq *this_rq
After commit 88b8dac0, dst-cpu can be changed in load_balance(),
then we can't know cpu_idle_type of dst-cpu when load_balance()
return positive. So, add explicit cpu_idle_type checking.
Cc: Srivatsa Vaddagiri va...@linux.vnet.ibm.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git
Hello, Steven.
On Fri, Feb 15, 2013 at 01:13:39AM -0500, Steven Rostedt wrote:
Performance counter stats for '/work/c/hackbench 500' (100 runs):
199820.045583 task-clock#8.016 CPUs utilized
( +- 5.29% ) [100.00%]
3,594,264 context-switches
Hello, Alex.
On Mon, Feb 18, 2013 at 01:07:28PM +0800, Alex Shi wrote:
We need initialize the se.avg.{decay_count, load_avg_contrib} to zero
after a new task forked.
Otherwise random values of above variables cause mess when do new task
I think that these are not random values. In
Hello, Alex.
On Mon, Feb 18, 2013 at 01:07:37PM +0800, Alex Shi wrote:
If the waked/execed task is transitory enough, it will has a chance to be
packed into a cpu which is busy but still has time to care it.
For powersaving policy, only the history util 25% task has chance to
be packed, and
Hello, Seth.
I'm not sure that this is right time to review, because I already have
seen many effort of various people to promote zxxx series. I don't want to
be a stopper to promote these. :)
But, I read the code, now, and then some comments below.
On Wed, Feb 13, 2013 at 12:38:44PM -0600, Seth
On Wed, Feb 20, 2013 at 08:37:33AM +0900, Minchan Kim wrote:
On Tue, Feb 19, 2013 at 11:54:21AM -0600, Seth Jennings wrote:
On 02/19/2013 03:18 AM, Joonsoo Kim wrote:
Hello, Seth.
I'm not sure that this is right time to review, because I already have
seen many effort of various people
On Wed, Feb 20, 2013 at 04:04:41PM -0600, Seth Jennings wrote:
=
DO NOT MERGE, FOR REVIEW ONLY
This patch introduces zsmalloc as new code, however, it already
exists in drivers/staging. In order to build successfully, you
must select EITHER to driver/staging version OR this version.
2013/2/23 Christoph Lameter c...@linux.com:
On Fri, 22 Feb 2013, Glauber Costa wrote:
On 02/22/2013 09:01 PM, Christoph Lameter wrote:
Argh. This one was the final version:
https://patchwork.kernel.org/patch/2009521/
It seems it would work. It is all the same to me.
Which one do you
Hello, Seth.
Here comes minor comments.
On Wed, Feb 20, 2013 at 04:04:44PM -0600, Seth Jennings wrote:
zswap is a thin compression backend for frontswap. It receives
pages from frontswap and attempts to store them in a compressed
memory pool, resulting in an effective partial memory reclaim
On Thu, Feb 14, 2013 at 02:48:33PM +0900, Joonsoo Kim wrote:
Commit 88b8dac0 makes load_balance() consider other cpus in its group.
But, there are some missing parts for this feature to work properly.
This patchset correct these things and make load_balance() robust.
Others are related
Hello, Christoph.
On Sun, Feb 24, 2013 at 12:35:22AM +, Christoph Lameter wrote:
On Sat, 23 Feb 2013, JoonSoo Kim wrote:
With flushing, deactivate_slab() occur and it has some overhead to
deactivate objects.
If my patch properly fix this situation, it is better to use mine
which
it
is possible that that __ac_put_obj() checks SlabPfmemalloc on a tail page
and while this is harmless, it is sloppy. This patch ensures that the head
page is always used.
This problem was originally identified by Joonsoo Kim.
[js1...@gmail.com: Original implementation and problem
as it is expected that order-0 pages are in use. Unfortunately it
is possible that that __ac_put_obj() checks SlabPfmemalloc on a tail page
and while this is harmless, it is sloppy. This patch ensures that the head
page is always used.
This problem was originally identified by Joonsoo Kim.
[js1...@gmail.com
2012/8/25 JoonSoo Kim js1...@gmail.com:
2012/8/16 Joonsoo Kim js1...@gmail.com:
When we try to free object, there is some of case that we need
to take a node lock. This is the necessary step for preventing a race.
After taking a lock, then we try to cmpxchg_double_slab
2012/9/7 Mel Gorman mgor...@suse.de:
This churns code a lot more than is necessary. How about this as a
replacement patch?
---8---
From: Joonsoo Kim js1...@gmail.com
Subject: [PATCH] slab: do ClearSlabPfmemalloc() for all pages of slab
Right now, we call ClearSlabPfmemalloc() for first
Hi, Glauber.
2012/9/18 Glauber Costa glom...@parallels.com:
+/*
+ * We need to verify if the allocation against current-mm-owner's memcg is
+ * possible for the given order. But the page is not allocated yet, so we'll
+ * need a further commit step to do the final arrangements.
+ *
+ * It
Hi Glauber.
2012/9/18 Glauber Costa glom...@parallels.com:
diff --git a/mm/slub.c b/mm/slub.c
index 0b68d15..9d79216 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2602,6 +2602,7 @@ redo:
} else
__slab_free(s, page, x, addr);
+ kmem_cache_verify_dead(s);
}
As
*_memcg = memcg should be executed when memcg_charge_kmem is success.
memcg_charge_kmem return 0 if success in charging.
Therefore, I think this code is wrong.
If I am right, it is a serious bug that affect behavior of all the patchset.
Which is precisely what it does. ret is a boolean, that
Hi, Glauber.
2012/9/18 Glauber Costa glom...@parallels.com:
diff --git a/mm/slub.c b/mm/slub.c
index 0b68d15..9d79216 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2602,6 +2602,7 @@ redo:
} else
__slab_free(s, page, x, addr);
+ kmem_cache_verify_dead(s);
}
++tries == 5 never being checked. This in turn means that at the end
of the function, ret may have a positive value, which should be treated
as an error.
This patch changes __alloc_contig_migrate_range() so that the return
statement converts positive ret value into -EBUSY error.
Signed-off-by: Joonsoo
() is identical case as migrate_pages()
Signed-off-by: Joonsoo Kim js1...@gmail.com
Cc: Christoph Lameter c...@linux.com
Acked-by: Christoph Lameter c...@linux.com
Acked-by: Michal Nazarewicz min...@mina86.com
---
[Patch 2/4]: add Acked-by: Michal Nazarewicz min...@mina86.com
[Patch 3/4]: commit log
Additionally, Correct comment above do_migrate_pages()
Signed-off-by: Joonsoo Kim js1...@gmail.com
Cc: Sasha Levin levinsasha...@gmail.com
Cc: Christoph Lameter c...@linux.com
Acked-by: Michal Nazarewicz min...@mina86.com
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 1d771e4..0732729 100644
--- a/mm
move_pages() syscall may return success in case that
do_move_page_to_node_array return positive value which means migration failed.
This patch changes return value of do_move_page_to_node_array
for not returning positive value. It can fix the problem.
Signed-off-by: Joonsoo Kim js1...@gmail.com
the cpu partial slabs is removed
from cpu partial list. In this time, we could expect that
this_cpu_cmpxchg is mostly succeed.
Signed-off-by: Joonsoo Kim js1...@gmail.com
Cc: Christoph Lameter c...@linux.com
Cc: David Rientjes rient...@google.com
Acked-by: Christoph Lameter c...@linux.com
---
Change log
-take a lock if necessary policy is
helpful to this.
Signed-off-by: Joonsoo Kim js1...@gmail.com
Cc: Christoph Lameter c...@linux.com
---
This is v2 of slub: release a lock if freeing object with a lock is failed in
__slab_free()
Subject and commit log are changed from v1.
Code is same as v1.
diff
2012/7/28 Christoph Lameter c...@linux.com:
On Sat, 28 Jul 2012, Joonsoo Kim wrote:
move_pages() syscall may return success in case that
do_move_page_to_node_array return positive value which means migration
failed.
Nope. It only means that the migration for some pages has failed. This may
2012/7/28 Christoph Lameter c...@linux.com:
On Sat, 28 Jul 2012, Joonsoo Kim wrote:
do_migrate_pages() can return the number of pages not migrated.
Because migrate_pages() syscall return this value directly,
migrate_pages() syscall may return the number of pages not migrated.
In fail case
2012/7/28 Christoph Lameter c...@linux.com:
On Sat, 28 Jul 2012, Joonsoo Kim wrote:
Subject and commit log are changed from v1.
That looks a bit better. But the changelog could use more cleanup and
clearer expression.
@@ -2490,25 +2492,17 @@ static void __slab_free(struct kmem_cache *s
2012/7/31 Christoph Lameter c...@linux.com:
On Sat, 28 Jul 2012, JoonSoo Kim wrote:
2012/7/28 Christoph Lameter c...@linux.com:
On Sat, 28 Jul 2012, Joonsoo Kim wrote:
move_pages() syscall may return success in case that
do_move_page_to_node_array return positive value which means
it makes code robust and prevent future mistakes.
So change code to use this enum value.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 692d976..188eef8 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -183,7 +183,8 @@ struct global_cwq
of WQ_NON_REENTRANT.
Change it to cpu argument is prevent to go into sub-optimal path.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 188eef8..bc5c5e1 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1158,6 +1158,8 @@ int
properly.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index bc5c5e1..f69f094 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -269,12 +269,14 @@ struct workqueue_struct {
};
struct workqueue_struct *system_wq __read_mostly;
+struct
To speed cpu down processing up, use system_highpri_wq.
As scheduling priority of workers on it is higher than system_wq and
it is not contended by other normal works on this cpu, work on it
is processed faster than system_wq.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel
theses. This implements it.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index f69f094..e0e1d41 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -489,6 +489,11 @@ static int worker_pool_pri(struct worker_pool *pool)
return pool
2012/8/14 Tejun Heo t...@kernel.org:
Hello,
On Tue, Aug 14, 2012 at 01:17:49AM +0900, Joonsoo Kim wrote:
We assign cpu id into work struct in queue_delayed_work_on().
In current implementation, when work is come in first time,
current running cpu id is assigned.
If we do
I think it would be better to just opencode system_wq selection in
rebind_workers().
Sorry for my poor English skill.
Could you elaborate opencode system_wq selection means?
Thanks!
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to
2012/8/14 Tejun Heo t...@kernel.org:
On Tue, Aug 14, 2012 at 01:17:52AM +0900, Joonsoo Kim wrote:
To speed cpu down processing up, use system_highpri_wq.
As scheduling priority of workers on it is higher than system_wq and
it is not contended by other normal works on this cpu, work
And, do u mean @cpu is WORK_CPU_UNBOUND?
@cpu could be WORK_CPU_UNBOUND at that point. The timer will be added
to local CPU but @work-data would be pointing to WORK_CPU_UNBOUND,
again triggering the condition. Given that @cpu being
WORK_CPU_UNBOUND is far more common than an actual CPU
2012/8/14 Tejun Heo t...@kernel.org:
On Tue, Aug 14, 2012 at 01:57:10AM +0900, JoonSoo Kim wrote:
I think it would be better to just opencode system_wq selection in
rebind_workers().
Sorry for my poor English skill.
Could you elaborate opencode system_wq selection means?
Dropping
2012/8/14 Tejun Heo t...@kernel.org:
Hello,
On Tue, Aug 14, 2012 at 02:02:31AM +0900, JoonSoo Kim wrote:
2012/8/14 Tejun Heo t...@kernel.org:
On Tue, Aug 14, 2012 at 01:17:52AM +0900, Joonsoo Kim wrote:
Is this from an actual workload? ie. do you have a test case where
this matters
Why not just do
if (cpu == WORK_CPU_UNBOUND)
cpu = raw_smp_processor_id();
if (!(wq-flags...) {
...
if (gcwq gcwq-cpu != WORK_CPU_UNBOUND)
lcpu = gcwq-cpu;
else
are for our purpose.
Joonsoo Kim (6):
workqueue: use enum value to set array size of pools in gcwq
workqueue: correct req_cpu in trace_workqueue_queue_work()
workqueue: change value of lcpu in __queue_delayed_work_on()
workqueue: introduce system_highpri_wq
workqueue: use system_highpri_wq
variable for storing local cpu.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 49d8f4a..6a17ab0 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1198,6 +1198,7 @@ static void __queue_work(unsigned int cpu, struct
workqueue_struct
properly.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index f55ac26..470b0eb 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -269,12 +269,14 @@ struct workqueue_struct {
};
struct workqueue_struct *system_wq __read_mostly;
+struct
it makes code robust and prevent future mistakes.
So change code to use this enum value.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 4fef952..49d8f4a 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -183,7 +183,8 @@ struct global_cwq
To speed cpu down processing up, use system_highpri_wq.
As scheduling priority of workers on it is higher than system_wq and
it is not contended by other normal works on this cpu, work on it
is processed faster than system_wq.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel
theses. This implements it.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 470b0eb..4c5733c1 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1738,6 +1738,7 @@ retry:
/* rebind busy workers */
for_each_busy_worker
to go into sub-optimal path.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 6a17ab0..f55ac26 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1358,9 +1358,10 @@ static void __queue_delayed_work(int cpu, struct
workqueue_struct
2012/8/15 Tejun Heo t...@kernel.org:
Hello,
On Wed, Aug 15, 2012 at 03:10:12AM +0900, Joonsoo Kim wrote:
When we do tracing workqueue_queue_work(), it records requested cpu.
But, if !(@wq-flag WQ_UNBOUND) and @cpu is WORK_CPU_UNBOUND,
requested cpu is changed as local cpu.
In case of @wq
To speed cpu down processing up, use system_highpri_wq.
As scheduling priority of workers on it is higher than system_wq and
it is not contended by other normal works on this cpu, work on it
is processed faster than system_wq.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel
properly.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 32c4f79..a768ffd 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -269,12 +269,14 @@ struct workqueue_struct {
};
struct workqueue_struct *system_wq __read_mostly;
+struct
theses. This implements it.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index a768ffd..2945734 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1742,6 +1742,7 @@ retry:
/* rebind busy workers */
for_each_busy_worker
This patchset introduce system_highpri_wq
in order to use proper cwq for highpri worker.
First 3 patches are not related to that purpose.
Just fix arbitrary issues.
Last 3 patches are for our purpose.
Joonsoo Kim (6):
workqueue: use enum value to set array size of pools in gcwq
workqueue
variable for storing requested cpu.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 49d8f4a..c29f2dc 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1198,6 +1198,7 @@ static void __queue_work(unsigned int cpu, struct
to go into sub-optimal path.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index c29f2dc..32c4f79 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1356,9 +1356,16 @@ static void __queue_delayed_work(int cpu, struct
workqueue_struct
it makes code robust and prevent future mistakes.
So change code to use this enum value.
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 4fef952..49d8f4a 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -183,7 +183,8 @@ struct global_cwq
the cpu partial slabs is removed
from cpu partial list. In this time, we could expect that
this_cpu_cmpxchg is mostly succeed.
Signed-off-by: Joonsoo Kim js1...@gmail.com
Cc: Christoph Lameter c...@linux.com
Cc: David Rientjes rient...@google.com
Acked-by: Christoph Lameter c...@linux.com
---
Hello
we do retrying, status of slab is already changed,
so we don't need a lock anymore in almost every case.
release a lock first, and re-take a lock if necessary policy is
helpful to this.
Signed-off-by: Joonsoo Kim js1...@gmail.com
Cc: Christoph Lameter c...@linux.com
Acked-by: Christoph Lameter c
0 to objects count when we get for cpu freelist.
Signed-off-by: Joonsoo Kim js1...@gmail.com
Cc: Christoph Lameter c...@linux.com
Cc: David Rientjes rient...@google.com
diff --git a/mm/slub.c b/mm/slub.c
index efce427..88dca1d 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1550,7 +1550,12 @@ static
2012/8/16 Christoph Lameter c...@linux.com:
On Thu, 16 Aug 2012, Joonsoo Kim wrote:
s-cpu_partial determine the maximum number of objects kept
in the per cpu partial lists of a processor. Currently, it is used for
not only per cpu partial list but also cpu freelist. Therefore
I think that s-cpu_partial is for cpu partial slab, not cpu slab.
Ummm... Not entirely. s-cpu_partial is the mininum number of objects to
cache per processor. This includes the objects available in the per cpu
slab and the other slabs on the per cpu partial list.
Hmm..
When we do test for
2012/8/16 Joonsoo Kim js1...@gmail.com:
When we try to free object, there is some of case that we need
to take a node lock. This is the necessary step for preventing a race.
After taking a lock, then we try to cmpxchg_double_slab().
But, there is a possible scenario that cmpxchg_double_slab
cpu_partial of kmem_cache struct is a bit awkward.
It means the maximum number of objects kept in the per cpu slab
and cpu partial lists of a processor. However, current name
seems to represent objects kept in the cpu partial lists only.
So, this patch renames it.
Signed-off-by: Joonsoo Kim js1
same meaning in both case
and rename available to cpu_slab_objects for readability.
Signed-off-by: Joonsoo Kim js1...@gmail.com
Cc: Christoph Lameter c...@linux-foundation.org
diff --git a/mm/slub.c b/mm/slub.c
index d597530..c96e0e4 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1538,6 +1538,7
2012/8/25 Christoph Lameter c...@linux.com:
On Sat, 25 Aug 2012, Joonsoo Kim wrote:
index d597530..c96e0e4 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1538,6 +1538,7 @@ static void *get_partial_node(struct kmem_cache *s,
{
struct page *page, *page2;
void *object = NULL
2012/8/25 Christoph Lameter c...@linux.com:
On Sat, 25 Aug 2012, JoonSoo Kim wrote:
But, when using cpu_partial_objects, I have a coding style problem.
if (kmem_cache_debug(s)
|| cpu_slab_objects + cpu_partial_objects
() in get_partial_node()
It prevent deactivate - re-get in get_partial.
Instead, new_slab() is called. It may return !PFMEMALLOC page,
so above situation will be suspended sometime.
Signed-off-by: Joonsoo Kim js1...@gmail.com
Cc: David Miller da...@davemloft.net
Cc: Neil Brown ne...@suse.de
Cc: Peter Zijlstra
Now, we just do ClearSlabPfmemalloc() for first page of slab
when we clear SlabPfmemalloc flag. It is a problem because we sometimes
test flag of page which is not first page of slab in __ac_put_obj().
So add code to do ClearSlabPfmemalloc for all pages of slab.
Signed-off-by: Joonsoo Kim js1
In array cache, there is a object at index 0.
So fix it.
Signed-off-by: Joonsoo Kim js1...@gmail.com
Cc: Mel Gorman mgor...@suse.de
Cc: Christoph Lameter c...@linux-foundation.org
diff --git a/mm/slab.c b/mm/slab.c
index 45cf59a..eb74bf5 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -976,7 +976,7
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 12637ce..08bc2a4 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -23,6 +23,41 @@ enum slab_state slab_state;
LIST_HEAD(slab_caches);
DEFINE_MUTEX(slab_mutex);
+static int kmem_cache_sanity_check(const char *name, size_t
2012/8/17 Christoph Lameter c...@linux.com:
On Thu, 16 Aug 2012, JoonSoo Kim wrote:
But, if you prefer that s-cpu_partial is for both cpu slab and cpu
partial slab,
get_partial_node() needs an another minor fix.
We should add number of objects in cpu slab when we refill cpu partial slab
2012/8/17 Tejun Heo t...@kernel.org:
On Wed, Aug 15, 2012 at 11:25:35PM +0900, Joonsoo Kim wrote:
Change from v2
[1/6] No change
[2/6] Change local variable name and use it directly for TP
[3/6] Add a comment.
[4/6] No change
[5/6] Add a comment. Fix ugly indentation.
[6/6] No change
2012/8/17 Christoph Lameter c...@linux.com:
On Fri, 17 Aug 2012, JoonSoo Kim wrote:
What difference does this patch make? At the end of the day you need the
total number of objects available in the partial slabs and the cpu slab
for comparison.
It doesn't induce any large difference
__alloc_pages_direct_compact has many arguments so invoking it is very costly.
And in almost invoking case, order is 0, so return immediately.
Let's not invoke it when order 0
Signed-off-by: Joonsoo Kim js1...@gmail.com
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6092f33..f4039aa
2012/7/7 Minchan Kim minc...@kernel.org:
Hi Joonsoo,
On Sat, Jul 07, 2012 at 12:28:41AM +0900, Joonsoo Kim wrote:
__alloc_pages_direct_compact has many arguments so invoking it is very
costly.
It's already slow path so it's pointless for such optimization.
I know this is so minor
201 - 300 of 4538 matches
Mail list logo