cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jerome Glisse <jglisse-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Michal Hocko <mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	John Hubbard <jhubbard-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	David Nellans <dnellans-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Dan Williams
	<dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Balbir Singh
	<bsingharora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
	Vladimir Davydov
	<vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 4/5] mm/memcontrol: allow to uncharge page without using page->lru field
Date: Mon, 10 Jul 2017 14:10:53 -0400	[thread overview]
Message-ID: <20170710181053.GD4964@redhat.com> (raw)
In-Reply-To: <20170710174857.GF7071-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>

On Mon, Jul 10, 2017 at 07:48:58PM +0200, Michal Hocko wrote:
> On Mon 10-07-17 12:54:21, Jerome Glisse wrote:
> > On Mon, Jul 10, 2017 at 06:36:52PM +0200, Michal Hocko wrote:
> > > On Mon 10-07-17 12:25:42, Jerome Glisse wrote:
> > > [...]
> > > > Bottom line is that we can always free and uncharge device memory
> > > > page just like any regular page.
> > > 
> > > OK, this answers my earlier question. Then it should be feasible to
> > > charge this memory. There are still some things to handle. E.g. how do
> > > we consider this memory during oom victim selection (this is not
> > > accounted as an anonymous memory in get_mm_counter, right?), maybe others.
> > > But the primary point is that nobody pins the memory outside of the
> > > mapping.
> > 
> > At this point it is accounted as a regular page would be (anonymous, file
> > or share memory). I wanted mm_counters to reflect memcg but i can untie
> > that.
> 
> I am not sure I understand. If the device memory is accounted to the
> same mm counter as the original page then it is correct. I will try to
> double check the implementation (hopefully soon).

It is accounted like the original page. By same as memcg i mean i made
the same kind of choice for mm counter than i made for memcg. It is
all in the migrate code (migrate.c) ie i don't touch any of the mm
counter when migrating page.

Jérôme

  parent reply	other threads:[~2017-07-10 18:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170703211415.11283-1-jglisse@redhat.com>
2017-07-03 21:14 ` [PATCH 4/5] mm/memcontrol: allow to uncharge page without using page->lru field Jérôme Glisse
2017-07-04 12:51   ` Michal Hocko
     [not found]     ` <20170704125113.GC14727-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-07-05  3:18       ` Balbir Singh
2017-07-05  6:38         ` Michal Hocko
     [not found]           ` <20170705063813.GB10354-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-07-05 10:22             ` Balbir Singh
2017-07-05 14:35     ` Jerome Glisse
2017-07-10  8:28       ` Michal Hocko
     [not found]         ` <20170710082805.GD19185-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-07-10 15:32           ` Jerome Glisse
2017-07-10 16:04             ` Michal Hocko
     [not found]               ` <20170710160444.GB7071-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-07-10 16:25                 ` Jerome Glisse
     [not found]                   ` <20170710162542.GB4964-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-10 16:36                     ` Michal Hocko
2017-07-10 16:54                       ` Jerome Glisse
2017-07-10 17:48                         ` Michal Hocko
     [not found]                           ` <20170710174857.GF7071-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-07-10 18:10                             ` Jerome Glisse [this message]
2017-07-03 21:14 ` [PATCH 5/5] mm/memcontrol: support MEMORY_DEVICE_PRIVATE and MEMORY_DEVICE_PUBLIC Jérôme Glisse

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=20170710181053.GD4964@redhat.com \
    --to=jglisse-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=bsingharora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=dnellans-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
    --cc=jhubbard-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w@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 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).