Question about __zone_reclaim()
Hi!
I have a question about __zone_reclaim() function:
mm/vmscan.c:
static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
{
<cut>
nr_slab_pages0 = zone_page_state(zone, NR_SLAB_RECLAIMABLE);
if (nr_slab_pages0 > zone->min_slab_pages) {
<cut>
for (;;) {
unsigned long lru_pages = zone_reclaimable_pages(zone);
/* No reclaimable slab or very low memory pressure */
if (!shrink_slab(&shrink, sc.nr_scanned, lru_pages))
break;
/* Freed enough memory */
nr_slab_pages1 = zone_page_state(zone,
NR_SLAB_RECLAIMABLE);
if (nr_slab_pages1 + nr_pages <= nr_slab_pages0)
break;
}
<cut>Why we don't stop the for cycle if we meet zone->min_slab_pages watermark?
Is it an issue or do I miss something?
IMHO, we should add something like this:
if (nr_slab_pages1 < zone->min_slab_pages)
break;Thank you!
Regards,
Roman
--
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>