From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (localhost [127.0.0.1]) by several.ru (Postfix) with ESMTP id 27446132CDF for ; Sun, 16 Jan 2005 19:30:56 +0300 (MSK) Received: from several.ru ([127.0.0.1]) by localhost (several.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00901-06 for ; Sun, 16 Jan 2005 19:30:55 +0300 (MSK) Received: from tv-sign.ru (unknown [217.23.131.158]) by several.ru (Postfix) with ESMTP id 3A87C132CDF for ; Sun, 16 Jan 2005 19:30:55 +0300 (MSK) Message-ID: <41EAA59C.B6987930@tv-sign.ru> Date: Sun, 16 Jan 2005 20:34:20 +0300 From: Oleg Nesterov MIME-Version: 1.0 Subject: Re: Q: shrink_cache() vs release_pages() page->lru management References: <41EAA2AD.C7D37D1B@tv-sign.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: linux-mm@kvack.org List-ID: Another attempt, message was truncated... shrink_cache: if (get_page_testone(page)) { __put_page(page); SetPageLRU(page); list_add(&page->lru, &zone->inactive_list); continue; } Is it really necessary to re-add the page to inactive_list? It seems to me that shrink_cache() can just do: if (get_page_testone(page)) { __put_page(page); --zone->nr_inactive; continue; } When the __page_cache_release (or whatever) takes zone->lru_lock it must check PG_lru before del_page_from_lru(). The same question applies to refill_inactive_zone(). Thanks, Oleg. -- 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: aart@kvack.org