Skip to content

Commit

Permalink
Revert "uksm 0.1.2.3"
Browse files Browse the repository at this point in the history
This reverts commit 879dfb6.
  • Loading branch information
kylon committed Jan 16, 2016
1 parent 0f60c8e commit eb0c6df
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 6,552 deletions.
2 changes: 0 additions & 2 deletions Documentation/vm/00-INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ hwpoison.txt
- explains what hwpoison is
ksm.txt
- how to use the Kernel Samepage Merging feature.
uksm.txt
- Introduction to Ultra KSM
locking
- info on how locking and synchronization is done in the Linux vm code.
map_hugetlb.c
Expand Down
58 changes: 0 additions & 58 deletions Documentation/vm/uksm.txt

This file was deleted.

2 changes: 1 addition & 1 deletion fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
#include <linux/pipe_fs_i.h>
#include <linux/oom.h>
#include <linux/compat.h>
#include <linux/ksm.h>

#include <asm/uaccess.h>
#include <asm/mmu_context.h>
Expand Down Expand Up @@ -2296,3 +2295,4 @@ int dump_seek(struct file *file, loff_t off)
return ret;
}
EXPORT_SYMBOL(dump_seek);

6 changes: 0 additions & 6 deletions fs/proc/meminfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
"SUnreclaim: %8lu kB\n"
"KernelStack: %8lu kB\n"
"PageTables: %8lu kB\n"
#ifdef CONFIG_UKSM
"KsmZeroPages: %8lu kB\n"
#endif
#ifdef CONFIG_QUICKLIST
"Quicklists: %8lu kB\n"
#endif
Expand Down Expand Up @@ -149,9 +146,6 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
K(global_page_state(NR_SLAB_UNRECLAIMABLE)),
global_page_state(NR_KERNEL_STACK) * THREAD_SIZE / 1024,
K(global_page_state(NR_PAGETABLE)),
#ifdef CONFIG_UKSM
K(global_page_state(NR_UKSM_ZERO_PAGES)),
#endif
#ifdef CONFIG_QUICKLIST
K(quicklist_total_size()),
#endif
Expand Down
44 changes: 15 additions & 29 deletions include/linux/ksm.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ struct page *ksm_does_need_to_copy(struct page *page,
#ifdef CONFIG_KSM
int ksm_madvise(struct vm_area_struct *vma, unsigned long start,
unsigned long end, int advice, unsigned long *vm_flags);
int __ksm_enter(struct mm_struct *mm);
void __ksm_exit(struct mm_struct *mm);

static inline int ksm_fork(struct mm_struct *mm, struct mm_struct *oldmm)
{
if (test_bit(MMF_VM_MERGEABLE, &oldmm->flags))
return __ksm_enter(mm);
return 0;
}

static inline void ksm_exit(struct mm_struct *mm)
{
if (test_bit(MMF_VM_MERGEABLE, &mm->flags))
__ksm_exit(mm);
}

/*
* A KSM page is one of those write-protected "shared pages" or "merged pages"
Expand Down Expand Up @@ -75,33 +90,6 @@ int rmap_walk_ksm(struct page *page, int (*rmap_one)(struct page *,
struct vm_area_struct *, unsigned long, void *), void *arg);
void ksm_migrate_page(struct page *newpage, struct page *oldpage);

#ifdef CONFIG_KSM_LEGACY
int __ksm_enter(struct mm_struct *mm);
void __ksm_exit(struct mm_struct *mm);
static inline int ksm_fork(struct mm_struct *mm, struct mm_struct *oldmm)
{
if (test_bit(MMF_VM_MERGEABLE, &oldmm->flags))
return __ksm_enter(mm);
return 0;
}

static inline void ksm_exit(struct mm_struct *mm)
{
if (test_bit(MMF_VM_MERGEABLE, &mm->flags))
__ksm_exit(mm);
}

#elif defined(CONFIG_UKSM)
static inline int ksm_fork(struct mm_struct *mm, struct mm_struct *oldmm)
{
return 0;
}

static inline void ksm_exit(struct mm_struct *mm)
{
}
#endif /* !CONFIG_UKSM */

#else /* !CONFIG_KSM */

static inline int ksm_fork(struct mm_struct *mm, struct mm_struct *oldmm)
Expand Down Expand Up @@ -154,6 +142,4 @@ static inline void ksm_migrate_page(struct page *newpage, struct page *oldpage)
#endif /* CONFIG_MMU */
#endif /* !CONFIG_KSM */

#include <linux/uksm.h>

#endif /* __LINUX_KSM_H */
3 changes: 0 additions & 3 deletions include/linux/mm_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,6 @@ struct vm_area_struct {
#ifdef CONFIG_NUMA
struct mempolicy *vm_policy; /* NUMA policy for the VMA */
#endif
#ifdef CONFIG_UKSM
struct vma_slot *uksm_vma_slot;
#endif
};

struct core_thread {
Expand Down
5 changes: 1 addition & 4 deletions include/linux/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ enum zone_stat_item {
NUMA_OTHER, /* allocation from other node */
#endif
NR_ANON_TRANSPARENT_HUGEPAGES,
#ifdef CONFIG_UKSM
NR_UKSM_ZERO_PAGES,
#endif
NR_VM_ZONE_STAT_ITEMS };

/*
Expand Down Expand Up @@ -763,7 +760,7 @@ static inline int is_normal_idx(enum zone_type idx)
}

/**
* is_highmem - helper function to quickly check if a struct zone is a
* is_highmem - helper function to quickly check if a struct zone is a
* highmem zone or not. This is an attempt to keep references
* to ZONE_{DMA/NORMAL/HIGHMEM/etc} in general code to a minimum.
* @zone - pointer to struct zone variable
Expand Down
77 changes: 0 additions & 77 deletions include/linux/sradix-tree.h

This file was deleted.

Loading

0 comments on commit eb0c6df

Please sign in to comment.