Thread (55 messages) 55 messages, 5 authors, 2013-06-07

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

From: Glauber Costa <hidden>
Date: 2013-01-18 19:10:00
Also in: linux-fsdevel, lkml

On 01/18/2013 12:11 AM, Dave Chinner wrote:
On Thu, Jan 17, 2013 at 04:14:10PM -0800, Glauber Costa wrote:
quoted
On 01/17/2013 04:10 PM, Dave Chinner wrote:
quoted
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?
Yup.
quoted
Would it be acceptable to you?
If it works the way I think it should, then yes.
quoted
We've been of course doing our best to avoid increasing the size of the
objects, therefore this is something we've never mentioned. However, if
it would be acceptable from the fs POV, this would undoubtedly make our
life extremely easier.
I've been trying hard to work out how to avoid increasing the size
of structures as well. But if we can't work out how to implement
something sanely with only a single list head per object to work
from, then increasing the size of objects is something that we need
to consider if it solves all the problems we are trying to solve.

i.e. if adding a second list head makes the code dumb, simple,
obviously correct and hard to break then IMO it's a no-brainer.
But we have to tick all the right boxes first...
One of our main efforts recently has been trying to reduce memcg impact
when it is not in use, even if its compiled in. So what really bothers
me here is the fact that we are increasing the size of dentries and
inodes no matter what.

Still within the idea of exploring the playing field, would an
indirection be worth it ?
We would increase the total per-object memory usage by 8 bytes instead
of 16: the dentry gets a pointer, and a separate allocation for the
list_lru. When memcg is not being actively used, we can allocate a
smaller list_lru, with only the global list. When it is, we allocate the
whole thing.

Embedding the lru is certainly easier from my PoV, the main question is
how much do you, as a fs representative, value those 8 bytes?

--
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help