lkml.org 
[lkml]   [2003]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] swap 03/13 add_to_swap_cache
Make add_to_swap_cache static, it's only used by read_swap_cache_async;
and since that has just done a GFP_HIGHUSER allocation, surely it's
better for add_to_swap_cache to use GFP_KERNEL than GFP_ATOMIC.

--- swap02/include/linux/swap.h Tue Mar 25 20:43:07 2003
+++ swap03/include/linux/swap.h Tue Mar 25 20:43:18 2003
@@ -197,7 +197,6 @@
extern struct address_space swapper_space;
#define total_swapcache_pages swapper_space.nrpages
extern void show_swap_cache_info(void);
-extern int add_to_swap_cache(struct page *, swp_entry_t);
extern int add_to_swap(struct page *);
extern void __delete_from_swap_cache(struct page *);
extern void delete_from_swap_cache(struct page *);
--- swap02/mm/swap_state.c Wed Mar 5 07:26:34 2003
+++ swap03/mm/swap_state.c Tue Mar 25 20:43:18 2003
@@ -68,7 +68,7 @@
swap_cache_info.noent_race, swap_cache_info.exist_race);
}

-int add_to_swap_cache(struct page *page, swp_entry_t entry)
+static int add_to_swap_cache(struct page *page, swp_entry_t entry)
{
int error;

@@ -78,7 +78,7 @@
INC_CACHE_INFO(noent_race);
return -ENOENT;
}
- error = add_to_page_cache(page, &swapper_space, entry.val, GFP_ATOMIC);
+ error = add_to_page_cache(page, &swapper_space, entry.val, GFP_KERNEL);
/*
* Anon pages are already on the LRU, we don't run lru_cache_add here.
*/
-
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:34    [W:1.254 / U:0.572 seconds]
©2003-2014 Jasper Spaans. Advertise on this site