lkml.org 
[lkml]   [2002]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] swap 4/4 redundant SwapCache checks
PageSwapCache tests whether mapping is &swapper_space, so it's just
a waste of time for __free_pages_ok, balance_classzone, rw_swap_page
and rw_swap_page_nolock to check both mapping and PageSwapCache. And
__free_pages_ok just did lru_cache_del if PageLRU, so don't recheck it.

--- 2.4.19-pre10/mm/page_alloc.c Tue Jun 4 13:54:19 2002
+++ linux/mm/page_alloc.c Tue Jun 11 19:02:30 2002
@@ -88,12 +88,8 @@
BUG();
if (!VALID_PAGE(page))
BUG();
- if (PageSwapCache(page))
- BUG();
if (PageLocked(page))
BUG();
- if (PageLRU(page))
- BUG();
if (PageActive(page))
BUG();
page->flags &= ~((1<<PG_referenced) | (1<<PG_dirty));
@@ -280,8 +276,6 @@
if (page->mapping)
BUG();
if (!VALID_PAGE(page))
- BUG();
- if (PageSwapCache(page))
BUG();
if (PageLocked(page))
BUG();
--- 2.4.19-pre10/mm/page_io.c Tue Jun 11 19:02:30 2002
+++ linux/mm/page_io.c Tue Jun 11 19:02:30 2002
@@ -97,8 +97,6 @@
PAGE_BUG(page);
if (!PageSwapCache(page))
PAGE_BUG(page);
- if (page->mapping != &swapper_space)
- PAGE_BUG(page);
if (!rw_swap_page_base(rw, entry, page))
UnlockPage(page);
}
@@ -113,8 +111,6 @@
struct page *page = virt_to_page(buf);

if (!PageLocked(page))
- PAGE_BUG(page);
- if (PageSwapCache(page))
PAGE_BUG(page);
if (page->mapping)
PAGE_BUG(page);
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:26    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site