Re: [PATCH v10 08/35] list: add a new LRU list type

Andrew Morton
2013-06-06T07:04:09Z

On Thu, 6 Jun 2013 14:44:26 +1000 Dave Chinner <david@fromorbit.com> wrote:

> > Why was it called "lru", btw? iirc it's actually a "stack" (or
> > "queue"?) and any lru functionality is actually implemented externally.
>
> Because it's a bunch of infrastructure and helper functions that
> callers use to implement a list based LRU that tightly integrates
> with the shrinker infrastructure. ;)
>
> I'm open to a better name - something just as short and concise
> would be nice ;)

Not a biggie, but it's nice to get these things exact on day one.

"queue"? Because someone who wants a queue is likely to look at
list_lru.c and think "hm, that's no good". Whereas if it's queue.c
then they're more likely to use it. Then start cursing at its
internal spin_lock() :)

But anyone who just wants a queue doesn't want their queue_lru_del()
calling into memcg code(!). I do think it would be more appropriate to
discard the lib/ idea and move it all into fs/ or mm/.

--
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: email@kvack.org