Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-18 Thread Glauber Costa
On 01/18/2013 04:10 PM, Dave Chinner wrote: > On Fri, Jan 18, 2013 at 11:10:00AM -0800, Glauber Costa wrote: >> On 01/18/2013 12:11 AM, Dave Chinner wrote: >>> On Thu, Jan 17, 2013 at 04:14:10PM -0800, Glauber Costa wrote: On 01/17/2013 04:10 PM, Dave Chinner wrote: > And then each object

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-18 Thread Dave Chinner
On Fri, Jan 18, 2013 at 11:10:00AM -0800, Glauber Costa wrote: > On 01/18/2013 12:11 AM, Dave Chinner wrote: > > On Thu, Jan 17, 2013 at 04:14:10PM -0800, Glauber Costa wrote: > >> On 01/17/2013 04:10 PM, Dave Chinner wrote: > >>> And then each object uses: > >>> > >>> struct lru_item { > >>>

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-18 Thread Glauber Costa
On 01/18/2013 12:11 AM, Dave Chinner wrote: > On Thu, Jan 17, 2013 at 04:14:10PM -0800, Glauber Costa wrote: >> On 01/17/2013 04:10 PM, Dave Chinner wrote: >>> And then each object uses: >>> >>> struct lru_item { >>> struct list_head global_list; >>> struct list_head memcg_list; >>> } >>

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-18 Thread Glauber Costa
On 01/18/2013 12:08 AM, Dave Chinner wrote: > On Thu, Jan 17, 2013 at 04:51:03PM -0800, Glauber Costa wrote: >> On 01/17/2013 04:10 PM, Dave Chinner wrote: >>> and we end up with: >>> >>> lru_add(struct lru_list *lru, struct lru_item *item) >>> { >>> node_id = min(object_to_nid(item),

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-18 Thread Dave Chinner
On Thu, Jan 17, 2013 at 04:14:10PM -0800, Glauber Costa wrote: > On 01/17/2013 04:10 PM, Dave Chinner wrote: > > And then each object uses: > > > > struct lru_item { > > struct list_head global_list; > > struct list_head memcg_list; > > } > by objects you mean dentries, inodes, and the

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-18 Thread Dave Chinner
On Thu, Jan 17, 2013 at 04:51:03PM -0800, Glauber Costa wrote: > On 01/17/2013 04:10 PM, Dave Chinner wrote: > > and we end up with: > > > > lru_add(struct lru_list *lru, struct lru_item *item) > > { > > node_id = min(object_to_nid(item), lru->numnodes); > > > > __lru_add(lru,

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-18 Thread Dave Chinner
On Thu, Jan 17, 2013 at 04:51:03PM -0800, Glauber Costa wrote: On 01/17/2013 04:10 PM, Dave Chinner wrote: and we end up with: lru_add(struct lru_list *lru, struct lru_item *item) { node_id = min(object_to_nid(item), lru-numnodes); __lru_add(lru, node_id,

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-18 Thread Dave Chinner
On Thu, Jan 17, 2013 at 04:14:10PM -0800, Glauber Costa wrote: On 01/17/2013 04:10 PM, Dave Chinner wrote: And then each object uses: struct lru_item { struct list_head global_list; struct list_head memcg_list; } by objects you mean dentries, inodes, and the such, right?

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-18 Thread Glauber Costa
On 01/18/2013 12:08 AM, Dave Chinner wrote: On Thu, Jan 17, 2013 at 04:51:03PM -0800, Glauber Costa wrote: On 01/17/2013 04:10 PM, Dave Chinner wrote: and we end up with: lru_add(struct lru_list *lru, struct lru_item *item) { node_id = min(object_to_nid(item), lru-numnodes);

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-18 Thread Glauber Costa
On 01/18/2013 12:11 AM, Dave Chinner wrote: On Thu, Jan 17, 2013 at 04:14:10PM -0800, Glauber Costa wrote: On 01/17/2013 04:10 PM, Dave Chinner wrote: And then each object uses: struct lru_item { struct list_head global_list; struct list_head memcg_list; } by objects you mean

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-18 Thread Dave Chinner
On Fri, Jan 18, 2013 at 11:10:00AM -0800, Glauber Costa wrote: On 01/18/2013 12:11 AM, Dave Chinner wrote: On Thu, Jan 17, 2013 at 04:14:10PM -0800, Glauber Costa wrote: On 01/17/2013 04:10 PM, Dave Chinner wrote: And then each object uses: struct lru_item { struct list_head

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-18 Thread Glauber Costa
On 01/18/2013 04:10 PM, Dave Chinner wrote: On Fri, Jan 18, 2013 at 11:10:00AM -0800, Glauber Costa wrote: On 01/18/2013 12:11 AM, Dave Chinner wrote: On Thu, Jan 17, 2013 at 04:14:10PM -0800, Glauber Costa wrote: On 01/17/2013 04:10 PM, Dave Chinner wrote: And then each object uses: struct

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-17 Thread Glauber Costa
On 01/17/2013 04:10 PM, Dave Chinner wrote: > and we end up with: > > lru_add(struct lru_list *lru, struct lru_item *item) > { > node_id = min(object_to_nid(item), lru->numnodes); > > __lru_add(lru, node_id, >global_list); > if (memcg) { > memcg_lru =

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-17 Thread Glauber Costa
On 01/17/2013 04:10 PM, Dave Chinner wrote: > And then each object uses: > > struct lru_item { > struct list_head global_list; > struct list_head memcg_list; > } by objects you mean dentries, inodes, and the such, right? Would it be acceptable to you? We've been of course doing our

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-17 Thread Dave Chinner
On Thu, Jan 17, 2013 at 10:21:12AM -0800, Glauber Costa wrote: > >> Deepest fears: > >> > >> 1) snakes. > > > > Snakes are merely poisonous. Drop Bears are far more dangerous :P > > fears are irrational anyway... > > >> 2) It won't surprise you to know that I am adapting your work, which > >>

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-17 Thread Glauber Costa
>> Deepest fears: >> >> 1) snakes. > > Snakes are merely poisonous. Drop Bears are far more dangerous :P > fears are irrational anyway... >> 2) It won't surprise you to know that I am adapting your work, which >> provides a very sane and helpful API, to memcg shrinking. >> >> The dumb and

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-17 Thread Glauber Costa
Deepest fears: 1) snakes. Snakes are merely poisonous. Drop Bears are far more dangerous :P fears are irrational anyway... 2) It won't surprise you to know that I am adapting your work, which provides a very sane and helpful API, to memcg shrinking. The dumb and simple approach in

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-17 Thread Dave Chinner
On Thu, Jan 17, 2013 at 10:21:12AM -0800, Glauber Costa wrote: Deepest fears: 1) snakes. Snakes are merely poisonous. Drop Bears are far more dangerous :P fears are irrational anyway... 2) It won't surprise you to know that I am adapting your work, which provides a very sane

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-17 Thread Glauber Costa
On 01/17/2013 04:10 PM, Dave Chinner wrote: And then each object uses: struct lru_item { struct list_head global_list; struct list_head memcg_list; } by objects you mean dentries, inodes, and the such, right? Would it be acceptable to you? We've been of course doing our best to

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-17 Thread Glauber Costa
On 01/17/2013 04:10 PM, Dave Chinner wrote: and we end up with: lru_add(struct lru_list *lru, struct lru_item *item) { node_id = min(object_to_nid(item), lru-numnodes); __lru_add(lru, node_id, item-global_list); if (memcg) { memcg_lru =

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-16 Thread Dave Chinner
On Wed, Jan 16, 2013 at 04:35:43PM -0800, Glauber Costa wrote: > > >> The superblocks only, are present by the dozens even in a small system, > >> and I believe the whole goal of this API is to get more users to switch > >> to it. This can easily use up a respectable bunch of megs. > >> > >>

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-16 Thread Glauber Costa
>> The superblocks only, are present by the dozens even in a small system, >> and I believe the whole goal of this API is to get more users to switch >> to it. This can easily use up a respectable bunch of megs. >> >> Isn't it a bit too much ? > > Maybe, but for active superblocks it only takes

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-16 Thread Dave Chinner
On Wed, Jan 16, 2013 at 11:21:44AM -0800, Glauber Costa wrote: > On 11/27/2012 03:14 PM, Dave Chinner wrote: > > From: Dave Chinner > > > > Now that we have an LRU list API, we can start to enhance the > > implementation. This splits the single LRU list into per-node lists > > and locks to

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-16 Thread Glauber Costa
On 11/27/2012 03:14 PM, Dave Chinner wrote: > From: Dave Chinner > > Now that we have an LRU list API, we can start to enhance the > implementation. This splits the single LRU list into per-node lists > and locks to enhance scalability. Items are placed on lists > according to the node the

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-16 Thread Glauber Costa
On 11/27/2012 03:14 PM, Dave Chinner wrote: From: Dave Chinner dchin...@redhat.com Now that we have an LRU list API, we can start to enhance the implementation. This splits the single LRU list into per-node lists and locks to enhance scalability. Items are placed on lists according to the

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-16 Thread Dave Chinner
On Wed, Jan 16, 2013 at 11:21:44AM -0800, Glauber Costa wrote: On 11/27/2012 03:14 PM, Dave Chinner wrote: From: Dave Chinner dchin...@redhat.com Now that we have an LRU list API, we can start to enhance the implementation. This splits the single LRU list into per-node lists and locks

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-16 Thread Glauber Costa
The superblocks only, are present by the dozens even in a small system, and I believe the whole goal of this API is to get more users to switch to it. This can easily use up a respectable bunch of megs. Isn't it a bit too much ? Maybe, but for active superblocks it only takes a handful of

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2013-01-16 Thread Dave Chinner
On Wed, Jan 16, 2013 at 04:35:43PM -0800, Glauber Costa wrote: The superblocks only, are present by the dozens even in a small system, and I believe the whole goal of this API is to get more users to switch to it. This can easily use up a respectable bunch of megs. Isn't it a bit too

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2012-12-20 Thread Dave Chinner
On Thu, Dec 20, 2012 at 03:21:26PM +0400, Glauber Costa wrote: > On 11/28/2012 03:14 AM, Dave Chinner wrote: > > From: Dave Chinner > > > > Now that we have an LRU list API, we can start to enhance the > > implementation. This splits the single LRU list into per-node lists > > and locks to

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2012-12-20 Thread Glauber Costa
On 11/28/2012 03:14 AM, Dave Chinner wrote: > From: Dave Chinner > > Now that we have an LRU list API, we can start to enhance the > implementation. This splits the single LRU list into per-node lists > and locks to enhance scalability. Items are placed on lists > according to the node the

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2012-12-20 Thread Glauber Costa
On 11/28/2012 03:14 AM, Dave Chinner wrote: From: Dave Chinner dchin...@redhat.com Now that we have an LRU list API, we can start to enhance the implementation. This splits the single LRU list into per-node lists and locks to enhance scalability. Items are placed on lists according to the

Re: [PATCH 09/19] list_lru: per-node list infrastructure

2012-12-20 Thread Dave Chinner
On Thu, Dec 20, 2012 at 03:21:26PM +0400, Glauber Costa wrote: On 11/28/2012 03:14 AM, Dave Chinner wrote: From: Dave Chinner dchin...@redhat.com Now that we have an LRU list API, we can start to enhance the implementation. This splits the single LRU list into per-node lists and locks

[PATCH 09/19] list_lru: per-node list infrastructure

2012-11-27 Thread Dave Chinner
From: Dave Chinner Now that we have an LRU list API, we can start to enhance the implementation. This splits the single LRU list into per-node lists and locks to enhance scalability. Items are placed on lists according to the node the memory belongs to. To make scanning the lists efficient,

[PATCH 09/19] list_lru: per-node list infrastructure

2012-11-27 Thread Dave Chinner
From: Dave Chinner dchin...@redhat.com Now that we have an LRU list API, we can start to enhance the implementation. This splits the single LRU list into per-node lists and locks to enhance scalability. Items are placed on lists according to the node the memory belongs to. To make scanning the