[lc-checkins] CVS: linux/mm/comp_cache adaptivity.c,1.30,1.31 aux.c,1.33,1.34 minilzo.c,1.1,1.2 swap
Status: Beta
Brought to you by:
nitin_sf
|
From: Rodrigo S. de C. <rc...@us...> - 2002-07-01 18:17:02
|
Update of /cvsroot/linuxcompressed/linux/mm/comp_cache
In directory usw-pr-cvs1:/tmp/cvs-serv7779/mm/comp_cache
Modified Files:
adaptivity.c aux.c minilzo.c swapout.c
Log Message:
Cleanups
o Changes to remove some compiler warnings.
Index: adaptivity.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/comp_cache/adaptivity.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** adaptivity.c 27 Jun 2002 13:17:37 -0000 1.30
--- adaptivity.c 1 Jul 2002 18:16:59 -0000 1.31
***************
*** 2,6 ****
* linux/mm/comp_cache/adaptivity.c
*
! * Time-stamp: <2002-06-27 09:32:53 rcastro>
*
* Linux Virtual Memory Compressed Cache
--- 2,6 ----
* linux/mm/comp_cache/adaptivity.c
*
! * Time-stamp: <2002-07-01 14:54:23 rcastro>
*
* Linux Virtual Memory Compressed Cache
***************
*** 82,86 ****
extern kmem_cache_t * vswap_cachep;
extern unsigned long nr_free_vswap;
- static int wait_scan = 0;
/***
--- 82,85 ----
Index: aux.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/comp_cache/aux.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** aux.c 1 Jul 2002 17:37:29 -0000 1.33
--- aux.c 1 Jul 2002 18:16:59 -0000 1.34
***************
*** 2,6 ****
* linux/mm/comp_cache/aux.c
*
! * Time-stamp: <2002-07-01 13:09:27 rcastro>
*
* Linux Virtual Memory Compressed Cache
--- 2,6 ----
* linux/mm/comp_cache/aux.c
*
! * Time-stamp: <2002-07-01 15:14:12 rcastro>
*
* Linux Virtual Memory Compressed Cache
***************
*** 315,327 ****
BUG();
! if (!PageSwapCache(fragment))
! goto add;
!
entry.val = fragment->index;
-
if (vswap_address(entry))
return;
-
- add:
list_add_tail(&(fragment->lru_queue), &lru_queue);
}
--- 315,328 ----
BUG();
! #ifdef CONFIG_COMP_PAGE_CACHE
! if (!PageSwapCache(fragment)) {
! list_add_tail(&(fragment->lru_queue), &lru_queue);
! return;
! }
! #endif
! /* swap cache page */
entry.val = fragment->index;
if (vswap_address(entry))
return;
list_add_tail(&(fragment->lru_queue), &lru_queue);
}
***************
*** 335,348 ****
#ifdef CONFIG_COMP_PAGE_CACHE
! if (!PageSwapCache(fragment))
! goto add;
#endif
!
! entry.val = fragment->index;
!
if (vswap_address(entry))
return;
-
- add:
list_add(&(fragment->lru_queue), &lru_queue);
}
--- 336,348 ----
#ifdef CONFIG_COMP_PAGE_CACHE
! if (PageSwapCache(fragment)) {
! list_add(&(fragment->lru_queue), &lru_queue);
! return;
! }
#endif
! /* swap cache page */
! entry.val = fragment->index;
if (vswap_address(entry))
return;
list_add(&(fragment->lru_queue), &lru_queue);
}
***************
*** 356,369 ****
#ifdef CONFIG_COMP_PAGE_CACHE
! if (!PageSwapCache(fragment))
! goto remove;
#endif
!
entry.val = fragment->index;
-
if (vswap_address(entry))
return;
-
- remove:
list_del_init(&(fragment->lru_queue));
}
--- 356,368 ----
#ifdef CONFIG_COMP_PAGE_CACHE
! if (PageSwapCache(fragment)) {
! list_del_init(&(fragment->lru_queue));
! return;
! }
#endif
! /* swap cache page */
entry.val = fragment->index;
if (vswap_address(entry))
return;
list_del_init(&(fragment->lru_queue));
}
Index: minilzo.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/comp_cache/minilzo.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** minilzo.c 29 May 2002 21:28:55 -0000 1.1
--- minilzo.c 1 Jul 2002 18:16:59 -0000 1.2
***************
*** 76,82 ****
# include <stddef.h>
# include <linux/string.h>
- # if !defined(NO_STDLIB_H)
- # include <stdlib.h>
- # endif
# define HAVE_MEMCMP
# define HAVE_MEMCPY
--- 76,79 ----
Index: swapout.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/comp_cache/swapout.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -r1.54 -r1.55
*** swapout.c 1 Jul 2002 17:37:30 -0000 1.54
--- swapout.c 1 Jul 2002 18:16:59 -0000 1.55
***************
*** 2,6 ****
* /mm/comp_cache/swapout.c
*
! * Time-stamp: <2002-07-01 14:22:54 rcastro>
*
* Linux Virtual Memory Compressed Cache
--- 2,6 ----
* /mm/comp_cache/swapout.c
*
! * Time-stamp: <2002-07-01 15:14:39 rcastro>
*
* Linux Virtual Memory Compressed Cache
***************
*** 213,217 ****
writeout_fragments(unsigned int gfp_mask, int priority) {
int (*writepage)(struct page *);
! struct list_head * fragment_lh, * tmp_lh;
int maxscan, nrpages, swap_cache_page;
struct comp_cache_fragment * fragment;
--- 213,217 ----
writeout_fragments(unsigned int gfp_mask, int priority) {
int (*writepage)(struct page *);
! struct list_head * fragment_lh;
int maxscan, nrpages, swap_cache_page;
struct comp_cache_fragment * fragment;
***************
*** 310,323 ****
#if 0
! /* That will move all the fragments in this comp page
! * to the beginning of lru queue to be swapped out as
! * soon as possible. This police may improve comp
! * pages usage (fragment distribution). */
! for_each_fragment(tmp_lh, fragment->comp_page) {
! if (tmp_lh != fragment_lh) {
! struct comp_cache_fragment * tmp = list_entry(tmp_lh, struct comp_cache_fragment, list);
! if (!list_empty(&(tmp->lru_queue))) {
! remove_fragment_from_lru_queue(tmp);
! add_fragment_to_lru_queue_tail(tmp);
}
}
--- 310,328 ----
#if 0
! {
! struct list_head * tmp_lh;
!
! /* That will move all the fragments in this comp page
! * to the beginning of lru queue to be swapped out as
! * soon as possible. This police may improve comp
! * pages usage (fragment distribution). */
! for_each_fragment(tmp_lh, fragment->comp_page) {
! if (tmp_lh != fragment_lh) {
! struct comp_cache_fragment * tmp;
! tmp = list_entry(tmp_lh, struct comp_cache_fragment, list);
! if (!list_empty(&(tmp->lru_queue))) {
! remove_fragment_from_lru_queue(tmp);
! add_fragment_to_lru_queue_tail(tmp);
! }
}
}
|