Merge tag 'v3.10.59' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / mm / ksm.c
index b6afe0c440d8b3e500f4a09e2875491c7d70199a..e0b9a325b351e0b4c7dd48a167358c25ab8d0286 100644 (file)
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -444,7 +444,7 @@ static void break_cow(struct rmap_item *rmap_item)
 static struct page *page_trans_compound_anon(struct page *page)
 {
        if (PageTransCompound(page)) {
-               struct page *head = compound_trans_head(page);
+               struct page *head = compound_head(page);
                /*
                 * head may actually be splitted and freed from under
                 * us but it's ok here.
@@ -1714,7 +1714,9 @@ static int ksmd_should_run(void)
 static int ksm_scan_thread(void *nothing)
 {
        set_freezable();
-       set_user_nice(current, 5);
+       // M: set KSMD's priority to the lowest value
+       set_user_nice(current, 19);
+       //set_user_nice(current, 5);
 
        while (!kthread_should_stop()) {
                mutex_lock(&ksm_thread_mutex);