From: Johannes Weiner <hannes@cmpxchg.org>
To: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.cz>,
linux-mm@kvack.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 1/5] mm: memcontrol: generalize locking for the page->mem_cgroup binding
Date: Fri, 29 Jan 2016 11:43:53 -0500 [thread overview]
Message-ID: <20160129164353.GA8845@cmpxchg.org> (raw)
In-Reply-To: <20160127143045.GA9623@esperanza>
On Wed, Jan 27, 2016 at 05:30:45PM +0300, Vladimir Davydov wrote:
> On Tue, Jan 26, 2016 at 04:00:02PM -0500, Johannes Weiner wrote:
>
> > @@ -683,17 +683,17 @@ int __set_page_dirty_buffers(struct page *page)
> > } while (bh != head);
> > }
> > /*
> > - * Use mem_group_begin_page_stat() to keep PageDirty synchronized with
> > - * per-memcg dirty page counters.
> > + * Lock out page->mem_cgroup migration to keep PageDirty
> > + * synchronized with per-memcg dirty page counters.
> > */
> > - memcg = mem_cgroup_begin_page_stat(page);
> > + memcg = lock_page_memcg(page);
> > newly_dirty = !TestSetPageDirty(page);
> > spin_unlock(&mapping->private_lock);
> >
> > if (newly_dirty)
> > __set_page_dirty(page, mapping, memcg, 1);
>
> Do we really want to pass memcg to __set_page_dirty and then to
> account_page_dirtied, increasing stack/regs usage even in case memory
> cgroup is disabled? May be, it'd be better to make
> mem_cgroup_update_page_stat take a page instead of a memcg?
I'll look into that. It will need changing migration to leave the
page->mem_cgroup binding of live pages alone, but that's something
worth doing anyway. It's beyond the scope of these patches, though.
Thanks
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-01-29 16:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 21:00 [PATCH 0/5] mm: workingset: per-cgroup thrash detection Johannes Weiner
2016-01-26 21:00 ` [PATCH 1/5] mm: memcontrol: generalize locking for the page->mem_cgroup binding Johannes Weiner
2016-01-27 14:30 ` Vladimir Davydov
2016-01-29 16:43 ` Johannes Weiner [this message]
2016-01-26 21:00 ` [PATCH 2/5] mm: workingset: #define radix entry eviction mask Johannes Weiner
2016-01-27 14:32 ` Vladimir Davydov
2016-01-26 21:00 ` [PATCH 3/5] mm: workingset: separate shadow unpacking and refault calculation Johannes Weiner
2016-01-27 14:34 ` Vladimir Davydov
2016-01-26 21:00 ` [PATCH 4/5] mm: workingset: eviction buckets for bigmem/lowbit machines Johannes Weiner
2016-01-27 14:39 ` Vladimir Davydov
2016-01-26 21:00 ` [PATCH 5/5] mm: workingset: per-cgroup cache thrash detection Johannes Weiner
2016-01-27 14:58 ` Vladimir Davydov
2016-01-29 17:30 ` 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=20160129164353.GA8845@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=vdavydov@virtuozzo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).