Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 29 Jul 2002 00:16:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 29 Jul 2002 00:16:56 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:6916 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Mon, 29 Jul 2002 00:16:55 -0400 Date: Sun, 28 Jul 2002 21:21:12 -0700 (PDT) From: Linus Torvalds To: "David S. Miller" cc: akpm@zip.com.au, Subject: Re: [patch 2/13] remove pages from the LRU in __free_pages_ok() In-Reply-To: <20020728.204302.44950225.davem@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1360 Lines: 32 On Sun, 28 Jul 2002, David S. Miller wrote: > From a page cache standpoint softirq's are 100% equivalent to > hardware irq's, so that doesn't much help here. > > Wait are we trying to make the final freeing of (potentially) > LRU/page-cache pages from any non-base context illegal? We're not "trying to". It's always been hugely illegal, because we don't protect the LRU lists against interrupts etc, so anything that happens at irq (or bh) time will mess up the LRU lists if it tries to remove a page from them. But the thing is, nobody should normally have a reference to such a page anyway. The only way they happen is by something mapping a page from user space, and saving it away, while the user space goes away and drops its references to the page. And the page cache won't drop its own reference to the page as long as somebody holds on to it - with the extra special case of truncate(), which at least used to remove it from the LRU's before it did that. I think one of Andrews patches undid that truncate() thing, though. I suspect we'll have to fix _that_ patch, not the other paths. Linus - 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/