Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 27 Apr 2001 07:30:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 27 Apr 2001 07:30:00 -0400 Received: from perninha.conectiva.com.br ([200.250.58.156]:48146 "HELO perninha.conectiva.com.br") by vger.kernel.org with SMTP id ; Fri, 27 Apr 2001 07:29:50 -0400 Date: Fri, 27 Apr 2001 06:50:01 -0300 (BRT) From: Marcelo Tosatti To: Linus Torvalds Cc: lkml Subject: [PATCH] allow PF_MEMALLOC tasks to directly reclaim pages 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 Linus, Currently __alloc_pages() does not allow PF_MEMALLOC tasks to free clean inactive pages. This is senseless --- if the allocation has __GFP_WAIT set, its ok to grab the pagemap_lru_lock/pagecache_lock/etc. I checked all possible codepaths after reclaim_page() and they are ok. The following patch fixes that. --- linux/mm/page_alloc.c.orig Fri Apr 27 05:59:35 2001 +++ linux/mm/page_alloc.c Fri Apr 27 05:59:48 2001 @@ -295,8 +295,7 @@ * Can we take pages directly from the inactive_clean * list? */ - if (order == 0 && (gfp_mask & __GFP_WAIT) && - !(current->flags & PF_MEMALLOC)) + if (order == 0 && (gfp_mask & __GFP_WAIT)) direct_reclaim = 1; /* - 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/