cn_queue_free_callback() will touch 'dev'(i.e. cbq-pdev),
so it should be called before atomic_dec(dev-refcnt).
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
drivers/connector/cn_queue.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/connector/cn_queue.c b
When checking multiple files, the report buffer is not cleared
after processing a file, thus the report will be printed again
and again, mixing up with other reports.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
scripts/checkpatch.pl |6 +++---
1 files changed, 3 insertions(+), 3
Macro efi_md_size is defined in efi.c, and here we apply it
throughout efi.c.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
arch/ia64/kernel/efi.c | 10 +-
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 0e4ef20
;
int i;
};
but will fail if:
struct foo {
int i;
struct list_head list;
}
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
drivers/hid/usbhid/hid-tmff.c |7 ---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git
);
+spin_lock_irqsave(rtc_lock, flags);
I think it's a good idea to update or just remove the comment above.
David P. Reed has sent a patch to fix this bug before you.
http://lkml.org/lkml/2007/11/14/435
Li Zefan
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body
Frans Pop wrote:
Li Zefan wrote:
Add a missing '.' in prink information.
-printk( no tick device\n);
+printk( no tick device.\n);
I wonder if that is correct. CodingStyle says:
Chapter 13: Printing kernel messages
[...]
Kernel
-/* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, the we can
+/* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, then we can
divide
Yes, I missed it.
- * which, buy the way, it can do, but it take more code and at least 2
+ * which, buy the way, it can do,
Andrew Morton wrote:
On Thu, 29 Nov 2007 11:20:18 +0100 Frans Pop [EMAIL PROTECTED] wrote:
Well, for one it needlessly increases the size of log files.
It also IMO just looks weird to have a trailing period only for some
messages and it certainly is completely inappropriate for messages
Joe Perches wrote:
On Fri, 2007-11-30 at 09:12 +0800, Li Zefan wrote:
Just a roughly grep:
# grep -r -P --include=*.[ch] 'printk.*\.\\n' * | wc -l
6025
# grep -r -P --include=*.[ch] '\.\\n' * | wc -l
12723
Inequivalent.
Try:
grep -rP --include=*.[ch] 'printk.*\.\\n' * | wc -l
Tejun Heo wrote:
WANG Cong wrote:
I think, you forgot to free(3) the memory you calloc(3)'ed and
malloc(3)'ed above.
It's a simple program where whole body is in main(). Why bother?
What's the benefit of adding hash-table iterating free logic?
Personally, I think memory leaks are bugs. And
The casting is safe only when the list_head member is the
first member of the structure.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
arch/ppc/syslib/ocp.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c
index 3f5be2c
The casting is safe only when the list_head member is the
first member of the structure.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
drivers/char/drm/i915_irq.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c
Don't cast struct foo * to struct list_head *, it's safe only when
the list member is the first member of struct foo.
Also don't cast struct list_head * to struct foo *.
BTW: I'm not so sure where this patch should go to.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
drivers/net/wireless
Nick Piggin 写道:
On Thursday 06 December 2007 20:33, Li Zefan wrote:
The casting is safe only when the list_head member is the
first member of the structure.
Even so, I don't think too safe :) It might technically work,
but it could break more easily.
So even if you find places where
WANG Cong wrote:
On Mon, Nov 19, 2007 at 09:10:44PM -0800, H. Peter Anvin wrote:
WANG Cong wrote:
On Tue, Nov 20, 2007 at 10:13:42AM +0800, zhengyi wrote:
Is there any relevance to the kernel ?
I found the folowing code here:
http://linux.solidot.org/article.pl?sid=07/11/19/0512218from=rss
Those patches do some small fixes and code cleanups.
No actual bug is fixed though.
Li Zefan
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read
Flag CLOCK_SOURCE_WATCHDOG is cleared twice. Note clocksource_change_rating()
won't do anyting with the cs flag.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
kernel/time/clocksource.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/kernel/time/clocksource.c b/kernel
list_for_each_safe() suffices here.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
kernel/time/clockevents.c | 11 ---
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 822beeb..68fbe73 100644
--- a/kernel/time
Fix typo in comments.
BTW: I have to fix coding style in arch/ia64/kernel/time.c also,
otherwise checkpatch.pl will be complaining.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
arch/ia64/kernel/time.c | 14 +++---
arch/x86/kernel/time_64.c |2 +-
include/linux/hrtimer.h
Function do_timer_interrupt_hook() don't take argument regs,
and structure hrtimer_sleeper don't have member cb_pending.
So delete comments refering to these symbols.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
include/asm-x86/mach-voyager/do_timer.h |1 -
include/linux/hrtimer.h
Add a missing '.' in prink information.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
kernel/time/tick-oneshot.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c
index 0258d31..0b5e513 100644
--- a/kernel/time
Function timekeeping_is_continuous() no longer checks flag
CLOCK_IS_CONTINUOUS, and it checks CLOCK_SOURCE_VALID_FOR_HRES
now. So rename the function accordingly.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
include/linux/time.h |2 +-
kernel/time/tick-sched.c |2 +-
kernel/time
When checking multiple files, the report buffer is not cleared
after processing a file, thus the report will be printed again
and again, mixing up with other reports.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
scripts/checkpatch.pl |6 +++---
1 files changed, 3 insertions(+), 3
Each entry in the list has a unique id, so just break out of the
loop if the matched id is found.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
drivers/connector/connector.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/connector/connector.c b/drivers
,
instead skb_free() is called.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
drivers/connector/connector.c | 30 --
1 files changed, 4 insertions(+), 26 deletions(-)
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 6e70963..865303b
Error code should be set to EINVAL instead of ENODEV if !queue_work().
There's another call of queue_work() which may set err to EINVAL.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
drivers/connector/connector.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers
Set ret to -ENOMEM when kobject_create_and_add() returns NULL.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
drivers/infiniband/core/sysfs.c |4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index
Roland Dreier wrote:
Wow, good catch. How did you find this bug?
Just by accident, when I glanced down the code. ;)
Anyway, thanks, applied.
- R.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info
...@andrew.cmu.edu
Cc: Tejun Heo t...@kernel.org
Cc: Li Zefan lize...@huawei.com
Cc: sta...@vger.kernel.org # v3.0.x and later
Signed-off-by: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp
---
This patch is based on v3.6.
kernel/cgroup.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff
: Johannes Weiner han...@cmpxchg.org
Cc: Balbir Singh bsinghar...@gmail.com
Cc: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com
Acked-by: Li Zefan lize...@huawei.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More
() removal dropped per Michal. Commit
message updated to explain local_irq_disable/enable() conversion.
Signed-off-by: Tejun Heo t...@kernel.org
Reviewed-by: Michal Hocko mho...@suse.cz
Acked-by: Li Zefan lize...@huawei.com
--
To unsubscribe from this list: send the line unsubscribe linux
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 t...@kernel.org
Reviewed-by: Michal Hocko mho...@suse.cz
Acked-by: Li Zefan lize...@huawei.com
--
To unsubscribe from this list: send the line
...@parallels.com
Acked-by: Li Zefan lize...@huawei.com
--
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/
...@jp.fujitsu.com
---
include/linux/cgroup.h | 21 -
kernel/cgroup.c| 51
--
mm/memcontrol.c| 24 +---
3 files changed, 1 insertion(+), 95 deletions(-)
Acked-by: Li Zefan lize
kamezawa.hir...@jp.fujitsu.com
Cc: Vivek Goyal vgo...@redhat.com
Acked-by: Li Zefan lize...@huawei.com
--
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
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(parent) on
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 for
: Glauber Costa glom...@parallels.com
Li Zefan lize...@huawei.com
--
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
: Glauber Costa glom...@parallels.com
Acked-by: Li Zefan lize...@huawei.com
--
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
. This isn't strictly necessary but is
done so that the iteration order is more conventional.
Signed-off-by: Tejun Heo t...@kernel.org
Acked-by: Li Zefan lize...@huawei.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord
on synchronization rules.
Signed-off-by: Tejun Heo t...@kernel.org
Reviewed-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujisu.com
Reviewed-by: Michal Hocko mho...@suse.cz
I don't see anything wrong with the comment on cgroup_next_descendant_pre().
Acked-by: Li Zefan lize...@huawei.com
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 it is
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 back
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 event
于 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 conform to
the current state
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);
- ret
static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp)
{
struct cgroup_netprio_state *cs;
- int ret;
+ int ret = -EINVAL;
cs = kzalloc(sizeof(*cs), GFP_KERNEL);
if (!cs)
return ERR_PTR(-ENOMEM);
- if (cgrp-parent cgrp_netprio_state(cgrp-parent)-prioidx)
on 2012/7/19 10:55, Aneesh Kumar K.V wrote:
Andrew Morton a...@linux-foundation.org writes:
On Wed, 18 Jul 2012 11:04:09 +0530
Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com wrote:
From: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com
Since we cannot fail in
{
+ .name = cgroup.sane_behavior,
+ .flags = CFTYPE_ONLY_ON_ROOT,
+ .read_seq_string = cgroup_sane_behavior_show,
+ .mode = S_IRUGO,
+ },
We don't have to set .mode explicitly.
--
To unsubscribe from this list: send the line
-by: Li Zefan lize...@huawei.com
--
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/
+int task_cgroup_path_from_hierarchy(struct task_struct *task, int
hierarchy_id,
+ char *buf, size_t buflen)
+{
+ struct cgroupfs_root *root;
+ struct cgroup *cgrp = NULL;
+ int ret = -ENOENT;
+
+ mutex_lock(cgroup_mutex);
+
+ root =
-task_cgroup_path_from_hierarchy.patch
0001-0002 prepare for conversion to idr, which 0003 does.
0004 implements the new function.
Acked-by: Li Zefan lize...@huawei.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More
On 2013/4/15 11:46, Tejun Heo wrote:
On Mon, Apr 15, 2013 at 11:43:15AM +0800, Li Zefan wrote:
+int task_cgroup_path_from_hierarchy(struct task_struct *task, int
hierarchy_id,
+ char *buf, size_t buflen)
+{
+ struct cgroupfs_root *root;
+ struct cgroup
It's not used, and it can be retrieved via cgrp-root-top_cgroup.
Signed-off-by: Li Zefan lize...@huawei.com
---
include/linux/cgroup.h | 1 -
kernel/cgroup.c| 2 --
2 files changed, 3 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 9c300ad..64047ae 100644
On 2013/4/6 9:21, Tejun Heo wrote:
Hello, guys.
Status-quo
==
It's been about a year since I wrote up a summary on cgroup status quo
and future plans. We're not there yet but much closer than we were
before. At least the locking and object life-time management aren't
crazy
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
which would affect all other co-mounted
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 dhowe...@redhat.com
cc: Tejun Heo t...@kernel.org
cc: Li Zefan lize...@huawei.com
cc: contain...@lists.linux
the same struct simple_xattrs
twice.
Cc: sta...@vger.kernel.org # 3.8.x
Reported-by: Alexey Kodanev alexey.koda...@oracle.com
Signed-off-by: Li Zefan lize...@huawei.com
---
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
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()
cpuset: remove
task_cs() will never return NULL.
Signed-off-by: Li Zefan lize...@huawei.com
---
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
We can just use oldcs-mems_allowed.
Signed-off-by: Li Zefan lize...@huawei.com
---
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
- We never pass a NULL @cs to these functions.
- The top cpuset always has some online cpus/mems.
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cpuset.c | 29 +++--
1 file changed, 7 insertions(+), 22 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
The test is done in set_cpus_allowed_ptr(), so it's redundant.
Signed-off-by: Li Zefan lize...@huawei.com
---
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
-by: Li Zefan lize...@huawei.com
---
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
*/
Without this patch, the last operation will fail.
Signed-off-by: Li Zefan lize...@huawei.com
---
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
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 lize...@huawei.com
---
kernel/cpuset.c | 62 +
1 file changed, 36
cpusets.
Signed-off-by: Li Zefan lize...@huawei.com
---
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
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 lize
:
- 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 lize...@huawei.com
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'
cpumask will just return failure and there's
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)
+{
+struct cpuset *cp;
+struct cgroup
You are putting references but I do not see any single css_{try}get
here. /me puzzled.
There are two things being done in this code:
First, we acquired a css_ref to make sure that the underlying cgroup
would not go away. That is a short lived reference, and it is put as
soon as the cache
-cgroup_lock_is_held.patch
Acked-by: Li Zefan lize...@huawei.com
--
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/
On 2013/4/4 20:00, Michal Hocko wrote:
On Wed 03-04-13 17:11:15, Li Zefan wrote:
(I'll be off from my office soon, and I won't be responsive in the following
3 days.)
I'm working on converting memcg to use cgroup-id, and then we can kill
css_id.
Now memcg has its own refcnt, so when
that patch needs update (and can be simplified) after this patchset:
- move memcg_dangling_add() to mem_cgroup_css_offline()
- remove memcg-memcg_name, and use cgroup_path() in mem_cgroup_dangling_read()?
On 2013/4/3 17:11, Li Zefan wrote:
(I'll be off from my office soon, and I won't be responsive
patch 13/12 is for the dangling memcg debugging patch.
You'll see 2 small conflicts when you apply that debugging patch on top
of this patchset. Just move memcg_dangling_add() to mem_cgroup_css_offline()
and move memcg_dangling_free() to mem_cggroup_css_free().
Li Zefan (10):
memcg: take
The memcg is not referenced, so it can be destroyed at anytime right
after we exit rcu read section, so it's not safe to access it.
To fix this, we call css_tryget() to get a reference while we're still
in rcu read section.
Signed-off-by: Li Zefan lize...@huawei.com
Acked-by: Glauber Costa glom
This might cause use-after-free bug.
Signed-off-by: Li Zefan lize...@huawei.com
Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com
Acked-by: Michal Hocko mho...@suse.cz
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm
-off-by: Li Zefan lize...@huawei.com
Signed-off-by: Michal Hocko mho...@suse.cz
---
mm/memcontrol.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 2364f4e..44cec72 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6250,8 +6250,6
) but it doesn't take 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
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 lize...@huawei.com
Acked
css_put.
(This changelog is basically written by Glauber)
Signed-off-by: Li Zefan lize...@huawei.com
Acked-by: Michal Hocko mho...@suse.cz
---
mm/memcontrol.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index bbf5bf3..c308ea0
if kmem is activated in kmem_cgroup_css_offline()
Signed-off-by: Li Zefan lize...@huawei.com
---
mm/memcontrol.c | 66 +++--
1 file changed, 41 insertions(+), 25 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c308ea0..7be796c
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 lize...@huawei.com
Acked-by: Michal Hocko mho...@suse.cz
Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com
---
mm/memcontrol.c | 26
.
Signed-off-by: Li Zefan lize...@huawei.com
Reviewed-by: Michal Hocko mho...@suse.cz
Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com
---
kernel/cgroup.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 06aeb42..7ee3bdf 100644
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 lize...@huawei.com
Acked-by: Michal Hocko mho...@suse.cz
Acked
Now memcg has the same life cycle as its corresponding cgroup.
Kill the useless refcnt.
Signed-off-by: Li Zefan lize...@huawei.com
Acked-by: Michal Hocko mho...@suse.cz
Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com
---
mm/memcontrol.c | 18 +-
1 file changed, 1
Now memcg has the same life cycle as its corresponding cgroup,
we don't have to save the cgroup path name in memcg-memcg_name.
Signed-off-by: Li Zefan lize...@huawei.com
---
mm/memcontrol.c | 65 +
1 file changed, 24 insertions(+), 41
: free mem_cgroup by RCU to fix oops).
Cc: Hugh Dickins hu...@google.com
Signed-off-by: Li Zefan lize...@huawei.com
---
mm/memcontrol.c | 51 +--
1 file changed, 5 insertions(+), 46 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index
(This patchset depends on memcg: make memcg's life cycle the same as cgroup)
This patchset converts memcg to always use cgroup-id, and then kills
css_id.
As we've removed memcg's own refcnt, converting memcg to use cgroup-id
is very straight-forward.
Li Zefan (8):
cgroup: implement
This will be used as a replacement for css_is_ancestor().
Signed-off-by: Li Zefan lize...@huawei.com
---
include/linux/cgroup.h | 3 +++
kernel/cgroup.c| 21 +
2 files changed, 24 insertions(+)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index
This is a preparation to kill css_id.
Signed-off-by: Li Zefan lize...@huawei.com
---
mm/memcontrol.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 14f1375..3561d0b 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2769,15
This is a preparation to kill css_id.
Signed-off-by: Li Zefan lize...@huawei.com
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5aa6e91..14f1375 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1383,7 +1383,7
This is a preparation to kill css_id.
Signed-off-by: Li Zefan lize...@huawei.com
---
mm/memcontrol.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 3561d0b..c4e0173 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
This will be used as a replacement for css_lookup().
Signed-off-by: Li Zefan lize...@huawei.com
---
include/linux/cgroup.h | 1 +
kernel/cgroup.c| 31 +--
2 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux
memcg requires the cgroup id to be smaller than 65536.
Signed-off-by: Li Zefan lize...@huawei.com
---
mm/memcontrol.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c4e0173..947dff1 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -492,6
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 lize...@huawei.com
---
mm/memcontrol.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
The only user of css_id was memcg, and it has been converted to
use cgroup-id, so kill css_id.
Signed-off-by: Li Zefan lize...@huawei.com
---
include/linux/cgroup.h | 38
kernel/cgroup.c| 258 -
2 files changed, 296 deletions
On 2013/4/8 22:25, Michal Hocko wrote:
On Mon 08-04-13 14:36:52, Li Zefan wrote:
[...]
@@ -5188,12 +5154,28 @@ static int mem_cgroup_dangling_read(struct cgroup
*cont, struct cftype *cft,
struct seq_file *m)
{
struct mem_cgroup *memcg;
+char
Hi Ingo,
Any chance for this patchset and the other one to be queued for 3.10?
Both of them has been acked by Peter.
On 2013/3/29 18:36, Peter Zijlstra wrote:
On Fri, 2013-03-29 at 14:43 +0800, Li Zefan wrote:
cpuacct is the only user of cgroup_subsys.active flag.
The flag is needed because
1 - 100 of 1870 matches
Mail list logo