n local_irq_disable/enable()
> added per Michal Hocko.
>
> Signed-off-by: Tejun Heo
> Reviewed-by: Michal Hocko
> Cc: Johannes Weiner
> Cc: Balbir Singh
> Cc: KAMEZAWA Hiroyuki
Acked-by: Li Zefan
--
To unsubscribe from this list: send the line "unsubscribe linux-k
atomic against css_tryget() and will be removed by future
> changes.
>
> v2: cgroup_call_pre_destroy() removal dropped per Michal. Commit
> message updated to explain local_irq_disable/enable() conversion.
>
> Signed-off-by: Tejun Heo
> Reviewed-by: Michal Hocko
Acked-
ecessary.
>
> Do it anyway such that locking is contained inside cgroup proper and
> we don't get nasty surprises if we ever grow another caller of
> cgroup_create().
>
> Signed-off-by: Tejun Heo
> Reviewed-by: Michal Hocko
Acked-by: Li Zefan
--
To unsubscribe from
t; v2: cgroup_call_pre_destroy() removal moved to this patch per Michal.
> Commit message updated per Glauber.
>
> Signed-off-by: Tejun Heo
> Reviewed-by: Michal Hocko
> Cc: Glauber Costa
Acked-by: Li Zefan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
albir Singh
> Cc: KAMEZAWA Hiroyuki
> ---
> include/linux/cgroup.h | 21 -
> kernel/cgroup.c| 51
> --
> mm/memcontrol.c| 24 +---
> 3 files changed, 1 insertion(+), 95
On 2012/11/1 3:44, Tejun Heo wrote:
> All ->pre_destory() implementations return 0 now, which is the only
> allowed return value. Make it return void.
>
> Signed-off-by: Tejun Heo
> Cc: Michal Hocko
> Cc: Balbir Singh
> Cc: KAMEZAWA Hiroyuki
> Cc: Vivek Goyal
On 2013/7/10 10:18, zhangwei(Jovi) wrote:
> When I'm using ktap script to tracing all event tracepoints by relay
> transport, without this patch, the system will hang in few seconds.
>
> I found the original patch discussion in 2007.
> http://marc.info/?l=linux-kernel&m=118544794717162&w=2
> (In t
On 2013/7/12 8:50, Theodore Ts'o wrote:
> On Thu, Jul 11, 2013 at 03:01:17PM -0700, Greg Kroah-Hartman wrote:
>>
>> I'm sitting on top of over 170 more patches that have been marked for
>> the stable releases right now that are not included in this set of
>> releases. The fact that there ar
still it's better to fix this inconsistency.
Signed-off-by: Li Zefan
---
include/linux/sched/sysctl.h | 2 +-
kernel/hung_task.c | 2 +-
kernel/sysctl.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/sched/sysctl.h b/include/l
Cc: Ingo, as this touched include/linux/sched/.
On 2013/9/14 10:47, Li Zefan wrote:
> As sysctl_hung_task_check_count is unsigned long, when this value is
> assigned to max_count in check_hung_uninterruptible_tasks(), it's
> truncated to int type.
>
> Therefore
>> On 2013/9/14 10:47, Li Zefan wrote:
>>> As sysctl_hung_task_check_count is unsigned long, when this value is
>>> assigned to max_count in check_hung_uninterruptible_tasks(), it's
>>> truncated to int type.
>>>
>>> Therefore if
ted seqlock writers
> and there may be more edge cases.
>
> Comments and feedback would be appreciated!
>
Could you describe how seqlocks/seqcounts can lead to deadlock in the
changelog?
> Cc: Mathieu Desnoyers
> Cc: Li Zefan
> Cc: Steven Rostedt
> Cc: Peter Zijlstra
>
.080042] *** DEADLOCK ***
>
> The issue stems from the kthreadd() function calling set_mems_allowed
> with irqs enabled. While its possibly unlikely for the actual deadlock
> to trigger, a fix is fairly simple: disable irqs before taking the
> mems_allowed_seq lock.
>
Now I
roup-factor-out-cgroup_subsys_state-creation-into-.patch
> 0008-cgroup-implement-for_each_css.patch
> 0009-cgroup-remove-for_each_root_subsys.patch
>
Acked-by: Li Zefan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ma
interfaces requiring those
statistics, I just add WARN_ON for those cases.
Cc: # 3.2+
Signed-off-by: Li Zefan
---
mm/slub.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/mm/slub.c b/mm/slub.c
index e3ba1f2..6ea461d 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4300,7
On 2013/8/29 5:03, Tejun Heo wrote:
> ae7f164a09 ("cgroup: move cgroup->subsys[] assignment to
> online_css()") moved cgroup->subsys[] assignements later in
> cgroup_create() but didn't update error handling path accordingly
> leaking later css's after an online_css() failure.
>
> This patch moves
Please don't. Pure colding style cleanup is discouraged.
You're not going to run checkpatch.pl on the whole kernel tree and fix
all the complaints, are you?
On 2013/9/3 16:29, Chen Gang wrote:
> For 'switch case', remove redundancy '\t' (also can let related lines
> within 80 columns) and remove
still truncate the user input, but reading
sysctl.hung_task_check_count reflects the truncated value.
v2: limit lowest value to 0.
Signed-off-by: Li Zefan
Acked-by: Ingo Molnar
---
include/linux/sched/sysctl.h | 2 +-
kernel/hung_task.c | 2 +-
kernel/sysctl.c | 5 +++
In the failure path in jffs2_do_crccheck_inode() the lock isn't released
before returning.
This probably won't cause real bug, because the structure that contains
the lock is freed in this case.
Signed-off-by: Li Zefan
---
fs/jffs2/readinode.c | 3 ++-
1 file changed, 2 insert
idr_remove() in cgroup_offline)fn().
v2->v3:
- some minor cleanups suggested by Michal.
- fixed the call to idr_alloc() in cgroup_init() in the first patch.
Li Zefan (5):
memcg: convert to use cgroup_is_descendant()
memcg: convert to use cgroup id
memcg: fail to create cgroup if the cgroup id is to
This is a preparation to kill css_id.
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 7dda769..9117249 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1405,7
Now memcg uses cgroup id instead of css id. Update some comments and
set mem_cgroup_subsys->use_id to 0.
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
---
mm/memcontrol.c | 23 ---
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/mm/memcontrol.c b
Use cgroup id instead of css id. This is a preparation to kill css id.
Note, as memcg treat 0 as an invalid id, while cgroup id starts with 0,
we define memcg_id == cgroup_id + 1.
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
---
mm/memcontrol.c | 32 ++--
1 file
memcg requires the cgroup id to be smaller than 65536.
This is a preparation to kill css id.
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
---
mm/memcontrol.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 6719e2c..4e40ebe 100644
--- a/mm
The only user of css_id was memcg, and it has been convered to use
cgroup->id, so kill css_id.
Signed-off-by: Li Zefan
Reviewed-by: Michal Hocko
Acked-by: Tejun Heo
---
include/linux/cgroup.h | 37
kernel/cgroup.c| 248 +
On 2013/9/23 21:12, Tejun Heo wrote:
> On Mon, Sep 23, 2013 at 09:08:16AM -0400, Tejun Heo wrote:
>> Hello,
>>
>> On Mon, Sep 23, 2013 at 04:55:20PM +0800, Li Zefan wrote:
>>> The whole patchset has been acked and reviewed by Michal and Tejun.
>>> Could y
e
> commit:74a1166d(cgroups: make procs file writable), which was merged
> into v3.0.
>
> Cc: Ben Blum
> Cc: Tejun Heo
> Cc: Li Zefan
> Cc: # v3.0.x and later
> Signed-off-by: Daisuke Nishimura
> ---
> This patch is based on v3.6.
>
> kernel/cgroup.c |3 +--
On 2012/10/17 6:28, Tejun Heo wrote:
> cgroup core has a bug which violates a basic rule about event
> notifications - when a new entity needs to be added, you add that to
> the notification list first and then make the new entity conform to
> the current state. If done in the reverse order, an ev
δΊ 2012/10/17 16:28, Li Zefan ει:
> On 2012/10/17 6:28, Tejun Heo wrote:
>> cgroup core has a bug which violates a basic rule about event
>> notifications - when a new entity needs to be added, you add that to
>> the notification list first and then make the new entity conf
> static int mem_cgroup_force_empty_write(struct cgroup *cont, unsigned int
> event)
> @@ -5013,13 +5011,9 @@ free_out:
> static int mem_cgroup_pre_destroy(struct cgroup *cont)
> {
> struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
> - int ret;
>
> - css_get(&memcg->css);
On 2012/10/19 8:58, Tejun Heo wrote:
> Hello, again.
>
> On Thu, Oct 18, 2012 at 05:38:35PM -0700, Tejun Heo wrote:
>> Even if there isn't an actual race, the comment is dead wrong. I'm
>> reverting the following three patches. Let's try again later.
>>
>> 7e381b0eb1 ("cgroup: Drop task_lock(p
On 2012/10/17 21:30, Michal Hocko wrote:
> Now that mem_cgroup_pre_destroy callback doesn't fail finally we can
> safely move on and forbit all the callbacks to fail. The last missing
> piece is moving cgroup_call_pre_destroy after cgroup_clear_css_refs so
> that css_tryget fails so no new charges
On 2012/12/4 0:53, Tejun Heo wrote:
> Hello, Michal.
>
> On Mon, Dec 03, 2012 at 04:22:05PM +0100, Michal Hocko wrote:
>> I have glanced through the series and spotten nothing obviously wrong. I
>> do not feel I could give my r-b because I am not familiar with cpusets
>> internals enough and some
On 2012/11/13 23:30, Michal Hocko wrote:
> Hi all,
> this patch set tries to make mem_cgroup_iter saner in the way how it
> walks hierarchies. css->id based traversal is far from being ideal as it
> is not deterministic because it depends on the creation ordering.
>
> Diffstat looks promising but
On 2012/11/13 11:01, Tejun Heo wrote:
> While creating a new cgroup, cgroup_create() links the newly allocated
> cgroup into various places before trying to create its directory.
> Because cgroup life-cycle is tied to the vfs objects, this makes it
> impossible to use cgroup_rmdir() for rolling bac
n be used to implement reliable state
> inheritance. It will be explained with the descendant iterators.
>
> v2: Added a paragraph about its future use w/ descendant iterators per
> Michal.
>
> v3: Forgot to add ->post_create() invocation to cgroup_load_subsys().
> Fixe
>
> Signed-off-by: Tejun Heo
> Acked-by: Michal Hocko
> Reviewed-by: KAMEZAWA Hiroyuki
> Cc: Glauber Costa
Acked-by: Li Zefan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
children list instead of head. This isn't strictly necessary but is
> done so that the iteration order is more conventional.
>
> Signed-off-by: Tejun Heo
Acked-by: Li Zefan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a mes
2: s/config/state/ in commit message and comments per Michal. More
> documentation on synchronization rules.
>
> Signed-off-by: Tejun Heo
> Reviewed-by: KAMEZAWA Hiroyuki
> Reviewed-by: Michal Hocko
I don't see anything wrong with the comment on cgroup_next_descendant_pr
sock->sk_cgrp_prioidx won't be used at all if CONFIG_NETPRIO_CGROUP=n.
Signed-off-by: Li Zefan
---
include/net/sock.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/sock.h b/include/net/sock.h
index 93a6745..182ca99 100644
--- a/include/net/sock.h
+++ b
On 2012/11/29 5:34, Tejun Heo wrote:
> cpuset_can_attach() prepare global variables cpus_attach and
> cpuset_attach_nodemask_{to|from} which are used by cpuset_attach().
> There is no reason to prepare in cpuset_can_attach(). The same
> information can be accessed from cpuset_attach().
>
> Move t
On 2012/11/29 5:34, Tejun Heo wrote:
> Hello, guys.
>
> Depending on cgroup core locking - cgroup_mutex - is messy and makes
> cgroup prone to locking dependency problems. The current code already
> has lock dependency loop - memcg nests get_online_cpus() inside
> cgroup_mutex. cpuset the other
In a container with its own pid namespace and user namespace, rebooting
the system won't reboot the host, but terminate all the processes in
it and thus have the container shutdown, so it's safe.
Signed-off-by: Li Zefan
---
kernel/sys.c | 5 +++--
1 file changed, 3 insertions(+), 2
On 2013/1/4 1:54, Michal Hocko wrote:
> Now that we have generic and well ordered cgroup tree walkers there is
> no need to keep css_get_next in the place.
>
> Signed-off-by: Michal Hocko
> Acked-by: KAMEZAWA Hiroyuki
Acked-by: Li Zefan
> ---
> include/
On 2012/11/15 3:04, Tejun Heo wrote:
> Hello, Li.
>
> On Wed, Nov 14, 2012 at 11:20:47AM +0800, Li Zefan wrote:
>>> It also removes the need to check whether cgroup->dentry is %NULL in
>>> cgroup_path. If a cgroup is visible, its dentry is guaranteed to be
>>
flect that and update documentation. Also, drop
> clone_children() wrapper in cgroup.c. The thin wrapper is used only a
> few times and one of them will go away soon.
>
> Signed-off-by: Tejun Heo
> Cc: Glauber Costa
Acked-by: Li Zefan
--
To unsubscribe from this list: send the line "
cgroup_subsys->post_clone().
>
> Loosely based on Glauber's "generalize post_clone into post_create"
> patch.
>
> Signed-off-by: Tejun Heo
> Original-patch-by: Glauber Costa
> Original-patch: <1351686554-22592-2-git-send-email-glom...@parallels.com>
> Cc:
On 2012/11/13 11:01, Tejun Heo wrote:
> cgroup_create_dir() does weird dancing with dentry refcnt. On
> success, it gets and then puts it achieving nothing. On failure, it
> puts but there isn't no matching get anywhere leading to the following
> oops if cgroup_create_file() fails for whatever re
2-cgroup-introduce-CSS_ONLINE-flag-and-on-offline_css-.patch
> 0013-cgroup-simplify-cgroup_load_subsys-failure-path.patch
> 0014-cgroup-use-mutex_trylock-when-grabbing-i_mutex-of-a-.patch
> 0015-cgroup-update-cgroup_create-failure-path.patch
> 0016-cgroup-allow-post_create-to-fail.pa
On 2012/11/13 11:01, Tejun Heo wrote:
> struct cgroup is made RCU-safe by synchronize_rcu() in cgroup_diput().
but synchronize_rcu() is called before ss->destroy().
rcu_read_lock();
for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq)
print_cfs_rq(m, cpu, cfs_rq);
-> call cgroup_path(task_gr
s_alloc().
>
> This patch adds cgroup->id, which is a simple per-hierarchy
> ida-allocated ID which is assigned before ->css_alloc() and released
> after ->css_free().
>
> Signed-off-by: Tejun Heo
Acked-by: Li Zefan
--
To unsubscribe from this list: send the line "u
On 2013/4/17 1:10, Tejun Heo wrote:
> Hello, Li.
>
> On Tue, Apr 16, 2013 at 07:17:17PM +0800, Li Zefan wrote:
> ...
>>> hot-unplug). It currently transfers all its tasks to the nearest
>>> ancestor with executing resources, which is an irreversible process
>&
On 2013/4/17 2:27, David Howells wrote:
> Supply an accessor to get the process ID associated with some proc files and
> directories (get_proc_pid()).
>
> Signed-off-by: David Howells
> cc: Tejun Heo
> cc: Li Zefan
> cc: contain...@lists.linux-foundation.org
> cc:
same struct simple_xattrs
twice.
Cc: # 3.8.x
Reported-by: Alexey Kodanev
Signed-off-by: Li Zefan
---
This patch is based on 3.9-rcX. It conflicts a bit with
"cgroup: convert cgroupfs_root flag bits to masks and add CGRP_ prefix"
---
include/linux/cgroup.h | 3 ---
kernel/cgroup.c
ps which can be applied no matter
if the last 4 patches are acceptable or not.
Li Zefan (10):
cpuset: remove redundant check in cpuset_cpus_allowed_fallback()
cpuset: cleanup guarantee_online_{cpus|mems}()
cpuset: remove unnecessary variable in cpuset_attach()
task_cs() will never return NULL.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 866d78e..4a62dcc 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -2259,8 +2259,7 @@ void
We can just use oldcs->mems_allowed.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 6f9d5e0..66302a9 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1406,8 +1406,7 @@ sta
- We never pass a NULL @cs to these functions.
- The top cpuset always has some online cpus/mems.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 29 +++--
1 file changed, 7 insertions(+), 22 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 4a62dcc
The test is done in set_cpus_allowed_ptr(), so it's redundant.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 19 +--
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 66302a9..8b0e433 100644
--- a/kernel/cpuset.c
+++ b/k
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 8b0e433..2e4c5af 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -2013,7 +2013,9 @@ static void cpuset_propagate_hotplug_wor
won't fail */
Without this patch, the last operation will fail.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 2e4c5af..63a5343 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@
s it by saving
old mems_allowed in cpuset->old_mems_allowed.
This currently won't change any behavior, but it will later allow
us to keep tasks in empty cpusets.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 62 +
1 file cha
s in empty cpusets.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 76 -
1 file changed, 65 insertions(+), 11 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index c4f9ebd..741e652 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
To achieve this:
- We call update_tasks_cpumask/nodemask() for empty cpusets when
hotplug happens, instead of moving tasks out of them.
- When a cpuset's masks are changed by writing cpuset.cpus/mems,
we also update tasks in child cpusets which are empty.
Signed-off-by: Li Zefan
---
k
rules:
- They can be moved to another cpuset, regardless it's empty or not.
- Though it takes masks from ancestors, it takes other configs from the
empty cpuset.
- If the ancestors' masks are changed, those tasks will also be updated
to take new masks.
Signed-off-by: Li Zefan
---
On 2013/4/20 2:36, Tejun Heo wrote:
> Hello, Li.
>
> On Fri, Apr 19, 2013 at 08:27:05PM +0800, Li Zefan wrote:
>> I think this was introduced unintentionally when cpuset hotplug was
>> made asynchronous. Fortunately it does no harm, as updating tasks'
>> cpum
On 2013/4/20 4:58, Tejun Heo wrote:
> Hello,
>
> On Fri, Apr 19, 2013 at 08:29:24PM +0800, Li Zefan wrote:
>> +static void update_tasks_cpumask_hier(struct cpuset *root_cs,
>> + bool update_root, struct ptr_heap *heap)
>> +
On 2013/6/11 5:13, Greg Kroah-Hartman wrote:
> On Fri, Jun 07, 2013 at 05:00:33PM +0800, Li Zefan wrote:
>> commit 6a76f8c0ab19f215af2a3442870eeb5f0e81998d upstream.
>>
>> Currently set_ftrace_pid and set_graph_function files use seq_lseek
>> for their fops. However se
On 2013/6/13 5:03, Tejun Heo wrote:
> cgroups and css_sets are mapped M:N and this M:N mapping is
> represented by struct cg_cgroup_link which points to forms linked
> lists on both sides. The naming around this already confusing struct
> is pretty bad.
>
>>From cgroup side, it starts off ->css_s
On 2013/6/13 5:03, Tejun Heo wrote:
> There's no point in using kmalloc() and list_del() instead of the
> clearing variants for trivial stuff. We can live dangerously
> elsewhere. Use kzalloc() and list_del_init() instead and drop 0
> inits.
>
Do you mean we prefer list_del_init() than list_del
On 2013/6/13 5:03, Tejun Heo wrote:
> * __css_get() isn't used by anyone. Fold it into css_get().
>
> * Add proper function comments to all css reference functions.
>
> This patch is purely cosmetic.
>
> Signed-off-by: Tejun Heo
> ---
> include/linux/cgroup.h | 48
On 2013/6/13 10:38, Kent Overstreet wrote:
> On Thu, Jun 13, 2013 at 10:36:40AM +0800, Li Zefan wrote:
>> On 2013/6/13 5:03, Tejun Heo wrote:
>>> There's no point in using kmalloc() and list_del() instead of the
>>> clearing variants for trivial stuff. We can live
oup: clean up the cftype array for the base
> cgroup files")
> + [1] percpu/review-percpu-ref-tryget
>
> and available in the following git branch.
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
> review-css-percpu-ref
>
> diffstat follows. Thank
On 2013/6/10 0:03, Tejun Heo wrote:
> Hello, Li.
>
> On Sun, Jun 09, 2013 at 05:14:02PM +0800, Li Zefan wrote:
>> v2 -> v3:
>> Currently some cpuset behaviors are not friendly when cpuset is co-mounted
>> with other cgroup controllers.
>>
>> Now wi
= ancestor's nodemask.
so looks like no pages will be migrated.
Fix this by:
- Don't call update_tasks_nodemask() on empty cpusets.
- Pass cs->old_mems_allowed to do_migrate_pages().
v4: added comment in cpuset_hotplug_update_tasks() and rephased comment
in cpuset_attach().
Sign
b() in kmem_cgroup_css_offline(), pointed out by Michal
- revised comments as suggested by Michal
- fixed to check if kmem is activated in kmem_cgroup_css_offline()
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
Acked-by: KAMEZAWA Hiroyuki
---
mm/memcontrol.c | 70 +++
On 2013/6/14 7:00, Fengguang Wu wrote:
> Greetings,
>
> I got the below dmesg and the first bad commit is
>
> commit f284b77333b1320491f138b76f11006bbc962569
> Author: Tejun Heo
> Date: Wed Jun 12 13:50:58 2013 -0700
>
> cgroup: use percpu refcnt for cgroup_subsys_states
>
You were
>> static void memcg_kmem_mark_dead(struct mem_cgroup *memcg)
>> {
>> +/*
>> + * We need to call css_get() first, because memcg_uncharge_kmem()
>> + * will call css_put() if it sees the memcg is dead.
>> + */
>> +smb_wmb();
>> if (test_bit(KMEM_ACCOUNTED_ACTIVE, &memcg->k
-by: Michal Hocko
Signed-off-by: Li Zefan
Acked-by: KAMEZAWA Hiroyuki
---
mm/memcontrol.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 2e851f4..0bacc0d 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6332,8 +6332,6 @@ mem_cgroup_css_online
onvert memcg to use cgroup->id, and then
we can kill css_id.
Li Zefan (7):
memcg: use css_get() in sock_update_memcg()
memcg: don't use mem_cgroup_get() when creating a kmemcg cache
memcg: use css_get/put when charging/uncharging kmem
memcg: use css_get/put for swap memcg
memcg
Use css_get/css_put instead of mem_cgroup_get/put.
Note, if at the same time someone is moving @current to a different
cgroup and removing the old cgroup, css_tryget() may return false,
and sock->sk_cgrp won't be initialized, which is fine.
Signed-off-by: Li Zefan
Acked-by: KAMEZAWA
The cgroup core guarantees it's always safe to access the parent.
v2:
- added a comment in mem_cgroup_put() as suggested by Michal
- removed mem_cgroup_get(), otherwise gcc will warn that it's not used
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
Acked-by: KAMEZAWA Hiroyuk
Now memcg has the same life cycle as its corresponding cgroup.
Kill the useless refcnt.
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
Acked-by: KAMEZAWA Hiroyuki
---
mm/memcontrol.c | 18 +-
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/mm/memcontrol.c b/mm
e any
reference. This all suggests that it should be memcg_propagate_kmem that
should clean up after itself so this patch moves mem_cgroup_put over
there.
Unfortunately this is not that easy (as pointed out by Li Zefan) because
memcg_kmem_mark_dead marks the group dead (KMEM_ACCOUNTED_DEAD) if
e
situation has changed so that rmdir a cgroup will succeed regardless
css refs, but won't be freed until css refs goes down to 0.
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
Acked-by: KAMEZAWA Hiroyuki
---
mm/memcontrol.c | 26 --
1 file changed, 16 inserti
css_put.
(This changelog is mostly written by Glauber)
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
Acked-by: KAMEZAWA Hiroyuki
---
mm/memcontrol.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index a8e8d2a..466c595 100644
added wmb() in kmem_cgroup_css_offline(), pointed out by Michal
- revised comments as suggested by Michal
- fixed to check if kmem is activated in kmem_cgroup_css_offline()
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
Acked-by: KAMEZAWA Hiroyuki
Reviewed-by: Tejun Heo
---
mm/me
("memcg: free mem_cgroup by RCU to fix oops").
Cc: Hugh Dickins
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
Acked-by: KAMEZAWA Hiroyuki
---
mm/memcontrol.c | 51 +--
1 file changed, 5 insertions(+), 46 deletions(-)
diff --git a/mm/memc
Cont is short for container. control group was named process container
at first, but then people found container already has a meaning in
linux kernel.
Clean up the leftover variable name @cont.
Signed-off-by: Li Zefan
---
I'll clean up this for memcg later.
---
include/linux/cgroup.h
Cont is short for container. control group was named process container
at first, but then people found container already has a meaning in
linux kernel.
Clean up the leftover variable name @cont.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 32
1 file changed
- We never pass a NULL @cs to these functions.
- The top cpuset always has some online cpus/mems.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 29 +++--
1 file changed, 7 insertions(+), 22 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index f0c884a
We can just use oldcs->mems_allowed.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index d753837..dbef832 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1407,8 +1407,7 @@ sta
The test is done in set_cpus_allowed_ptr(), so it's redundant.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 19 +--
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index dbef832..51f8e1d 100644
--- a/kernel/cpuset.c
+++ b/k
ancestors, it takes other configs from the
empty cpuset.
- If the ancestors' masks are changed, those tasks will also be updated
to take new masks.
Li Zefan (10):
cpuset: remove redundant check in cpuset_cpus_allowed_fallback()
cpuset: cleanup guarantee_online_{cpus|mems}()
won't fail */
Without this patch, the last operation will fail.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 51f8e1d..535dce6 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@
task_cs() will never return NULL.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 64b3f79..f0c884a 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -2253,8 +2253,7 @@ void
efore calling update_task_nodemask() and
update_task_cpumask(), instead of using workqueue.
- add documentation in include/linux/cgroup.h
Signed-off-by: Li Zefan
---
include/linux/cgroup.h | 4 ++
kernel/cpuset.c| 137 +
2 files changed
= ancestor's nodemask.
so looks like no pages will be migrated.
Fix this by:
- Don't call update_tasks_nodemask() on empty cpusets.
- Pass cs->old_mems_allowed to do_migrate_pages().
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 15 +++
1 file changed, 11 insertions(+)
s it by saving
old mems_allowed in cpuset->old_mems_allowed.
This currently won't change any behavior, but it will later allow
us to keep tasks in empty cpusets.
Signed-off-by: Li Zefan
---
kernel/cpuset.c | 62 +
1 file cha
n include/linux/cgroup.h
Signed-off-by: Li Zefan
---
include/linux/cgroup.h | 3 +++
kernel/cpuset.c| 12 +---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 53e81a6..74e8b8e 100644
--- a/include/linux/cgroup.h
+++
101 - 200 of 937 matches
Mail list logo