Skip to contentSkip to conversation

shrink_slab(), shrinkers and aggresivity

DISCUSSION Robert Jarzmik 1 participant 1 message Sep 10, 2013 Memory management

lore
Share & tools
lore
#0 lore raw

Hi,

I was wondering if there was such a notion as "shrinkers aggresivity". Or, in other words, I wondered why shrink_slab(), in its parameters, doesn't have the priority, ie. the (struct scan_control)->priority.

The usecase I have in mind would be a shrinker which behaves differently, depending on this priority :
- if priority is low, only drop a subset of its objects, the "cold objects"
- if priority is high, drop each and every possible object

In a GPU cache for example, they are objects that are not used anymore in the GPU, but some are still mapped into the GPU's MMU table. The GPU MMU manipulation being costly, such a shrinker would :
- on low priority, consider only the GPU MMU unmapped objects
- on high prioriy, consider all GPU objects

Is it in the shrinker definition that no priority should ever be considered, is it silly to consider having priority in (struct shrink_control) ?

Thanks in advance for your explanation.

Signature · 7 lines
Robert

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>