UPSTREAM: sched: add wait_for_completion_io[_timeout]

* [moddingg33k: this upstreams Qualcomm's variant and replaces it with the upstream version]


The only difference between wait_for_completion[_timeout]() and
wait_for_completion_io[_timeout]() is that the latter calls
io_schedule_timeout() instead of schedule_timeout() so that the caller
is accounted as waiting for IO, not just sleeping.

These functions can be used for correct iowait time accounting when the
completion struct is actually used for waiting for IO (e.g. completion
of a bio request in the block layer).

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: moddingg33k <moddingg33k@t-online.de>
block: account iowait time when waiting for completion of IO request

Using wait_for_completion() for waiting for a IO request to be executed
results in wrong iowait time accounting. For example, a system having
the only task doing write() and fdatasync() on a block device can be
reported being idle instead of iowaiting as it should because
blkdev_issue_flush() calls wait_for_completion() which in turn calls
schedule() that does not increment the iowait proc counter and thus does
not turn on iowait time accounting.

The patch makes block layer use wait_for_completion_io() instead of
wait_for_completion() where appropriate to account iowait time
correctly.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
config: disable unneeded modules

Signed-off-by: moddingg33k <moddingg33k@t-online.de>
msm: rq_stats: move away from tick-sched v2

IMHO tick-sched is the wrong place for this piece of code. The only thing
which needs to be done in there is to call (void update_rq_stats()).

Let's move update_rq_stats() and wakeup_user() into 'arch/arm/mach-msm/msm_rq_stats.c'

To avoid possible conflicts and to make clear where 'update_rq_stats' belongs
to we rename it into 'msm_update_rq_stats'.

On this opportunity we also define msm-rq-stats internal declarations as static.

v2: - removed the #ifdef...#endif's in 'core.c'
    - restored the function wakeup_user() [no functional change]
    - moved 'void def_work_fn(x)' on top in 'msm_rq_stats.c'

Signed-off-by: moddingg33k <moddingg33k@t-online.de>