/* Trim down the number of pages in the quicklist  */
void quicklist_trim(int nr, void(*dtor)(void *), unsigned long min_pages, unsigned long max_free)
/* Trim down the number of pages in the quicklist  */
void quicklist_trim(int nr, void(*dtor)(void *), unsigned long min_pages, unsigned long max_free)
{
	long pages_to_free;
	struct quicklist *q;
	q = &get_cpu_var(quicklist)[nr];
	if (q->nr_pages > min_pages) {
		pages_to_free = min_pages_to_free(q, min_pages, max_free);
		while (pages_to_free > 0) {
			void *p = quicklist_alloc(nr, 0, NULL);
			if (dtor)
				dtor(p);
			free_page((unsigned long)p);
			pages_to_free--;
		}
	}
	put_cpu_var(quicklist);
}