Update of /cvsroot/linuxcompressed/linux26/include/linux
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24075/include/linux
Modified Files:
ccache.h
Added Files:
sysctl.h
Log Message:
vswap now doesnt crash. No de/compression. Interfaces now via sysctl so cc_control module not reqd now.
--- NEW FILE ---
/*
* sysctl.h: General linux system control interface
*
* Begun 24 March 1995, Stephen Tweedie
*
****************************************************************
****************************************************************
**
** The values in this file are exported to user space via
** the sysctl() binary interface. However this interface
** is unstable and deprecated and will be removed in the future.
** For a stable interface use /proc/sys.
**
****************************************************************
****************************************************************
*/
#ifndef _LINUX_SYSCTL_H
#define _LINUX_SYSCTL_H
[...979 lines suppressed...]
/* struct ctl_table_header is used to maintain dynamic lists of
ctl_table trees. */
struct ctl_table_header
{
ctl_table *ctl_table;
struct list_head ctl_entry;
int used;
struct completion *unregistering;
};
struct ctl_table_header * register_sysctl_table(ctl_table * table,
int insert_at_head);
void unregister_sysctl_table(struct ctl_table_header * table);
#else /* __KERNEL__ */
#endif /* __KERNEL__ */
#endif /* _LINUX_SYSCTL_H */
Index: ccache.h
===================================================================
RCS file: /cvsroot/linuxcompressed/linux26/include/linux/ccache.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** ccache.h 11 Jun 2006 20:03:48 -0000 1.5
--- ccache.h 15 Jun 2006 10:24:06 -0000 1.6
***************
*** 5,8 ****
--- 5,31 ----
#include <linux/page-flags.h>
#include <linux/swap.h>
+ #include <linux/sysctl.h>
+
+ /*
+ * limiting size for anon pages: 512MB (arbitrary)
+ * (units of pages: 4k)
+ */
+ #define LIMIT_ANON_CC_SIZE 512*256
+
+ #define MAX_SWAP_OFFSET_SHIFT 24
+ #define MAX_SWAP_OFFSET (1 << MAX_SWAP_OFFSET_SHIFT)
+
+ extern unsigned long max_anon_cc_size, max_fs_backed_cc_size;
+
+ /*
+ * max _uncompressed_ size for ccache
+ * (units of pages: 4k)
+ *
+ * For anon pages, ccache size is limited by 'offset' field (24 bits)
+ * of swp_entry_t (swapped out page identifier).
+ * For page cache pages, this limit is artificial but should never
+ * hurt (1<<24 pages == 64GB!).
+ */
+ extern const unsigned long ccache_size_limit;
struct chunk_head {
***************
*** 26,29 ****
--- 49,54 ----
extern int set_anon_cc_size(unsigned long size);
extern int should_add_to_ccache(struct page *page);
+ extern int sysctl_max_anon_cc_size(ctl_table *table, int write,
+ struct file *file, void __user *buffer, size_t *length, loff_t *ppos);
#endif
|