Added SIO scheduler (set to default)

Change-Id: Ic5a8ed8f3eb008de23fa768267d33d72c3134621

Conflicts:
	include/linux/elevator.h
Deadline tuning thanks to DerTeufel

Change-Id: Ieed33a2ab7f0481d1657df723b68640627e88095
Set default IO scheduler to ROW and merge block&ROW improvements

_________________________________________________________
block: Add support for reinsert a dispatched req
block: Add API for urgent request handling
row: Adding support for reinsert already dispatched req
row: Add support for urgent request handling
block: row: Add some debug information on ROW queues
block: row: Insert dispatch_quantum into struct row_queue
block: row: fix sysfs functions - idle_time conversion
block: row: Aggregate row_queue parameters to one structure

Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
_________________________________________________________
iosched: prevent aliased requests from starving other I/O

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
_________________________________________________________
block: reorganize queue draining
block: reorder elevator switch sequence
block: remove elevator_queue->ops

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
_________________________________________________________

Conflicts:
	arch/arm/configs/cyanogenmod_galaxysbmtd_defconfig
	arch/arm/configs/cyanogenmod_galaxysmtd_defconfig
	block/blk-core.c
	block/elevator.c
	block/row-iosched.c
	include/linux/elevator.h
block: row: hardcode values research by the community

Change-Id: I1eb34c2168f40c829cff0a4244c5fc16b5200ae0
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>

Conflicts:
	block/row-iosched.c
Massive update to IO schedulers

Patches from DerTeufel smdk4412 kernel

Original work of many authors, Individual patches:

block: fiops bias sync workload
block: fiops preserve vios key for deep queue depth workload
block: fiops add ioprio support
block: fiops sync/async scale
block: fiops read/write request scale
block: fiops ioscheduler core
by: Shaohua Li

block: row: Fix starvation tolerance values
by: Maya Erez authored 2 months ago

block: urgent request: Update dispatch_urgent in case of requeue/rein
block: row: Update sysfs functions
block: row: Prevent starvation of regular priority by high priority
block: urgent request: remove unnecessary urgent marking
block: row: Re-design urgent request notification mechanism
block: row: Update initial values of ROW data structures
block: row: Don't notify URGENT if there are un-completed urgent req
block: row: Idling mechanism re-factoring
block: row: Dispatch requests according to their io-priority
block:row: fix idling mechanism in ROW
block: ROW: Correct minimum values of ROW tunable parameters
by: Tatyana Brokhman

block: blk-core: add printk_ratelimit
by: Asutosh Das

block: blk-merge: don't merge the pages with non-contiguous descriptors
by: Subhash Jadavani authored 5 months ago

cfq-iosched: Fix null pointer dereference
by: Sujit Reddy Thumma

block: Add BLKROTATIONAL ioctl
block: Introduce blk_set_stacking_limits function
by: Martin K. Petersen

block: remove WARN_ON_ONCE() in exit_io_context()
block: an exiting task should be allowed to create io_context
block: recursive merge requests
by: Tejun Heo

block: ioc_cgroup_changed() needs to be exported
by: axboe

block, cfq: fix empty queue crash caused by request merge
by: Shaohua Li

block, cfq: move icq creation and rq->elv.icq association to block core
block, cfq: restructure io_cq creation path for io_context interface
block, cfq: move io_cq exit/release to blk-ioc.c
block, cfq: move icq cache management to block core
block, cfq: move io_cq lookup to blk-ioc.c
block, cfq: move cfqd->icq_list to request_queue and add request->elv
block, cfq: reorganize cfq_io_context into generic and cfq specific
block, cfq: replace current_io_context() with create_io_context() …
block, cfq: kill cic->key
block, cfq: kill ioc_gone
block, cfq: remove delayed unlink
block, cfq: unlink cfq_io_context's immediately
block, cfq: fix cic lookup locking
block, cfq: fix race condition in cic creation path and tighten locking
block, cfq: move ioc ioprio/cgroup changed handling to cic
block, cfq: misc updates to cfq_io_context
block, cfq: move cfqd->cic_index to q->id
block: misc updates to blk_get_queue()
Initialize request_count in __make_request
block: make ioc get/put interface more conventional and fix race
block: misc ioc cleanups
block: add missing blk_queue_dead() checks
block: fix drain_all condition in blk_drain_queue()
block: add blk_queue_dead()
block, sx8: kill blk_insert_request()
block: don't call blk_drain_queue() if elevator is not up
block: fix request_queue lifetime handling by making blk_queue_cleanup
block: drop @tsk from attempt_plug_merge() and explain sync rules
block: make get_request[_wait]() fail if queue is dead
block: reorganize throtl_get_tg() and blk_throtl_bio()
block: drop unnecessary blk_get/put_queue() in scsi_cmd_ioctl()
block: reorganize queue draining
block: pass around REQ_* flags instead of broken down booleans during
block: move blk_throtl prototypes to block/blk.h
block: fix genhd refcounting in blkio_policy_parse_and_set()
by: Tejun Heo

blk-throttle: use queue_is_locked() instead of lockdep_is_held()
by: axboe

blk-throttle: Take blkcg->lock while traversing blkcg->policy_list
blk-throttle: Free up policy node associated with deleted rule
by: Vivek Goyal

block: warn if tag is greater than real_max_depth
block: Remove the control of complete cpu from bio
by: taoma-tm

blk-flush: fix invalid BUG_ON in blk_insert_flush
by: Jeff Moyer

block: fix a typo in the blk-cgroup.h file
by: pibroch

ida: make ida_simple_get/put() IRQ saf
by: Tejun Heo

fixlet: Remove fs_excl from struct task.
by: Justin TerAvest

block: strict rq_affinity
by: djbw

block: reorder request_queue to remove 64 bit alignment padding
by: Richard Kennedy

block: document blk_plug list access
block: avoid building too big plug list
by: Shaohua Li

block:fix the comment error in blkdev.h
by: gaowanlong

backing-dev: use synchronize_rcu_expedited instead of synchronize_rcu
by: Mikulas Patocka

compat_ioctl: fix warning caused by qemu
compat_ioctl: fix make headers_check regression
by: Johannes Stezenbach
deadline: Allow 0ms deadline latency, increase the read speed

Change a timer compare from after to after-equals, thus allowing
0 timeout and making deadline schedule FIFO.

Change-Id: I8afcfe43087b09f7881d7e307378169e78682cf4
Signed-off-by: xiaobing tu <xiaobing.tu@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block: urgent: Fix dispatching of URGENT mechanism

There are cases when blk_peek_request is called not from blk_fetch_request
thus the URGENT request may be started but the flag q->dispatched_urgent is
not updated.

Change-Id: I4fb588823f1b2949160cbd3907f4729767932e12
CRs-fixed: 471736
CRs-fixed: 473036
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: Remove "requeuing urgent req" error messages

It is possible for URGENT request to be requeued/reinserted if it was
fetched during the creation of a packed list. This end case is rare and is
not handled at the moment.
This patch changes the messages notifying of the above to debug level
(instead of error) in order to clear the dmesg log.

Change-Id: Ie8bc067e61559a6f702077b95c5dbcc426404232
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: urgent: Fix dispatching of URGENT mechanism

There are cases when blk_peek_request is called not from blk_fetch_request
thus the URGENT request may be started but the flag q->dispatched_urgent is
not updated.

Change-Id: I4fb588823f1b2949160cbd3907f4729767932e12
CRs-fixed: 471736
CRs-fixed: 473036
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>

Conflicts:
	block/blk-core.c
block: Remove "requeuing urgent req" error messages

It is possible for URGENT request to be requeued/reinserted if it was
fetched during the creation of a packed list. This end case is rare and is
not handled at the moment.
This patch changes the messages notifying of the above to debug level
(instead of error) in order to clear the dmesg log.

Change-Id: Ie8bc067e61559a6f702077b95c5dbcc426404232
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: separate priority boosting from REQ_META

Add a new REQ_PRIO to let requests preempt others in the cfq I/O schedule,
and lave REQ_META purely for marking requests as metadata in blktrace.

All existing callers of REQ_META except for XFS are updated to also
set REQ_PRIO for now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>

Conflicts:
	block/cfq-iosched.c

Change-Id: I9f5aadc73cc73a223c544e10fa3c4716c8c4f087

Conflicts:
	fs/ext3/inode.c
	fs/ext3/namei.c
	fs/ext4/inode.c
	fs/ext4/namei.c
	fs/gfs2/quota.c
Squashed commit of the following:

commit 988a326fa22d6fabda04b5ec7a36fcc1b58a6bb2
Author: Lee Susman <lsusman@codeaurora.org>
Date:   Sun May 5 17:31:17 2013 +0300

    mm: pass readahead info down to the i/o scheduler

    Some i/o schedulers (i.e. row-iosched, cfq-iosched) deploy an idling
    algorithm in order to be better synced with the readahead algorithm.
    Idling is a prediction algorithm for incoming read requests.

    In this patch we mark pages which are part of a readahead window, by
    setting a newly introduced flag. With this flag, the i/o scheduler can
    identify a request which is associated with a readahead page. This
    enables the i/o scheduler's idling mechanism to be en-sync with the
    readahead mechanism and, in turn, can increase read throughput.

    Change-Id: I0654f23315b6d19d71bcc9cc029c6b281a44b196
    Signed-off-by: Lee Susman <lsusman@codeaurora.org>

commit 6e42d2a595838d1eb12c24e4cf1675e341f98eb1
Author: Tatyana Brokhman <tlinder@codeaurora.org>
Date:   Thu Jul 25 13:45:21 2013 +0300

    block: row: Remove warning massage from add_request

    Regular priority queues is marked as "starved" if it skipped a dispatch
    due to being empty. When a new request is added to a "starved" queue
    it will be marked as urgent.
    The removed WARN_ON was warning about an impossible case when a regular
    priority (read) queue was marked as starved but wasn't empty. This is
    a possible case due to the bellow:
    If the device driver fetched a read request that is pending for
    transmission and an URGENT request arrives, the fetched read will be
    reinserted back to the scheduler. Its possible that the queue it will be
    reinserted to was marked as "starved" in the meanwhile due to being empty.

    CRs-fixed: 517800
    Change-Id: Iaae642ea0ed9c817c41745b0e8ae2217cc684f0c
    Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>

commit 91ab76debc19a1fe5290369c4b4886dbb54ecbbc
Author: Tatyana Brokhman <tlinder@codeaurora.org>
Date:   Sun Jul 7 17:33:05 2013 +0300

    block: Add URGENT request notification support to CFQ scheduler

    When the scheduler reports to the block layer that there is an urgent
    request pending, the device driver may decide to stop the transmission
    of the current request in order to handle the urgent one. This is done
    in order to reduce the latency of an urgent request. For example:
    long WRITE may be stopped to handle an urgent READ.

    Change-Id: I3072b8a1423870fed9c04c28d93caaf9557a7b89
    Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>

commit be557c3f9b8944509293955da9be62bb292787e6
Author: Tatyana Brokhman <tlinder@codeaurora.org>
Date:   Tue Jul 2 14:43:13 2013 +0300

    block: row: change hrtimer_cancel to hrtimer_try_to_cancel

    Calling hrtimer_cancel with interrupts disabled can result in a livelock.
    When flushing plug list in the block layer interrupts are disabled and an
    hrtimer is used when adding requests from that plug list to the scheduler.
    In this code flow, if the hrtimer (which is used for idling) is set, it's
    being canceled by calling hrtimer_cancel. hrtimer_cancel will perform
    the following in an endless loop:
    1. try cancel the timer
    2. if fails - rest_cpu
    the cancellation can fail if the timer function already started. Since
    interrupts are disabled it can never complete.
    This patch reduced the number of times the hrtimer lock is taken while
    interrupts are disabled by calling hrtimer_try_co_cancel. the later will
    try to cancel the timer just once and return with an error code if fails.

    CRs-fixed: 499887
    Change-Id: I25f79c357426d72ad67c261ce7cb503ae97dc7b9
    Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>

commit e33e599a5527e24d2a41252937d625dac4e86cdb
Author: Lee Susman <lsusman@codeaurora.org>
Date:   Sun Jun 23 16:27:40 2013 +0300

    block: row-iosched idling triggered by readahead pages

    In the current implementation idling is triggered only by request
    insertion frequency. This heuristic is not very accurate and may hit
    random requests that shouldn't trigger idling. This patch uses the
    PG_readahead flag in struct page's flags, which indicates that the page
    is part of a readahead window, to start idling upon dispatch of a request
    associated with a readahead page.

    The above readehead flag is used together with the existing
    insertion-frequency trigger. The frequency timer will catch read requests
    which are not part of a readahead window, but are still part of a
    sequential stream (and therefore dispatched in small time intervals).

    Change-Id: Icb7145199c007408de3f267645ccb842e051fd00
    Signed-off-by: Lee Susman <lsusman@codeaurora.org>

commit fa709c01d23bcb5afe4651bca751327b5f4e22f0
Author: Tatyana Brokhman <tlinder@codeaurora.org>
Date:   Thu May 16 14:36:58 2013 +0300

    block: Remove "requeuing urgent req" error messages

    It is possible for URGENT request to be requeued/reinserted if it was
    fetched during the creation of a packed list. This end case is rare and is
    not handled at the moment.
    This patch changes the messages notifying of the above to debug level
    (instead of error) in order to clear the dmesg log.

    Change-Id: Ie8bc067e61559a6f702077b95c5dbcc426404232
    Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
Update from SIO to SIOplus

Using tweaked SIOplus from Alberto96

Change-Id: I8d1846694c69c4101c85f978def9f17670d6cad1

Conflicts:
	block/Kconfig.iosched
	block/Makefile
Add elevator_queue_empty_fn to elevator.h for sioplus scheduler

Change-Id: I88ba1e1f6154a48913753d69577c218b92ac3748
Add Frandom character device

frandom kernel random number generator: http://www.billauer.co.il/frandom.html

Squashed commit of:
https://github.com/f1vefour/supernatural-kernel/commit/8564e1af9b62f0c946afd7eef8bcc12344137353
https://github.com/f1vefour/supernatural-kernel/commit/95c81553596a0368212936c71f7d2f470f5d4803
https://github.com/f1vefour/supernatural-kernel/commit/5c1ef4b7565b6bf1b8807a05f369ec9df2ef8dce

Change-Id: Icd8b2861156265bc0da4da5030f54453e99bc4a7
Add 1400MHz step

Change-Id: Ia610ab72cb37073357bc58189560691559d65410

Conflicts:
	arch/arm/mach-s5pv210/cpufreq.c
Add 1100 & 1300MHz OC steps

Change-Id: Id2200023812d3dac79c36b41faa57b61db84a0c1

Conflicts:

	arch/arm/mach-s5pv210/cpufreq.c
	arch/arm/mach-s5pv210/include/mach/cpu-freq-v210.h
	arch/arm/mach-s5pv210/mach-aries.c

Conflicts:
	arch/arm/mach-s5pv210/cpufreq.c
	arch/arm/mach-s5pv210/include/mach/cpu-freq-v210.h