Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263154AbUC2WZC (ORCPT ); Mon, 29 Mar 2004 17:25:02 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263159AbUC2WZC (ORCPT ); Mon, 29 Mar 2004 17:25:02 -0500 Received: from bay-bridge.veritas.com ([143.127.3.10]:11683 "EHLO MTVMIME02.enterprise.veritas.com") by vger.kernel.org with ESMTP id S263154AbUC2WY4 (ORCPT ); Mon, 29 Mar 2004 17:24:56 -0500 Date: Mon, 29 Mar 2004 23:24:58 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@localhost.localdomain To: Andrew Morton cc: Andrea Arcangeli , , , Subject: Re: [RFC][PATCH 1/3] radix priority search tree - objrmap complexity fix In-Reply-To: <20040329124027.36335d93.akpm@osdl.org> 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: 763 Lines: 22 On Mon, 29 Mar 2004, Andrew Morton wrote: > > hmm, yes, we have pages which satisfy PageSwapCache(), but which are not > actually in swapcache. > > How about we use the normal pagecache APIs for this? > > + add_to_page_cache(page, &swapper_space, entry.val, GFP_NOIO); >... > + remove_from_page_cache(page); Much nicer, and it'll probably appear to work: but (also untested) I bet you'll need an additional page_cache_release(page) - damn, looks like hugetlbfs has found a use for that tiresome asymmetry. Hugh - 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/