Makefile:O3 Optimisations

Better optimisation then O2
Left out one more for O3 Optimisation
smdk4412: don't use threaded vsync

The gralloc for smdk4412 waits for vsync. Having
threaded vsync in this case would be problematic
provided our gralloc implementation is different
from that of samsung.

Change-Id: I6c9a84c2bd00a43b47d86647829b9010367dca5d

Conflicts:
	arch/arm/configs/veldaria_i9300_defconfig
n7100: disable threaded vsync

Change-Id: Ia8d7b7a08421e0a1798783f5d43127ed2fbb7d5b

Conflicts:
	arch/arm/configs/veldaria_n7100_defconfig
Asynchronous I/O latency to a solid-state disk greatly increased
between the 2.6.32 and 3.0 kernels. By removing the plug from
do_io_submit(), we observed a 34% improvement in the I/O latency.

Unfortunately, at this level, we don't know if the request is to
a rotating disk or not.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: linux-aio@kvack.org
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jeff Moyer <jmoyer@redhat.com>

Change-Id: Ida3aaade7ec1f3429be142d9f5a380eac992176c
cpufreq: update governors

Change-Id: I8251b29369bac693560f68251045a9689d0e40ce

Conflicts:
	drivers/cpufreq/cpufreq_pegasusq.c

Change-Id: I04044dfbfde60ebd7015a438b93b1a1f7c610e2a
add extra free kbytes tunable

Add a userspace visible knob to tell the VM to keep an extra amount
of memory free, by increasing the gap between each zone's min and
low watermarks.

This is useful for realtime applications that call system
calls and have a bound on the number of allocations that happen
in any short time period.  In this application, extra_free_kbytes
would be left at an amount equal to or larger than than the
maximum number of allocations that happen in any burst.

It may also be useful to reduce the memory use of virtual
machines (temporarily?), in a way that does not cause memory
fragmentation like ballooning does.

[ccross]
Revived for use on old kernels where no other solution exists.
The tunable will be removed on kernels that do better at avoiding
direct reclaim.

Change-Id: I765a42be8e964bfd3e2886d1ca85a29d60c3bb3e
Signed-off-by: Rik van Riel<riel@redhat.com>
Signed-off-by: Colin Cross <ccross@android.com>
mm: fix extra_free_kbytes tunable for CMA

Change-Id: Ib707811881c6e2c8fd1033b522d05a7249da7247
drm/exynos: mixer: set correct mode for range of resolutions

With this patch, mixer driver find the correct resolution mode for
the range of resolutions, upto 1080 vertical lines. Resolution will
be categorized to NTSC SD, PAL SD or HD and the correct mode is
set to the mixer configuration register.

Change-Id: I34fc6ef661c5c2b7650c2c038319aa7e14556fc3
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drm/exynos: fix buffer pitch calculation

Change-Id: Ia0f536eec9d1f12bd8a6377f5b87807a651fd65c
Signed-off-by: Cooper Yuan <cooperyuan@gmail.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drm/exynos: Fix potential NULL pointer dereference

drm_mode_create() returns NULL if it fails to create
a new display mode. Check the value returned to avoid NULL
pointer deferencing later.

Change-Id: I2c3747f725eb26becb5436405c93007b85380cdc
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drm/exynos: fix memory leak to EDID block

drm_get_edid() returns a pointer to an EDID block. The caller
is responsible to free this pointer itself.
Here the pointer gets assigned to the local variable raw_edid.
Therefore it should be freed before the variable goes out of
scope.

Change-Id: I00765070377118178c513651fb46c8bb562e71ed
Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drm/exynos: fix to calculate CRTC shown via screen

This patch is to exactly calculate CRTC shown via screen for all cases.
Refer exynos_plane_get_size() function for this. Also source position of
fb is fixed when start position of CRTC is negative number.

Change-Id: I081a4767687317365b31c1a01a810732041079c4
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drm/exynos: return NULL if exynos_pages_to_sg fails

exynos_pages_to_sg() internally calls sg_kmalloc() which can return
no pages when the system is under high memory crunch. One such instance
is chromeos-install in the chromeos. This patch adds check for the return
value of the function in subject to return NULL on failure.

Change-Id: I1b3c66caa42f1e1a36b4362dace8657bd5f47908
Signed-off-by: Subash Patel <subash.ramaswamy@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drm/exynos: fixed build warning.

Change-Id: I995f24f23d269036aaaaee216ab70a7d3cbff1d4
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
cpufreq: add hotplug governor

Change-Id: I07625fd5d3b51ad7413cce3e33c15341705a81c9
sched_fair: Reduce latencies

Change-Id: Idded3a6cb486dc22f7c81fe43a7ed12310df25ac
writeback: Fix occasional slow sync

In case when system contains no dirty pages, wakeup_flusher_threads()
will submit WB_SYNC_NONE writeback for 0 pages so wb_writeback() exits
immediately without doing anything. Thus sync(1) will write all the
dirty inodes from a WB_SYNC_ALL writeback pass which is slow.

Fix the problem by using get_nr_dirty_pages() in
wakeup_flusher_threads() instead of calculating number of dirty pages
manually. That function also takes number of dirty inodes into account.

Change-Id: Iab00df48604d0f56ff7645acc51c4f8ad93b19b0
slub.c: little tweak for performance improvements

Change-Id: Ie14cb4aae1539ffe6963311d560da1e89368ea46
scheduler: compute time-average nr_running per run-queue

Compute the time-average number of running tasks per run-queue for a
trailing window of a fixed time period. The detla add/sub to the
average value is weighted by the amount of time per nr_running value
relative to the total measurement period.

Change-Id: I4b1fa8fee82a549889560ceded4b94bdb811671d
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/108070
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ryan Wong <ryanw@nvidia.com>
Tested-by: Ryan Wong <ryanw@nvidia.com>