login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
March
»
2
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Andrea Righi
Subject:
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
Date: Tuesday, March 2, 2010 - 4:34 am
On Tue, Mar 02, 2010 at 01:09:24PM +0200, Kirill A. Shutemov wrote:
quoted text
> On Tue, Mar 2, 2010 at 1:02 PM, Andrea Righi <arighi@develer.com> wrote: > > On Tue, Mar 02, 2010 at 12:11:10PM +0200, Kirill A. Shutemov wrote: > >> On Mon, Mar 1, 2010 at 11:23 PM, Andrea Righi <arighi@develer.com> wrote: > >> > Apply the cgroup dirty pages accounting and limiting infrastructure to > >> > the opportune kernel functions. > >> > > >> > Signed-off-by: Andrea Righi <arighi@develer.com> > >> > --- > >> > fs/fuse/file.c | 5 +++ > >> > fs/nfs/write.c | 4 ++ > >> > fs/nilfs2/segment.c | 10 +++++- > >> > mm/filemap.c | 1 + > >> > mm/page-writeback.c | 84 ++++++++++++++++++++++++++++++++------------------ > >> > mm/rmap.c | 4 +- > >> > mm/truncate.c | 2 + > >> > 7 files changed, 76 insertions(+), 34 deletions(-) > >> > > >> > diff --git a/fs/fuse/file.c b/fs/fuse/file.c > >> > index a9f5e13..dbbdd53 100644 > >> > --- a/fs/fuse/file.c > >> > +++ b/fs/fuse/file.c > >> > @@ -11,6 +11,7 @@ > >> > #include <linux/pagemap.h> > >> > #include <linux/slab.h> > >> > #include <linux/kernel.h> > >> > +#include <linux/memcontrol.h> > >> > #include <linux/sched.h> > >> > #include <linux/module.h> > >> > > >> > @@ -1129,6 +1130,8 @@ static void fuse_writepage_finish(struct fuse_conn *fc, struct fuse_req *req) > >> > > >> > list_del(&req->writepages_entry); > >> > dec_bdi_stat(bdi, BDI_WRITEBACK); > >> > + mem_cgroup_update_stat(req->pages[0], > >> > + MEM_CGROUP_STAT_WRITEBACK_TEMP, -1); > >> > dec_zone_page_state(req->pages[0], NR_WRITEBACK_TEMP); > >> > bdi_writeout_inc(bdi); > >> > wake_up(&fi->page_waitq); > >> > @@ -1240,6 +1243,8 @@ static int fuse_writepage_locked(struct page *page) > >> > req->inode = inode; > >> > > >> > inc_bdi_stat(mapping->backing_dev_info, BDI_WRITEBACK); > >> > + mem_cgroup_update_stat(tmp_page, > >> > + MEM_CGROUP_STAT_WRITEBACK_TEMP, 1); > >> > inc_zone_page_state(tmp_page, NR_WRITEBACK_TEMP); > >> > end_page_writeback(page); > >> > > >> > diff --git a/fs/nfs/write.c b/fs/nfs/write.c > >> > index b753242..7316f7a 100644 > >> > --- a/fs/nfs/write.c > >> > +++ b/fs/nfs/write.c > >> > @@ -439,6 +439,7 @@ nfs_mark_request_commit(struct nfs_page *req) > >> > req->wb_index, > >> > NFS_PAGE_TAG_COMMIT); > >> > spin_unlock(&inode->i_lock); > >> > + mem_cgroup_update_stat(req->wb_page, MEM_CGROUP_STAT_UNSTABLE_NFS, 1); > >> > inc_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); > >> > inc_bdi_stat(req->wb_page->mapping->backing_dev_info, BDI_UNSTABLE); > >> > __mark_inode_dirty(inode, I_DIRTY_DATASYNC); > >> > @@ -450,6 +451,7 @@ nfs_clear_request_commit(struct nfs_page *req) > >> > struct page *page = req->wb_page; > >> > > >> > if (test_and_clear_bit(PG_CLEAN, &(req)->wb_flags)) { > >> > + mem_cgroup_update_stat(page, MEM_CGROUP_STAT_UNSTABLE_NFS, -1); > >> > dec_zone_page_state(page, NR_UNSTABLE_NFS); > >> > dec_bdi_stat(page->mapping->backing_dev_info, BDI_UNSTABLE); > >> > return 1; > >> > @@ -1273,6 +1275,8 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how) > >> > req = nfs_list_entry(head->next); > >> > nfs_list_remove_request(req); > >> > nfs_mark_request_commit(req); > >> > + mem_cgroup_update_stat(req->wb_page, > >> > + MEM_CGROUP_STAT_UNSTABLE_NFS, -1); > >> > dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); > >> > dec_bdi_stat(req->wb_page->mapping->backing_dev_info, > >> > BDI_UNSTABLE); > >> > diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c > >> > index ada2f1b..aef6d13 100644 > >> > --- a/fs/nilfs2/segment.c > >> > +++ b/fs/nilfs2/segment.c > >> > @@ -1660,8 +1660,11 @@ nilfs_copy_replace_page_buffers(struct page *page, struct list_head *out) > >> > } while (bh = bh->b_this_page, bh2 = bh2->b_this_page, bh != head); > >> > kunmap_atomic(kaddr, KM_USER0); > >> > > >> > - if (!TestSetPageWriteback(clone_page)) > >> > + if (!TestSetPageWriteback(clone_page)) { > >> > + mem_cgroup_update_stat(clone_page, > >> > >> s/clone_page/page/ > > > > mmh... shouldn't we use the same page used by TestSetPageWriteback() and > > inc_zone_page_state()? > > Sorry, I've commented wrong hunk. It's for the next one.
Yes. Good catch! Will fix in the next version. Thanks, -Andrea --
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:
[PATCH -mmotm 0/3] memcg: per cgroup dirty limit (v3)
, Andrea Righi
, (Mon Mar 1, 2:23 pm)
[PATCH -mmotm 1/3] memcg: dirty memory documentation
, Andrea Righi
, (Mon Mar 1, 2:23 pm)
[PATCH -mmotm 2/3] memcg: dirty pages accounting and limit ...
, Andrea Righi
, (Mon Mar 1, 2:23 pm)
[PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Mon Mar 1, 2:23 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Vivek Goyal
, (Mon Mar 1, 3:02 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Mon Mar 1, 3:18 pm)
Re: [PATCH -mmotm 2/3] memcg: dirty pages accounting and l ...
, KAMEZAWA Hiroyuki
, (Mon Mar 1, 5:20 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, KAMEZAWA Hiroyuki
, (Mon Mar 1, 5:23 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Tue Mar 2, 1:01 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Daisuke Nishimura
, (Tue Mar 2, 1:12 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, KAMEZAWA Hiroyuki
, (Tue Mar 2, 1:23 am)
Re: [PATCH -mmotm 2/3] memcg: dirty pages accounting and l ...
, Kirill A. Shutemov
, (Tue Mar 2, 3:04 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Kirill A. Shutemov
, (Tue Mar 2, 3:11 am)
Re: [PATCH -mmotm 2/3] memcg: dirty pages accounting and l ...
, Andrea Righi
, (Tue Mar 2, 4:00 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Tue Mar 2, 4:02 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Kirill A. Shutemov
, (Tue Mar 2, 4:09 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Tue Mar 2, 4:34 am)
Re: [PATCH -mmotm 2/3] memcg: dirty pages accounting and l ...
, Balbir Singh
, (Tue Mar 2, 6:02 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Balbir Singh
, (Tue Mar 2, 6:47 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Peter Zijlstra
, (Tue Mar 2, 6:48 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Balbir Singh
, (Tue Mar 2, 6:50 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Kirill A. Shutemov
, (Tue Mar 2, 6:56 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Vivek Goyal
, (Tue Mar 2, 8:05 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Balbir Singh
, (Tue Mar 2, 8:26 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Trond Myklebust
, (Tue Mar 2, 8:49 am)
Re: [PATCH -mmotm 2/3] memcg: dirty pages accounting and l ...
, Greg Thelen
, (Tue Mar 2, 11:08 am)
Re: [PATCH -mmotm 2/3] memcg: dirty pages accounting and l ...
, Andrea Righi
, (Tue Mar 2, 2:50 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Tue Mar 2, 3:14 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Tue Mar 2, 3:18 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Tue Mar 2, 3:22 pm)
Re: [PATCH -mmotm 2/3] memcg: dirty pages accounting and l ...
, Andrea Righi
, (Tue Mar 2, 3:24 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Daisuke Nishimura
, (Tue Mar 2, 4:21 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Vivek Goyal
, (Tue Mar 2, 4:59 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Daisuke Nishimura
, (Tue Mar 2, 7:12 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, KAMEZAWA Hiroyuki
, (Tue Mar 2, 8:29 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Daisuke Nishimura
, (Tue Mar 2, 11:01 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, KAMEZAWA Hiroyuki
, (Tue Mar 2, 11:15 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, KAMEZAWA Hiroyuki
, (Wed Mar 3, 1:21 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Peter Zijlstra
, (Wed Mar 3, 3:07 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Wed Mar 3, 4:47 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Wed Mar 3, 4:48 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Wed Mar 3, 4:50 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Wed Mar 3, 4:56 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Wed Mar 3, 5:05 am)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Andrea Righi
, (Wed Mar 3, 3:03 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, Daisuke Nishimura
, (Wed Mar 3, 4:25 pm)
Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
, KAMEZAWA Hiroyuki
, (Wed Mar 3, 8:45 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Brian Swetland
Re: Attempted summary of suspend-blockers LKML thread
Ray Lee
Re: -mm merge plans for 2.6.23
Florin Malita
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Mark Lord
re: Regression: 2.6.25-rc8: FTP transfer errors
Oleg Nesterov
[PATCH 1/1] oom: fix the unsafe usage of badness() in proc_oom_score()
git
:
Felipe Contreras
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Paolo Ciarrocchi
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Johannes Schindelin
[PATCH] fetch: refuse to fetch into the current branch in a non-bare repository
Johannes Schindelin
Re: [PATCH] Fix install-doc-quick target
Peter Oberndorfer
Subject: [PATCH] fix stg edit command
linux-netdev
:
Ursula Braun
[patch 2/8] [PATCH] af_iucv: sync sk shutdown flag if iucv path is quiesced
Andi Kleen
Re: RFC: Nagle latency tuning
David Miller
Re: [RFC 0/5] generic rx recycling
Chuck Lever
Re: [RFC] ipv6: Change %pI6 format to output compacted addresses?
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
git-commits-head
:
Linux Kernel Mailing List
New device ID for sc92031 [1088:2031]
Linux Kernel Mailing List
e1000e: Expose MDI-X status via ethtool change
Linux Kernel Mailing List
arm/imx/gpio: GPIO_INT_{HIGH,LOW}_LEV are not necessarily constant
Linux Kernel Mailing List
powerpc/kexec: Add support for FSL-BookE
Linux Kernel Mailing List
trivial: fix comment typo in fs/compat.c
openbsd-misc
:
Theo de Raadt
Re: RES: OpenBSD on IBM System X3550 7879
Bret S. Lambert
Re: any web management gui for pf ?
Rob Shepherd
x86 hardware for router system
Flickr Photo Map for iPad and iPhone
Thanks for the Great Launch of Flickr Photo Map for iPad + iPhone
Nick Holland
Re: Install OpenBSD from USB ?
Colocation donated by:
Syndicate