Re: mm: memcontrol: rewrite uncharge API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 07, 2014 at 03:40:46PM -0700, Andrew Morton wrote:
> On Thu, 7 Aug 2014 12:25:07 -0400 Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
> 
> > mem_cgroup_migrate() is suitable for replace_page_cache() as well,
> > which gets rid of mem_cgroup_replace_page_cache().
> > 
> > Could you please update it to say:
> > 
> > mem_cgroup_migrate() is suitable for replace_page_cache() as well,
> > which gets rid of mem_cgroup_replace_page_cache().  However, care
> > needs to be taken because both the source and the target page can
> > already be charged and on the LRU when fuse is splicing: grab the page
> > lock on the charge moving side to prevent changing pc->mem_cgroup of a
> > page under migration.  Also, the lruvecs of both pages change as we
> > uncharge the old and charge the new during migration, and putback may
> > race with us, so grab the lru lock and isolate the pages iff on LRU to
> > prevent races and ensure the pages are on the right lruvec afterward.
> 
> OK thanks, I did that, separated out
> mm-memcontrol-rewrite-uncharge-api-fix-page-cache-migration.patch again
> and copied the [0/n] changelog text into mm-memcontrol-rewrite-charge-api.patch.
> 
> I'll get these (presently at http://ozlabs.org/~akpm/mmots/broken-out/)
> 
> mm-memcontrol-rewrite-charge-api.patch
> mm-memcontrol-rewrite-uncharge-api.patch
> mm-memcontrol-rewrite-uncharge-api-fix-page-cache-migration.patch
> mm-memcontrol-use-page-lists-for-uncharge-batching.patch
> #
> page-cgroup-trivial-cleanup.patch
> page-cgroup-get-rid-of-nr_pcg_flags.patch
> #
> #
> memcg-remove-lookup_cgroup_page-prototype.patch

mm-memcontrol-avoid-charge-statistics-churn-during-page-migration.patch
came a bit later, but it's a small optimization directly relevant to
the above changes, so you may want to send it along with them.

Michal already acked it on the list:
http://marc.info/?l=linux-mm&m=140724569618836&w=2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]