Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966281AbWKYLrU (ORCPT ); Sat, 25 Nov 2006 06:47:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S935155AbWKYLrU (ORCPT ); Sat, 25 Nov 2006 06:47:20 -0500 Received: from calculon.skynet.ie ([193.1.99.88]:45532 "EHLO calculon.skynet.ie") by vger.kernel.org with ESMTP id S934045AbWKYLrT (ORCPT ); Sat, 25 Nov 2006 06:47:19 -0500 Date: Sat, 25 Nov 2006 11:47:17 +0000 (GMT) From: Mel Gorman X-X-Sender: mel@skynet.skynet.ie To: Hugh Dickins Cc: Linus Torvalds , Christoph Lameter , Linux Memory Management List , Linux Kernel Mailing List Subject: Re: [PATCH 1/11] Add __GFP_MOVABLE flag and update callers In-Reply-To: Message-ID: References: <20061121225022.11710.72178.sendpatchset@skynet.skynet.ie> <20061121225042.11710.15200.sendpatchset@skynet.skynet.ie> <20061123163613.GA25818@skynet.ie> <20061124104422.GA23426@skynet.ie> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2041 Lines: 48 On Fri, 24 Nov 2006, Hugh Dickins wrote: > On Fri, 24 Nov 2006, Mel Gorman wrote: >> >> Good catch. In the page clustering patches I work on, I am doing this; >> >> - page = alloc_page_vma(gfp | __GFP_ZERO, &pvma, 0); >> + page = alloc_page_vma( >> + set_migrateflags(gfp | __GFP_ZERO, __GFP_RECLAIMABLE), >> + &pvma, 0); >> >> to get rid of the MOVABLE flag and replace it with __GFP_RECLAIMABLE. This >> clustered the allocations together with allocations like inode cache. In >> retrospect, this was not a good idea because it assumes that tmpfs and shmem >> pages are short-lived. That may not be the case at all. >> ... >> Thanks for that clarification. I suspected that something like this was the >> case when I removed the MOVABLE flag and used RECLAIMABLE but I wasn't 100% >> certain. In the tests I was running, tmpfs pages weren't a major problem so I >> didn't chase it down. > > I'm fairly confused as to what MOVABLE versus RECLAIMABLE is supposed to > be meaning, and understand it's in flux, so haven't tried too hard. A MOVABLE allocation may be moved with page migration or paged out by kswapd. RECLAIMABLE on the other hand applies to short-lived allocations (like a socket buffer) or allocations for slab caches that may be reaped such as inode caches or dcache. > Just > so long as you understand that tmpfs data pages go out to swap under memory > pressure, whereas ramfs pages do not, and tmpfs swap vector pages do not. > Right, I'll take a much closer look with this in mind and make the distinction. Thanks -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab - 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/