From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kosaki.motohiro@jp.fujitsu.com,
LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Nishimura Daisuke <d-nishimura@mtf.biglobe.ne.jp>
Subject: Re: (resend) [PATCH] vmscan,memcg: memcg aware swap token
Date: Wed, 27 Apr 2011 10:19:41 +0900 (JST) [thread overview]
Message-ID: <20110427102126.D174.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20110426130724.f2ae18e3.akpm@linux-foundation.org>
> On Tue, 26 Apr 2011 16:59:19 +0900 (JST)
> KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
>
> > @@ -75,3 +76,19 @@ void __put_swap_token(struct mm_struct *mm)
> > swap_token_mm = NULL;
> > spin_unlock(&swap_token_lock);
> > }
> > +
> > +int has_swap_token_memcg(struct mm_struct *mm, struct mem_cgroup *memcg)
> > +{
> > + if (memcg) {
> > + struct mem_cgroup *swap_token_memcg;
> > +
> > + /*
> > + * memcgroup reclaim can disable swap token only if token task
> > + * is in the same cgroup.
> > + */
> > + swap_token_memcg = try_get_mem_cgroup_from_mm(swap_token_mm);
> > + return ((mm == swap_token_mm) && (memcg == swap_token_memcg));
> > + } else
> > + return (mm == swap_token_mm);
> > +}
>
> Seems to be missing a css_put()?
Yes! Please drop this one. I'll rework it at this weekend.
Thank you for the finding!
>
> Either I'm mistaken or that's a bug. Perhaps neither of these would
> have happened if we'd bothered to document
> try_get_mem_cgroup_from_mm().
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2011-04-27 1:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 7:59 KOSAKI Motohiro
2011-04-26 8:50 ` KAMEZAWA Hiroyuki
2011-04-26 20:07 ` Andrew Morton
2011-04-27 1:19 ` KOSAKI Motohiro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110427102126.D174.A69D9226@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=d-nishimura@mtf.biglobe.ne.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox