[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y/etrtvyaiwRIo6f@nvidia.com>
Date: Thu, 23 Feb 2023 14:17:18 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Tejun Heo <tj@...nel.org>
Cc: Yosry Ahmed <yosryahmed@...gle.com>,
"T.J. Mercier" <tjmercier@...gle.com>,
Alistair Popple <apopple@...dia.com>,
Michal Hocko <mhocko@...e.com>, linux-mm@...ck.org,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
jhubbard@...dia.com, hannes@...xchg.org, surenb@...gle.com,
mkoutny@...e.com, daniel@...ll.ch,
"Daniel P . Berrange" <berrange@...hat.com>,
Alex Williamson <alex.williamson@...hat.com>,
Zefan Li <lizefan.x@...edance.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 14/19] mm: Introduce a cgroup for pinned memory
On Thu, Feb 23, 2023 at 08:15:17AM -1000, Tejun Heo wrote:
> On Thu, Feb 23, 2023 at 02:10:56PM -0400, Jason Gunthorpe wrote:
> > > I am not familiar with memfd, but based on
> > > mem_cgroup_swapin_charge_folio() it seems like if cgroup B swapped in
> > > the pages they will remain charged to cgroup A, unless cgroup A is
> > > removed/offlined. Am I missing something?
> >
> > Ah, I don't know, Tejun said:
> >
> > "but it can converge when page usage transfers across cgroups
> > if needed."
> >
> > Which I assumed was swap related but I don't know how convergence
> > works.
>
> That'd work for pagecache. For swap-backed, I think Yosry is right. Is
> MAP_SHARED | MAP_ANONYMOUS a concern? Such mappings can only be shared
> through forking, so it's not a common thing to be shared across different
> resource domains.
Isn't memfd also in the same boat?
Jason
Powered by blists - more mailing lists