All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
To: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
Cc: Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [patch] mm: memcontrol: avoid charge statistics churn during page migration
Date: Tue, 5 Aug 2014 09:12:23 -0400	[thread overview]
Message-ID: <20140805131223.GA14734@cmpxchg.org> (raw)
In-Reply-To: <20140805122434.GD15908-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>

On Tue, Aug 05, 2014 at 02:24:34PM +0200, Michal Hocko wrote:
> On Mon 04-08-14 16:34:29, Johannes Weiner wrote:
> > Charge migration currently disables IRQs twice to update the charge
> > statistics for the old page and then again for the new page.
> > 
> > But migration is a seemless transition of a charge from one physical
> > page to another one of the same size, so this should be a non-event
> > from an accounting point of view.  Leave the statistics alone.
> 
> Moving stats to mem_cgroup_commit_charge sounds logical to me but does
> this work properly even for the fuse replace page cache case when old
> and new pages can already live in different memcgs?

We don't migrate if the new page is already charged.

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>,
	linux-mm@kvack.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [patch] mm: memcontrol: avoid charge statistics churn during page migration
Date: Tue, 5 Aug 2014 09:12:23 -0400	[thread overview]
Message-ID: <20140805131223.GA14734@cmpxchg.org> (raw)
In-Reply-To: <20140805122434.GD15908@dhcp22.suse.cz>

On Tue, Aug 05, 2014 at 02:24:34PM +0200, Michal Hocko wrote:
> On Mon 04-08-14 16:34:29, Johannes Weiner wrote:
> > Charge migration currently disables IRQs twice to update the charge
> > statistics for the old page and then again for the new page.
> > 
> > But migration is a seemless transition of a charge from one physical
> > page to another one of the same size, so this should be a non-event
> > from an accounting point of view.  Leave the statistics alone.
> 
> Moving stats to mem_cgroup_commit_charge sounds logical to me but does
> this work properly even for the fuse replace page cache case when old
> and new pages can already live in different memcgs?

We don't migrate if the new page is already charged.

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>,
	linux-mm@kvack.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [patch] mm: memcontrol: avoid charge statistics churn during page migration
Date: Tue, 5 Aug 2014 09:12:23 -0400	[thread overview]
Message-ID: <20140805131223.GA14734@cmpxchg.org> (raw)
In-Reply-To: <20140805122434.GD15908@dhcp22.suse.cz>

On Tue, Aug 05, 2014 at 02:24:34PM +0200, Michal Hocko wrote:
> On Mon 04-08-14 16:34:29, Johannes Weiner wrote:
> > Charge migration currently disables IRQs twice to update the charge
> > statistics for the old page and then again for the new page.
> > 
> > But migration is a seemless transition of a charge from one physical
> > page to another one of the same size, so this should be a non-event
> > from an accounting point of view.  Leave the statistics alone.
> 
> Moving stats to mem_cgroup_commit_charge sounds logical to me but does
> this work properly even for the fuse replace page cache case when old
> and new pages can already live in different memcgs?

We don't migrate if the new page is already charged.

  parent reply	other threads:[~2014-08-05 13:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 20:34 [patch] mm: memcontrol: avoid charge statistics churn during page migration Johannes Weiner
2014-08-04 20:34 ` Johannes Weiner
2014-08-04 20:34 ` Johannes Weiner
     [not found] ` <1407184469-20741-1-git-send-email-hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2014-08-05 12:24   ` Michal Hocko
2014-08-05 12:24     ` Michal Hocko
2014-08-05 12:24     ` Michal Hocko
     [not found]     ` <20140805122434.GD15908-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2014-08-05 13:12       ` Johannes Weiner [this message]
2014-08-05 13:12         ` Johannes Weiner
2014-08-05 13:12         ` Johannes Weiner
     [not found]         ` <20140805131223.GA14734-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2014-08-05 13:34           ` Michal Hocko
2014-08-05 13:34             ` Michal Hocko
2014-08-05 13:34             ` Michal Hocko

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=20140805131223.GA14734@cmpxchg.org \
    --to=hannes-druugvl0lcnafugrpc6u6w@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=mhocko-AlSwsSmVLrQ@public.gmane.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 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.