aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorRyan Pennucci <decimalman@gmail.com>2014-01-16 18:21:20 -0500
committerMister Oyster <oysterized@gmail.com>2017-04-11 10:57:21 +0200
commit9675b60cf579aa46d6a8d49b7cb6c85616b1adaf (patch)
treef59aed3d978918585f5e621d4c2332b860674efa /mm
parentdfd48452b674141e9850ed7cd84866c8deba84cc (diff)
uksm: clean up and remove some (no)inlines
Diffstat (limited to 'mm')
-rw-r--r--mm/uksm.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/mm/uksm.c b/mm/uksm.c
index edcab5d33..499ba4a6c 100644
--- a/mm/uksm.c
+++ b/mm/uksm.c
@@ -3305,7 +3305,7 @@ static inline int in_stable_tree(struct rmap_item *rmap_item)
* scan_vma_one_page() - scan the next page in a vma_slot. Called with
* mmap_sem locked.
*/
-static noinline void scan_vma_one_page(struct vma_slot *slot)
+static void scan_vma_one_page(struct vma_slot *slot)
{
u32 hash;
struct mm_struct *mm;
@@ -3354,12 +3354,6 @@ void uksm_calc_rung_step(struct scan_rung *rung)
{
unsigned long sampled, pages;
- /* will be fully scanned ? */
- if (!rung->cover_msecs) {
- rung->step = 1;
- return;
- }
-
sampled = rung->pages_to_scan;
/*
@@ -3371,7 +3365,7 @@ void uksm_calc_rung_step(struct scan_rung *rung)
sampled = RUNG_SAMPLED_MIN;
pages = rung_get_pages(rung);
- if (likely(pages > sampled))
+ if (pages > sampled)
rung->step = pages / sampled;
else
rung->step = 1;
@@ -3736,7 +3730,7 @@ static inline void free_all_tree_nodes(struct list_head *list)
* stable_tree_delta_hash() - Delta hash the stable tree from previous hash
* strength to the current hash_strength. It re-structures the hole tree.
*/
-static inline void stable_tree_delta_hash(u32 prev_hash_strength)
+static void stable_tree_delta_hash(u32 prev_hash_strength)
{
struct stable_node *node, *tmp;
struct rb_root *root_new_treep;
@@ -4047,7 +4041,7 @@ static inline int rshash_adjust(void)
* round_update_ladder() - The main function to do update of all the
* adjustments whenever a scan round is finished.
*/
-static noinline void round_update_ladder(void)
+static void round_update_ladder(void)
{
int i;
unsigned long dedup;
@@ -4397,9 +4391,9 @@ static inline int hash_round_finished(void)
/**
* uksm_do_scan() - the main worker function.
*/
-static noinline void uksm_do_scan(void)
+static void uksm_do_scan(void)
__attribute__((hot));
-static noinline void uksm_do_scan(void)
+static void uksm_do_scan(void)
{
struct vma_slot *slot, *iter;
struct mm_struct *busy_mm;
@@ -5275,7 +5269,7 @@ static ssize_t eval_intervals_store(struct kobject *kobj,
}
err = strict_strtoul(p, 10, &values[i]);
- if (err) {
+ if (err || !values[i]) {
ret = -EINVAL;
goto out;
}