Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 22 Mar 2001 18:20:01 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 22 Mar 2001 18:19:49 -0500 Received: from perninha.conectiva.com.br ([200.250.58.156]:15883 "HELO postfix.conectiva.com.br") by vger.kernel.org with SMTP id ; Thu, 22 Mar 2001 18:19:36 -0500 Date: Thu, 22 Mar 2001 20:16:44 -0300 (BRST) From: Rik van Riel X-X-Sender: To: Richard Jerrell Cc: Subject: Re: [PATCH] mm/memory.c, 2.4.1 : memory leak with swap cache (updated) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 22 Mar 2001, Richard Jerrell wrote: > 2.4.1 has a memory leak (temporary) where anonymous memory pages > that have been moved into the swap cache will stick around after > their vma has been unmapped by the owning process. > free_pte in mm/memory.c has been modified to check to see if the > page is only being referenced by the swap cache Your idea is nice, but the patch lacks a few things: - SMP locking, what if some other process faults in this page between the atomic_read of the page count and the test later? - testing if our process is the _only_ user of this swap page, for eg. apache you'll have lots of COW-shared pages .. it would be good to keep the page in memory for our siblings regards, Rik -- Linux MM bugzilla: http://linux-mm.org/bugzilla.shtml Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose... http://www.surriel.com/ http://www.conectiva.com/ http://distro.conectiva.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/