ext4: Speedup WB_SYNC_ALL pass called from sync(2)

When doing filesystem wide sync, there's no need to force transaction
commit (or synchronously write inode buffer) separately for each inode
because ext4_sync_fs() takes care of forcing commit at the end (VFS
takes care of flushing buffer cache, respectively). Most of the time
this slowness doesn't manifest because previous WB_SYNC_NONE writeback
doesn't leave much to write but when there are processes aggressively
creating new files and several filesystems to sync, the sync slowness
can be noticeable. In the following test script sync(1) takes around 6
minutes when there are two ext4 filesystems mounted on a standard SATA
drive. After this patch sync takes a couple of seconds so we have about
two orders of magnitude improvement.

      function run_writers
      {
        for (( i = 0; i < 10; i++ )); do
          mkdir $1/dir$i
          for (( j = 0; j < 40000; j++ )); do
            dd if=/dev/zero of=$1/dir$i/$j bs=4k count=4 &>/dev/null
          done &
        done
      }

      for dir in "$@"; do
        run_writers $dir
      done

      sleep 40
      time sync

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Enhance power efficiency: Series of patches from NVIDIA on some critical blocking code paths to allow the CPU to relax instead of busy spinning thus lowering the load_average and lowering power consumption.

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
cpufreq: Adaptive governor

This driver adds a dynamic cpufreq policy governor
designed for latency-sensitive workloads and also for demanding
performance.
This governor attempts to reduce the latency of clock
increases so that the system is more responsive to
interactive workloads in loweset steady-state but to
to reduce power consumption in middle operation level level up
will be done in step by step to prohibit system from going to
max operation level.

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
cpufreq: Nightmare governor

A PegasusQ modified, less aggressive and more stable. A good compromise between performance and battery.
In addition to the SoD is a prevention because it usually does not hotplug.

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Added abyssplug and added some fixes for abyss some changes on Nightmare gov

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Add support of kcpustats insteat of kstat_cpu

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
updated nightmare gov for propper build on 3.xx kernel and some fixes for falcon

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ARM:msm Hotplug: Experimental Klozz_hotplug New generic plug for ARM SoC's

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
updated klozz_hotplug

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Added new gobernor Alessa PS2:[PATCH 1/2] cpufreq: Introduce new relation for freq selection PS3: workqueue: make deferrable delayed_work initializer names consistent PS4: Alessa gob updates to make more customizable

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Add module version on klozz hotplug

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
cpufreq: Create a helper function to get CPU utilization Use the new cpufreq_quick_get_util function in klozz_hotplug driver

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
cpufreq: Increase utilization threshold to 25

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
cpufreq: Save user policy min/max instead of policy min/max during ho…

…tplug

When a CPU is hotplugged off, various fields of the policy are saved so
that they can be restored when the CPU is hotplugged back in.

The existing code saves the policy min/max field during hotplug remove and
restores it into user policy min/max during hotplug add. This results in
the loss of the user policy min/max values across a hotplug remove/add.

Fix it by saving the user policy min/max instead of policy min/max during
hotplug remove. During a hotplug add, after user policy min/max is
restored, the policy min/max is already recomputed. So, there's no risk of
going beyound any limits imposed by the CPUFREQ_ADJUST/INCOMPATIBLE notifiers.

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
cpufreq: Initial CPU utilization should be 0

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Update klozz_hotplug to v1.4 added a lot of improvements and added function for enable and disable because the first release stay all the time enabled.

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Added some configuration to make compatible with Falcon MSM8226 add some stuff on intelli_plug

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
wake_timeout: increase delay to ensure panel is shut down properly hotplug i dont remember what i changed

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
wake_timeout: fully disable wake functions if s2w and dt2w are disabled while screen is off

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
wake_timeout: do not start wake timeout if s2w and dt2w are disabled

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>