Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-21 Thread Roman Gushchin
On Thu, May 21, 2020 at 01:01:38PM +0200, Vlastimil Babka wrote: > On 5/20/20 11:00 PM, Roman Gushchin wrote: > > > > From beeaecdac85c3a395dcfb99944dc8c858b541cbf Mon Sep 17 00:00:00 2001 > > From: Roman Gushchin > > Date: Mon, 29 Jul 2019 18:18:42 -0700 > > Subject: [PATCH v3.2 04/19] mm: slub:

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-21 Thread Vlastimil Babka
On 5/20/20 11:00 PM, Roman Gushchin wrote: > > From beeaecdac85c3a395dcfb99944dc8c858b541cbf Mon Sep 17 00:00:00 2001 > From: Roman Gushchin > Date: Mon, 29 Jul 2019 18:18:42 -0700 > Subject: [PATCH v3.2 04/19] mm: slub: implement SLUB version of obj_to_index() > > This commit implements SLUB ve

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-20 Thread Roman Gushchin
On Wed, May 20, 2020 at 03:51:45PM +0200, Vlastimil Babka wrote: > On 4/22/20 10:46 PM, Roman Gushchin wrote: > > This commit implements SLUB version of the obj_to_index() function, > > which will be required to calculate the offset of obj_cgroup in the > > obj_cgroups vector to store/obtain the ob

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-20 Thread Roman Gushchin
On Wed, May 20, 2020 at 11:51:51AM +0200, Vlastimil Babka wrote: > On 5/13/20 2:57 AM, Roman Gushchin wrote: > > > > Btw, I'm trying to build up a prototype with an embedded memcg pointer, > > but it seems to be way more tricky than I thought. It requires changes to > > shrinkers (as they rely on

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-20 Thread Vlastimil Babka
On 4/22/20 10:46 PM, Roman Gushchin wrote: > This commit implements SLUB version of the obj_to_index() function, > which will be required to calculate the offset of obj_cgroup in the > obj_cgroups vector to store/obtain the objcg ownership data. > > To make it faster, let's repeat the SLAB's trick

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-20 Thread Vlastimil Babka
On 5/13/20 2:57 AM, Roman Gushchin wrote: > > Btw, I'm trying to build up a prototype with an embedded memcg pointer, > but it seems to be way more tricky than I thought. It requires changes to > shrinkers (as they rely on getting the memcg pointer by an arbitrary > kernel address, not necessarily

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-15 Thread Roman Gushchin
On Fri, May 15, 2020 at 09:45:30PM +, Christoph Lameter wrote: > On Tue, 12 May 2020, Roman Gushchin wrote: > > > > Add it to the metadata at the end of the object. Like the debugging > > > information or the pointer for RCU freeing. > > > > Enabling debugging metadata currently disables the c

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-15 Thread Christopher Lameter
On Tue, 12 May 2020, Roman Gushchin wrote: > > Add it to the metadata at the end of the object. Like the debugging > > information or the pointer for RCU freeing. > > Enabling debugging metadata currently disables the cache merging. > I doubt that it's acceptable to sacrifice the cache merging in

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-15 Thread Roman Gushchin
On Fri, May 08, 2020 at 09:35:54PM +, Christoph Lameter wrote: > On Mon, 4 May 2020, Roman Gushchin wrote: > > > On Sat, May 02, 2020 at 11:54:09PM +, Christoph Lameter wrote: > > > On Thu, 30 Apr 2020, Roman Gushchin wrote: > > > > > > > Sorry, but what exactly do you mean? > > > > > > I

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-12 Thread Roman Gushchin
On Fri, May 08, 2020 at 09:35:54PM +, Christoph Lameter wrote: > On Mon, 4 May 2020, Roman Gushchin wrote: > > > On Sat, May 02, 2020 at 11:54:09PM +, Christoph Lameter wrote: > > > On Thu, 30 Apr 2020, Roman Gushchin wrote: > > > > > > > Sorry, but what exactly do you mean? > > > > > > I

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-08 Thread Christopher Lameter
On Mon, 4 May 2020, Roman Gushchin wrote: > On Sat, May 02, 2020 at 11:54:09PM +, Christoph Lameter wrote: > > On Thu, 30 Apr 2020, Roman Gushchin wrote: > > > > > Sorry, but what exactly do you mean? > > > > I think the right approach is to add a pointer to each slab object for > > memcg supp

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-04 Thread Roman Gushchin
On Sat, May 02, 2020 at 11:54:09PM +, Christoph Lameter wrote: > On Thu, 30 Apr 2020, Roman Gushchin wrote: > > > Sorry, but what exactly do you mean? > > I think the right approach is to add a pointer to each slab object for > memcg support. > As I understand, embedding the memcg pointer wi

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-02 Thread Christopher Lameter
On Thu, 30 Apr 2020, Roman Gushchin wrote: > Sorry, but what exactly do you mean? I think the right approach is to add a pointer to each slab object for memcg support.

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-04-30 Thread Roman Gushchin
On Thu, Apr 30, 2020 at 04:29:50PM +, Christoph Lameter wrote: > On Mon, 27 Apr 2020, Roman Gushchin wrote: > > > > Why do you need this? Just slap a pointer to the cgroup as additional > > > metadata onto the slab object. Is that not much simpler, safer and faster? > > > > > > > So, the probl

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-04-30 Thread Christopher Lameter
On Mon, 27 Apr 2020, Roman Gushchin wrote: > > Why do you need this? Just slap a pointer to the cgroup as additional > > metadata onto the slab object. Is that not much simpler, safer and faster? > > > > So, the problem is that not all slab objects are accounted, and sometimes > we don't know if a

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-04-28 Thread Johannes Weiner
On Mon, Apr 27, 2020 at 09:46:38AM -0700, Roman Gushchin wrote: > On Mon, Apr 27, 2020 at 04:21:01PM +, Christoph Lameter wrote: > > On Fri, 24 Apr 2020, Roman Gushchin wrote: > > > > > > The patch seems to only use it for setup and debugging? It is used for > > > > every "accounted" allocatio

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-04-28 Thread Roman Gushchin
On Mon, Apr 27, 2020 at 09:46:38AM -0700, Roman Gushchin wrote: > On Mon, Apr 27, 2020 at 04:21:01PM +, Christoph Lameter wrote: > > On Fri, 24 Apr 2020, Roman Gushchin wrote: > > > > > > The patch seems to only use it for setup and debugging? It is used for > > > > every "accounted" allocatio