From raybry@sgi.com Fri Jul 1 15:40:47 2005 Date: Fri, 1 Jul 2005 15:40:45 -0700 (PDT) From: Ray Bryant To: Hirokazu Takahashi , Marcelo Tosatti , Andi Kleen , Dave Hansen Cc: Christoph Hellwig , linux-mm , Nathan Scott , Ray Bryant , lhms-devel@lists.sourceforge.net, Ray Bryant , Paul Jackson , clameter@sgi.com Subject: [PATCH 2.6.13-rc1 1/11] mm: hirokazu-steal_page_from_lru.patch Hi Dave, Would you apply the following patch right after AA-PM-01-steal_page_from_lru.patch. This patch makes steal_page_from_lru() and putback_page_to_lru() check PageLRU() with zone->lur_lock held. Currently the process migration code, where Ray is working on, only uses this code. Thanks, Hirokazu Takahashi. Signed-off-by: Hirokazu Takahashi --- linux-2.6.12-rc3-taka/include/linux/mm_inline.h | 8 +++++--- 1 files changed, 5 insertions, 3 deletions diff -puN include/linux/mm_inline.h~taka-steal_page_from_lru-FIX include/linux/mm_inline.h --- linux-2.6.12-rc3/include/linux/mm_inline.h~taka-steal_page_from_lru-FIX Mon May 23 02:26:57 2005 +++ linux-2.6.12-rc3-taka/include/linux/mm_inline.h Mon May 23 02:26:57 2005 @@ -80,9 +80,10 @@ static inline int steal_page_from_lru(struct zone *zone, struct page *page, struct list_head *dst) { - int ret; + int ret = 0; spin_lock_irq(&zone->lru_lock); - ret = __steal_page_from_lru(zone, page, dst); + if (PageLRU(page)) + ret = __steal_page_from_lru(zone, page, dst); spin_unlock_irq(&zone->lru_lock); return ret; } @@ -102,7 +103,8 @@ static inline void putback_page_to_lru(struct zone *zone, struct page *page) { spin_lock_irq(&zone->lru_lock); - __putback_page_to_lru(zone, page); + if (!PageLRU(page)) + __putback_page_to_lru(zone, page); spin_unlock_irq(&zone->lru_lock); } _ ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click _______________________________________________ Lhms-devel mailing list Lhms-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lhms-devel -- Best Regards, Ray ----------------------------------------------- Ray Bryant raybry@sgi.com The box said: "Requires Windows 98 or better", so I installed Linux. -----------------------------------------------