mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] allow PF_MEMALLOC tasks to directly reclaim pages
@ 2001-04-27  9:50 Marcelo Tosatti
  2001-04-27 18:28 ` Mark Hemment
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2001-04-27  9:50 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: lkml


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;
 
 	/*



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-04-27 19:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-27  9:50 [PATCH] allow PF_MEMALLOC tasks to directly reclaim pages Marcelo Tosatti
2001-04-27 18:28 ` Mark Hemment

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®