From: Andrew Morton <akpm@linux-foundation.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.cz>, Hugh Dickins <hughd@google.com>,
Ying Han <yinghan@google.com>
Subject: Re: [PATCH 1/4] memcg: simplify page cache charging.
Date: Tue, 20 Dec 2011 13:58:17 -0800 [thread overview]
Message-ID: <20111220135817.5ba7ab05.akpm@linux-foundation.org> (raw)
In-Reply-To: <20111219090122.66024659.kamezawa.hiroyu@jp.fujitsu.com>
On Mon, 19 Dec 2011 09:01:22 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Fri, 16 Dec 2011 14:28:14 -0800
> Andrew Morton <akpm@linux-foundation.org> wrote:
>
> > On Wed, 14 Dec 2011 16:49:22 +0900
> > KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> >
> > > Because of commit ef6a3c6311, FUSE uses replace_page_cache() instead
> > > of add_to_page_cache(). Then, mem_cgroup_cache_charge() is not
> > > called against FUSE's pages from splice.
> >
> > Speaking of ef6a3c6311 ("mm: add replace_page_cache_page() function"),
> > may I pathetically remind people that it's rather inefficient?
> >
> > http://lkml.indiana.edu/hypermail/linux/kernel/1109.1/00375.html
> >
>
> IIRC, people says inefficient because it uses memcg codes for page-migration
> for fixing up accounting. Now, We added replace-page-cache for memcg in
> memcg-add-mem_cgroup_replace_page_cache-to-fix-lru-issue.patch
>
> So, I think the problem originally mentioned is fixed.
>
No, the inefficiency in replace_page_cache_page() is still there. Two
identical walks down the radix tree, a pointless decrement then
increment of mapping->nrpages, two writes to page->mapping, an often
pointless decrement then increment of NR_FILE_PAGES, and probably other things.
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.cz>, Hugh Dickins <hughd@google.com>,
Ying Han <yinghan@google.com>
Subject: Re: [PATCH 1/4] memcg: simplify page cache charging.
Date: Tue, 20 Dec 2011 13:58:17 -0800 [thread overview]
Message-ID: <20111220135817.5ba7ab05.akpm@linux-foundation.org> (raw)
In-Reply-To: <20111219090122.66024659.kamezawa.hiroyu@jp.fujitsu.com>
On Mon, 19 Dec 2011 09:01:22 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Fri, 16 Dec 2011 14:28:14 -0800
> Andrew Morton <akpm@linux-foundation.org> wrote:
>
> > On Wed, 14 Dec 2011 16:49:22 +0900
> > KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> >
> > > Because of commit ef6a3c6311, FUSE uses replace_page_cache() instead
> > > of add_to_page_cache(). Then, mem_cgroup_cache_charge() is not
> > > called against FUSE's pages from splice.
> >
> > Speaking of ef6a3c6311 ("mm: add replace_page_cache_page() function"),
> > may I pathetically remind people that it's rather inefficient?
> >
> > http://lkml.indiana.edu/hypermail/linux/kernel/1109.1/00375.html
> >
>
> IIRC, people says inefficient because it uses memcg codes for page-migration
> for fixing up accounting. Now, We added replace-page-cache for memcg in
> memcg-add-mem_cgroup_replace_page_cache-to-fix-lru-issue.patch
>
> So, I think the problem originally mentioned is fixed.
>
No, the inefficiency in replace_page_cache_page() is still there. Two
identical walks down the radix tree, a pointless decrement then
increment of mapping->nrpages, two writes to page->mapping, an often
pointless decrement then increment of NR_FILE_PAGES, and probably other things.
next prev parent reply other threads:[~2011-12-20 21:58 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 7:47 [PATCH 0/4] memcg: simplify LRU handling KAMEZAWA Hiroyuki
2011-12-14 7:47 ` KAMEZAWA Hiroyuki
2011-12-14 7:49 ` [PATCH 1/4] memcg: simplify page cache charging KAMEZAWA Hiroyuki
2011-12-14 7:49 ` KAMEZAWA Hiroyuki
2011-12-16 22:28 ` Andrew Morton
2011-12-16 22:28 ` Andrew Morton
2011-12-19 0:01 ` KAMEZAWA Hiroyuki
2011-12-19 0:01 ` KAMEZAWA Hiroyuki
2011-12-20 21:58 ` Andrew Morton [this message]
2011-12-20 21:58 ` Andrew Morton
2011-12-21 0:01 ` KAMEZAWA Hiroyuki
2011-12-21 0:01 ` KAMEZAWA Hiroyuki
2011-12-19 15:04 ` Johannes Weiner
2011-12-19 15:04 ` Johannes Weiner
2011-12-20 15:33 ` Michal Hocko
2011-12-20 15:33 ` Michal Hocko
2011-12-14 7:50 ` [PATCH 2/4] memcg: simplify corner case handling of LRU KAMEZAWA Hiroyuki
2011-12-14 7:50 ` KAMEZAWA Hiroyuki
2011-12-19 15:14 ` Johannes Weiner
2011-12-19 15:14 ` Johannes Weiner
2011-12-20 15:05 ` Michal Hocko
2011-12-20 15:05 ` Michal Hocko
2011-12-14 7:51 ` [PATCH 3/4] memcg: clear pc->mem_cgorup if necessary KAMEZAWA Hiroyuki
2011-12-14 7:51 ` KAMEZAWA Hiroyuki
2011-12-16 22:30 ` Andrew Morton
2011-12-16 22:30 ` Andrew Morton
2011-12-19 15:37 ` Johannes Weiner
2011-12-19 15:37 ` Johannes Weiner
2011-12-20 0:35 ` Hiroyuki Kamezawa
2011-12-20 0:35 ` Hiroyuki Kamezawa
2011-12-20 15:56 ` Michal Hocko
2011-12-20 15:56 ` Michal Hocko
2011-12-14 7:52 ` [PATCH 4/4] memcg: simplify LRU handling by new rule KAMEZAWA Hiroyuki
2011-12-14 7:52 ` KAMEZAWA Hiroyuki
2011-12-19 15:48 ` Johannes Weiner
2011-12-19 15:48 ` Johannes Weiner
2011-12-20 16:16 ` Michal Hocko
2011-12-20 16:16 ` Michal Hocko
2011-12-21 0:09 ` KAMEZAWA Hiroyuki
2011-12-21 0:09 ` KAMEZAWA Hiroyuki
2011-12-21 6:56 ` Michal Hocko
2011-12-21 6:56 ` Michal Hocko
2011-12-19 15:56 ` [PATCH 0/4] memcg: simplify LRU handling Johannes Weiner
2011-12-19 15:56 ` Johannes Weiner
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=20111220135817.5ba7ab05.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=yinghan@google.com \
/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 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.