All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <4F9A343F.7020409@jp.fujitsu.com>

diff --git a/a/1.txt b/N1/1.txt
index 507cc2a..8b13789 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,104 +1 @@
-From bb0168d5c85f62f36434956e4728a67d0cc41e55 Mon Sep 17 00:00:00 2001
-From: KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
-Date: Thu, 26 Apr 2012 18:48:07 +0900
-Subject: [PATCH 3/9] memcg: add res_counter_uncharge_until()
 
-At killing res_counter which is a child of other counter,
-we need to do
-	res_counter_uncharge(child, xxx)
-	res_counter_charge(parent, xxx)
-
-This is not atomic and wasting cpu. This patch adds
-res_counter_uncharge_until(). This function's uncharge propagates
-to ancestors until specified res_counter.
-
-	res_counter_uncharge_until(child, parent, xxx)
-
-This ops is atomic and more efficient.
-
-Originaly-written-by: Frederic Weisbecker <fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
-Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
----
- Documentation/cgroups/resource_counter.txt |    8 ++++++++
- include/linux/res_counter.h                |    3 +++
- kernel/res_counter.c                       |   13 +++++++++++--
- 3 files changed, 22 insertions(+), 2 deletions(-)
-
-diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt
-index 95b24d7..703103a 100644
---- a/Documentation/cgroups/resource_counter.txt
-+++ b/Documentation/cgroups/resource_counter.txt
-@@ -92,6 +92,14 @@ to work with it.
- 
- 	The _locked routines imply that the res_counter->lock is taken.
- 
-+ f. void res_counter_uncharge_until
-+		(struct res_counter *rc, struct res_counter *top,
-+		 unsinged long val)
-+
-+	Almost same as res_cunter_uncharge() but propagation of uncharge
-+	stops when rc == top. This is useful when kill a res_coutner in
-+	child cgroup.
-+
-  2.1 Other accounting routines
- 
-     There are more routines that may help you with common needs, like
-diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h
-index da81af0..d11c1cd 100644
---- a/include/linux/res_counter.h
-+++ b/include/linux/res_counter.h
-@@ -135,6 +135,9 @@ int __must_check res_counter_charge_nofail(struct res_counter *counter,
- void res_counter_uncharge_locked(struct res_counter *counter, unsigned long val);
- void res_counter_uncharge(struct res_counter *counter, unsigned long val);
- 
-+void res_counter_uncharge_until(struct res_counter *counter,
-+				struct res_counter *top,
-+				unsigned long val);
- /**
-  * res_counter_margin - calculate chargeable space of a counter
-  * @cnt: the counter
-diff --git a/kernel/res_counter.c b/kernel/res_counter.c
-index d508363..f4ec411 100644
---- a/kernel/res_counter.c
-+++ b/kernel/res_counter.c
-@@ -66,6 +66,8 @@ done:
- 	return ret;
- }
- 
-+
-+
- int res_counter_charge_nofail(struct res_counter *counter, unsigned long val,
- 			      struct res_counter **limit_fail_at)
- {
-@@ -99,13 +101,15 @@ void res_counter_uncharge_locked(struct res_counter *counter, unsigned long val)
- 	counter->usage -= val;
- }
- 
--void res_counter_uncharge(struct res_counter *counter, unsigned long val)
-+void res_counter_uncharge_until(struct res_counter *counter,
-+				struct res_counter *top,
-+				unsigned long val)
- {
- 	unsigned long flags;
- 	struct res_counter *c;
- 
- 	local_irq_save(flags);
--	for (c = counter; c != NULL; c = c->parent) {
-+	for (c = counter; c != top; c = c->parent) {
- 		spin_lock(&c->lock);
- 		res_counter_uncharge_locked(c, val);
- 		spin_unlock(&c->lock);
-@@ -113,6 +117,11 @@ void res_counter_uncharge(struct res_counter *counter, unsigned long val)
- 	local_irq_restore(flags);
- }
- 
-+void res_counter_uncharge(struct res_counter *counter, unsigned long val)
-+{
-+	res_counter_uncharge_until(counter, NULL, val);
-+}
-+
- 
- static inline unsigned long long *
- res_counter_member(struct res_counter *counter, int member)
--- 
-1.7.4.1
diff --git a/a/content_digest b/N1/content_digest
index 99d0bb4..b68f077 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,125 +1,20 @@
  "ref\04F9A327A.6050409@jp.fujitsu.com\0"
- "ref\04F9A327A.6050409-+CUm20s59erQFUHtdCDX3A@public.gmane.org\0"
- "From\0KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>\0"
+ "From\0KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\0"
  "Subject\0[RFC][PATCH 3/7 v2] res_counter: add res_counter_uncharge_until()\0"
  "Date\0Fri, 27 Apr 2012 14:53:03 +0900\0"
- "To\0Linux Kernel <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>\0"
- "Cc\0linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org <linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>"
-  cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
-  Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
-  Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
-  Frederic Weisbecker <fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
-  Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
-  Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
-  Han Ying <yinghan-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
-  Aneesh Kumar K.V <aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
-  Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
- " kamezawa.hiroyuki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org\0"
+ "To\0Linux Kernel <linux-kernel@vger.kernel.org>\0"
+ "Cc\0linux-mm@kvack.org <linux-mm@kvack.org>"
+  cgroups@vger.kernel.org <cgroups@vger.kernel.org>
+  Michal Hocko <mhocko@suse.cz>
+  Johannes Weiner <hannes@cmpxchg.org>
+  Frederic Weisbecker <fweisbec@gmail.com>
+  Glauber Costa <glommer@parallels.com>
+  Tejun Heo <tj@kernel.org>
+  Han Ying <yinghan@google.com>
+  Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
+  Andrew Morton <akpm@linux-foundation.org>
+ " kamezawa.hiroyuki@gmail.com\0"
  "\00:1\0"
  "b\0"
- "From bb0168d5c85f62f36434956e4728a67d0cc41e55 Mon Sep 17 00:00:00 2001\n"
- "From: KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>\n"
- "Date: Thu, 26 Apr 2012 18:48:07 +0900\n"
- "Subject: [PATCH 3/9] memcg: add res_counter_uncharge_until()\n"
- "\n"
- "At killing res_counter which is a child of other counter,\n"
- "we need to do\n"
- "\tres_counter_uncharge(child, xxx)\n"
- "\tres_counter_charge(parent, xxx)\n"
- "\n"
- "This is not atomic and wasting cpu. This patch adds\n"
- "res_counter_uncharge_until(). This function's uncharge propagates\n"
- "to ancestors until specified res_counter.\n"
- "\n"
- "\tres_counter_uncharge_until(child, parent, xxx)\n"
- "\n"
- "This ops is atomic and more efficient.\n"
- "\n"
- "Originaly-written-by: Frederic Weisbecker <fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>\n"
- "Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>\n"
- "---\n"
- " Documentation/cgroups/resource_counter.txt |    8 ++++++++\n"
- " include/linux/res_counter.h                |    3 +++\n"
- " kernel/res_counter.c                       |   13 +++++++++++--\n"
- " 3 files changed, 22 insertions(+), 2 deletions(-)\n"
- "\n"
- "diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt\n"
- "index 95b24d7..703103a 100644\n"
- "--- a/Documentation/cgroups/resource_counter.txt\n"
- "+++ b/Documentation/cgroups/resource_counter.txt\n"
- "@@ -92,6 +92,14 @@ to work with it.\n"
- " \n"
- " \tThe _locked routines imply that the res_counter->lock is taken.\n"
- " \n"
- "+ f. void res_counter_uncharge_until\n"
- "+\t\t(struct res_counter *rc, struct res_counter *top,\n"
- "+\t\t unsinged long val)\n"
- "+\n"
- "+\tAlmost same as res_cunter_uncharge() but propagation of uncharge\n"
- "+\tstops when rc == top. This is useful when kill a res_coutner in\n"
- "+\tchild cgroup.\n"
- "+\n"
- "  2.1 Other accounting routines\n"
- " \n"
- "     There are more routines that may help you with common needs, like\n"
- "diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h\n"
- "index da81af0..d11c1cd 100644\n"
- "--- a/include/linux/res_counter.h\n"
- "+++ b/include/linux/res_counter.h\n"
- "@@ -135,6 +135,9 @@ int __must_check res_counter_charge_nofail(struct res_counter *counter,\n"
- " void res_counter_uncharge_locked(struct res_counter *counter, unsigned long val);\n"
- " void res_counter_uncharge(struct res_counter *counter, unsigned long val);\n"
- " \n"
- "+void res_counter_uncharge_until(struct res_counter *counter,\n"
- "+\t\t\t\tstruct res_counter *top,\n"
- "+\t\t\t\tunsigned long val);\n"
- " /**\n"
- "  * res_counter_margin - calculate chargeable space of a counter\n"
- "  * @cnt: the counter\n"
- "diff --git a/kernel/res_counter.c b/kernel/res_counter.c\n"
- "index d508363..f4ec411 100644\n"
- "--- a/kernel/res_counter.c\n"
- "+++ b/kernel/res_counter.c\n"
- "@@ -66,6 +66,8 @@ done:\n"
- " \treturn ret;\n"
- " }\n"
- " \n"
- "+\n"
- "+\n"
- " int res_counter_charge_nofail(struct res_counter *counter, unsigned long val,\n"
- " \t\t\t      struct res_counter **limit_fail_at)\n"
- " {\n"
- "@@ -99,13 +101,15 @@ void res_counter_uncharge_locked(struct res_counter *counter, unsigned long val)\n"
- " \tcounter->usage -= val;\n"
- " }\n"
- " \n"
- "-void res_counter_uncharge(struct res_counter *counter, unsigned long val)\n"
- "+void res_counter_uncharge_until(struct res_counter *counter,\n"
- "+\t\t\t\tstruct res_counter *top,\n"
- "+\t\t\t\tunsigned long val)\n"
- " {\n"
- " \tunsigned long flags;\n"
- " \tstruct res_counter *c;\n"
- " \n"
- " \tlocal_irq_save(flags);\n"
- "-\tfor (c = counter; c != NULL; c = c->parent) {\n"
- "+\tfor (c = counter; c != top; c = c->parent) {\n"
- " \t\tspin_lock(&c->lock);\n"
- " \t\tres_counter_uncharge_locked(c, val);\n"
- " \t\tspin_unlock(&c->lock);\n"
- "@@ -113,6 +117,11 @@ void res_counter_uncharge(struct res_counter *counter, unsigned long val)\n"
- " \tlocal_irq_restore(flags);\n"
- " }\n"
- " \n"
- "+void res_counter_uncharge(struct res_counter *counter, unsigned long val)\n"
- "+{\n"
- "+\tres_counter_uncharge_until(counter, NULL, val);\n"
- "+}\n"
- "+\n"
- " \n"
- " static inline unsigned long long *\n"
- " res_counter_member(struct res_counter *counter, int member)\n"
- "-- \n"
- 1.7.4.1
 
-4859b461fa8e51fe2f911038d7019189f60ff66e5a61b187c088b5672b9304b1
+34c897a836d78398db36ef2b12e8b77c344e8192fbbf11ed5dc8e96cb9119607

diff --git a/a/1.txt b/N2/1.txt
index 507cc2a..802c62d 100644
--- a/a/1.txt
+++ b/N2/1.txt
@@ -1,5 +1,5 @@
-From bb0168d5c85f62f36434956e4728a67d0cc41e55 Mon Sep 17 00:00:00 2001
-From: KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
+>From bb0168d5c85f62f36434956e4728a67d0cc41e55 Mon Sep 17 00:00:00 2001
+From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
 Date: Thu, 26 Apr 2012 18:48:07 +0900
 Subject: [PATCH 3/9] memcg: add res_counter_uncharge_until()
 
@@ -16,8 +16,8 @@ to ancestors until specified res_counter.
 
 This ops is atomic and more efficient.
 
-Originaly-written-by: Frederic Weisbecker <fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
-Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
+Originaly-written-by: Frederic Weisbecker <fweisbec@gmail.com>
+Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
 ---
  Documentation/cgroups/resource_counter.txt |    8 ++++++++
  include/linux/res_counter.h                |    3 +++
diff --git a/a/content_digest b/N2/content_digest
index 99d0bb4..80a816e 100644
--- a/a/content_digest
+++ b/N2/content_digest
@@ -1,24 +1,23 @@
  "ref\04F9A327A.6050409@jp.fujitsu.com\0"
- "ref\04F9A327A.6050409-+CUm20s59erQFUHtdCDX3A@public.gmane.org\0"
- "From\0KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>\0"
+ "From\0KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\0"
  "Subject\0[RFC][PATCH 3/7 v2] res_counter: add res_counter_uncharge_until()\0"
  "Date\0Fri, 27 Apr 2012 14:53:03 +0900\0"
- "To\0Linux Kernel <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>\0"
- "Cc\0linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org <linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>"
-  cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
-  Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
-  Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
-  Frederic Weisbecker <fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
-  Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
-  Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
-  Han Ying <yinghan-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
-  Aneesh Kumar K.V <aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
-  Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
- " kamezawa.hiroyuki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org\0"
+ "To\0Linux Kernel <linux-kernel@vger.kernel.org>\0"
+ "Cc\0linux-mm@kvack.org <linux-mm@kvack.org>"
+  cgroups@vger.kernel.org <cgroups@vger.kernel.org>
+  Michal Hocko <mhocko@suse.cz>
+  Johannes Weiner <hannes@cmpxchg.org>
+  Frederic Weisbecker <fweisbec@gmail.com>
+  Glauber Costa <glommer@parallels.com>
+  Tejun Heo <tj@kernel.org>
+  Han Ying <yinghan@google.com>
+  Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
+  Andrew Morton <akpm@linux-foundation.org>
+ " kamezawa.hiroyuki@gmail.com\0"
  "\00:1\0"
  "b\0"
- "From bb0168d5c85f62f36434956e4728a67d0cc41e55 Mon Sep 17 00:00:00 2001\n"
- "From: KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>\n"
+ ">From bb0168d5c85f62f36434956e4728a67d0cc41e55 Mon Sep 17 00:00:00 2001\n"
+ "From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\n"
  "Date: Thu, 26 Apr 2012 18:48:07 +0900\n"
  "Subject: [PATCH 3/9] memcg: add res_counter_uncharge_until()\n"
  "\n"
@@ -35,8 +34,8 @@
  "\n"
  "This ops is atomic and more efficient.\n"
  "\n"
- "Originaly-written-by: Frederic Weisbecker <fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>\n"
- "Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>\n"
+ "Originaly-written-by: Frederic Weisbecker <fweisbec@gmail.com>\n"
+ "Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\n"
  "---\n"
  " Documentation/cgroups/resource_counter.txt |    8 ++++++++\n"
  " include/linux/res_counter.h                |    3 +++\n"
@@ -122,4 +121,4 @@
  "-- \n"
  1.7.4.1
 
-4859b461fa8e51fe2f911038d7019189f60ff66e5a61b187c088b5672b9304b1
+11f02ef51cc54bce816e067b40b0b4b64cce9445937ed2beb02125c5745e523d

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.