hhoffstaette / kernel-patches

Custom Linux kernel patches
39 stars 7 forks source link

mm-20170123-003-remove-old-flusher-wakeup-from-direct-reclaim-path.patch is rejected #8

Closed FadeMind closed 7 years ago

FadeMind commented 7 years ago

@hhoffstaette hi

After applying MM patches one of them is rejected

mm-20170123-003-remove-old-flusher-wakeup-from-direct-reclaim-path.patch

at

--- mm/vmscan.c
+++ mm/vmscan.c
@@ -2757,8 +2757,6 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
                      struct scan_control *sc)
 {
    int initial_priority = sc->priority;
-   unsigned long total_scanned = 0;
-   unsigned long writeback_threshold;
 retry:
    delayacct_freepages_start();

I hard workaround issue via

--- a/mm/vmscan.c   2017-01-30 12:03:43.000000000 +0100
+++ b/mm/vmscan.c   2017-01-30 12:11:27.117474754 +0100
@@ -2785,8 +2785,6 @@
                      struct scan_control *sc)
 {
    int initial_priority = sc->priority;
-   unsigned long total_scanned = 0;
-   unsigned long writeback_threshold;
    void *save = current->journal_info; /* save journal info */
    current->journal_info = NULL;
 retry:
@@ -2801,7 +2799,6 @@
        sc->nr_scanned = 0;
        shrink_zones(zonelist, sc);

-       total_scanned += sc->nr_scanned;
        if (sc->nr_reclaimed >= sc->nr_to_reclaim)
            break;

@@ -2815,19 +2812,6 @@
        if (sc->priority < DEF_PRIORITY - 2)
            sc->may_writepage = 1;

-       /*
-        * Try to write back as many pages as we just scanned.  This
-        * tends to cause slow streaming writers to write data to the
-        * disk smoothly, at the dirtying rate, which is nice.   But
-        * that's undesirable in laptop mode, where we *want* lumpy
-        * writeout.  So in laptop mode, write out the whole world.
-        */
-       writeback_threshold = sc->nr_to_reclaim + sc->nr_to_reclaim / 2;
-       if (total_scanned > writeback_threshold) {
-           wakeup_flusher_threads(laptop_mode ? 0 : total_scanned,
-                       WB_REASON_VMSCAN);
-           sc->may_writepage = 1;
-       }
    } while (--sc->priority >= 0);

    delayacct_freepages_end();
hhoffstaette commented 7 years ago

I don't know what you are doing?

>tar xf linux-4.9.6.tar.xz 
>cd linux-4.9.6 
>~holger/Projects/kernel-patches/apply.sh
Applying patches from: /home/holger/Projects/kernel-patches/4.9.6..done! :)

This is against the official 4.9.6 tarball from kernel.org.

FadeMind commented 7 years ago

My fault I using tmp cache in RAM and I forgot clear them via:

sudo bash -c 'free -h && sync && echo 3 > /proc/sys/vm/drop_caches && free -h'