login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
15
Re: [RFC][BUGFIX][PATCH 1/2] memcg: fix charge bypass route of migration
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: KAMEZAWA Hiroyuki
Subject:
Re: [RFC][BUGFIX][PATCH 1/2] memcg: fix charge bypass route of migration
Date: Wednesday, April 14, 2010 - 11:56 pm
On Thu, 15 Apr 2010 15:43:24 +0900 Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
quoted text
> On Thu, 15 Apr 2010 12:05:16 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote: > > I'd like to wait until next mmotm comes out. (So, [RFC]) I'll rebase > > This patch is based on > > mmotm-2010/04/05 > > + > > mm-migration-take-a-reference-to-the-anon_vma-before-migrating.patch > > mm-migration-do-not-try-to-migrate-unmapped-anonymous-pages.patch > > mm-share-the-anon_vma-ref-counts-between-ksm-and-page-migration.patch > > mm-migration-allow-the-migration-of-pageswapcache-pages.patch > > memcg-fix-prepare-migration.patch > > > > == > > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > > > > This is an additonal fix to memcg-fix-prepare-migration.patch > > > > Now, try_charge can bypass charge if TIF_MEMDIE at el are marked on the caller. > > In this case, the charge is bypassed. This makes accounts corrupted. > > (PageCgroup will be marked as PCG_USED even if bypassed, and css->refcnt > > can leak.) > > > > This patch clears passed "*memcg" in bypass route. > > > > Because usual page allocater passes memcg=NULL, this patch only affects > > some special case as > > - move account > > - migration > > - swapin. > > > > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > > --- > > mm/memcontrol.c | 7 +++++-- > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > Index: mmotm-temp/mm/memcontrol.c > > =================================================================== > > --- mmotm-temp.orig/mm/memcontrol.c > > +++ mmotm-temp/mm/memcontrol.c > > @@ -1606,8 +1606,12 @@ static int __mem_cgroup_try_charge(struc > > * MEMDIE process. > > */ > > if (unlikely(test_thread_flag(TIF_MEMDIE) > > - || fatal_signal_pending(current))) > > + || fatal_signal_pending(current))) { > > + /* Showing we skipped charge */ > > + if (memcg) > > + *memcg = NULL; > > goto bypass; > > + } > > > I'm sorry, I can't understand what this part fixes. > We set *memcg to NULL at "bypass" part already: > > 1740 bypass: > 1741 *memcg = NULL; > 1742 return 0; > > and __mem_cgroup_try_charge() is never called with @memcg == NULL, IIUC. >
I totally missed that..Sigh.
quoted text
> > /* > > * We always charge the cgroup the mm_struct belongs to. > > @@ -2523,7 +2527,6 @@ int mem_cgroup_prepare_migration(struct > > ret = __mem_cgroup_try_charge(NULL, GFP_KERNEL, ptr, false); > > css_put(&mem->css); > > } > > - *ptr = mem; > > return ret; > > } > > > I sent a patch to Andrew to fix this part yesterday :) >
Ok, ignore this patch. -Kame --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_file stat
, Daisuke Nishimura
, (Mon Apr 12, 9:42 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ...
, KAMEZAWA Hiroyuki
, (Mon Apr 12, 11:14 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ...
, Balbir Singh
, (Mon Apr 12, 11:45 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ...
, Daisuke Nishimura
, (Tue Apr 13, 5:54 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ...
, KAMEZAWA Hiroyuki
, (Tue Apr 13, 6:03 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ...
, KAMEZAWA Hiroyuki
, (Tue Apr 13, 6:40 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ...
, KAMEZAWA Hiroyuki
, (Tue Apr 13, 6:56 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ...
, KAMEZAWA Hiroyuki
, (Tue Apr 13, 8:06 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ...
, Daisuke Nishimura
, (Tue Apr 13, 10:31 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ...
, KAMEZAWA Hiroyuki
, (Tue Apr 13, 10:40 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ...
, Daisuke Nishimura
, (Wed Apr 14, 7:22 pm)
[RFC][BUGFIX][PATCH 1/2] memcg: fix charge bypass route of ...
, KAMEZAWA Hiroyuki
, (Wed Apr 14, 8:05 pm)
[RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underflow ...
, KAMEZAWA Hiroyuki
, (Wed Apr 14, 8:06 pm)
Re: [RFC][BUGFIX][PATCH 1/2] memcg: fix charge bypass rout ...
, Daisuke Nishimura
, (Wed Apr 14, 11:43 pm)
Re: [RFC][BUGFIX][PATCH 1/2] memcg: fix charge bypass rout ...
, KAMEZAWA Hiroyuki
, (Wed Apr 14, 11:56 pm)
Re: [RFC][BUGFIX][PATCH 1/2] memcg: fix charge bypass rout ...
, Andrea Arcangeli
, (Thu Apr 15, 1:17 am)
[RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underflow ...
, KAMEZAWA Hiroyuki
, (Fri Apr 16, 3:31 am)
Interleave policy on 2M pages (was Re: [RFC][BUGFIX][PATCH ...
, Christoph Lameter
, (Fri Apr 16, 9:13 am)
Re: Interleave policy on 2M pages (was Re: [RFC][BUGFIX][P ...
, Andrea Arcangeli
, (Fri Apr 16, 10:51 am)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ...
, Daisuke Nishimura
, (Sun Apr 18, 8:42 pm)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ...
, KAMEZAWA Hiroyuki
, (Sun Apr 18, 9:18 pm)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ...
, Daisuke Nishimura
, (Mon Apr 19, 1:07 am)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ...
, KAMEZAWA Hiroyuki
, (Mon Apr 19, 1:26 am)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ...
, Daisuke Nishimura
, (Mon Apr 19, 9:20 pm)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ...
, KAMEZAWA Hiroyuki
, (Mon Apr 19, 9:26 pm)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ...
, KAMEZAWA Hiroyuki
, (Tue Apr 20, 2:19 am)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ...
, Daisuke Nishimura
, (Fri Apr 23, 1:08 am)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ...
, KAMEZAWA Hiroyuki
, (Fri Apr 23, 1:23 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 01/75] platform: prefix MODALIAS with "platform:"
stephane eranian
Re: perf_counters issue with PERF_SAMPLE_GROUP
Mathieu Desnoyers
Re: Linux 2.6.25-rc2
Eric Sandeen
Re: [PATCH] xfs: do not pass unused params to xfs_flush_pages
Daniel Hazelton
Re: x86: 4kstacks default
git
:
Johannes Schindelin
[PATCH] fetch: refuse to fetch into the current branch in a non-bare repository
Junio C Hamano
Re: [PATCH] http-push: making HTTP push more robust and more user-friendly
Oliver Kullmann
Re: how to move with history?
Alex Riesen
Re: git exclude patterns for directory
Andreas Ericsson
Re: why not TortoiseGit
linux-netdev
:
Andi Kleen
Re: RFC: Nagle latency tuning
Herbert Xu
Re: Oops in tun: bisected to Limit amount of queued packets per device
gregkh
Patch "IPv6: keep route for tentative address" has been added to the 2.6.34-stable...
Patrick McHardy
Re: [rfc 02/13] [RFC 02/13] netfilter: nf_conntrack_sip: Add callid parser
Krzysztof Oledzki
Re: Error: an inet prefix is expected rather than "0/0".
git-commits-head
:
Linux Kernel Mailing List
sh: Fix compile error by operands(mov.l) in sh3/entry.S
Linux Kernel Mailing List
New device ID for sc92031 [1088:2031]
Linux Kernel Mailing List
tmpfs: depend on shmem
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
Staging: et131x: prune all the debug code
openbsd-misc
:
Andres Salazar
About priorities in /etc/resolv.conf
Tonnerre LOMBARD
Re: bge0: watchdog timeout
ropers
Re: Real men don't attack straw men
Damien Miller
Re: Patching a SSH 'Weakness'
Tony Abernethy
Re: The Atheros story in much fewer words
Colocation donated by:
Syndicate