Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 12 Dec 2002 11:53:02 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 12 Dec 2002 11:53:02 -0500 Received: from rumms.uni-mannheim.de ([134.155.50.52]:9601 "EHLO rumms.uni-mannheim.de") by vger.kernel.org with ESMTP id ; Thu, 12 Dec 2002 11:53:00 -0500 From: Thomas Schlichter Message-ID: <1039712449.3df8c0c183dfe@rumms.uni-mannheim.de> Date: Thu, 12 Dec 2002 18:00:49 +0100 To: linux-kernel Subject: Pinning kernel memory MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT User-Agent: Internet Messaging Program (IMP) 3.0 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1006 Lines: 26 Hello, I want to create a big area of unswappable, physical continuous kernel memory for hardware testing purposes. Currently I allocate the memory using alloc_pages(GFP_KERNEL, order) and after this I pin it using SetPageReserved(page) for each page. Is this acceptable, or may it happen that after the alloc_pages()-call the kswapd begins to swap out this memory and just any other memory is pinned?? Do I perhaps have to lock the mm->page_table_lock and test each page before I pin it?? If it is swapped out, how can I assure to get this page back swapped in? is SetPageReserved the right way to pin a memory page, or should SetPageActive(page) or even LockPage(page) be used?? I hope anyone can help me... Thank you! Sincerely yours Thomas Schlichter - 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/