Files
android_kernel_xiaomi_sm8450/include/linux
Josh Snyder c96f5471ce delayacct: Account blkio completion on the correct task
Before commit:

  e33a9bba85 ("sched/core: move IO scheduling accounting from io_schedule_timeout() into scheduler")

delayacct_blkio_end() was called after context-switching into the task which
completed I/O.

This resulted in double counting: the task would account a delay both waiting
for I/O and for time spent in the runqueue.

With e33a9bba85, delayacct_blkio_end() is called by try_to_wake_up().
In ttwu, we have not yet context-switched. This is more correct, in that
the delay accounting ends when the I/O is complete.

But delayacct_blkio_end() relies on 'get_current()', and we have not yet
context-switched into the task whose I/O completed. This results in the
wrong task having its delay accounting statistics updated.

Instead of doing that, pass the task_struct being woken to delayacct_blkio_end(),
so that it can update the statistics of the correct task.

Signed-off-by: Josh Snyder <joshs@netflix.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Balbir Singh <bsingharora@gmail.com>
Cc: <stable@vger.kernel.org>
Cc: Brendan Gregg <bgregg@netflix.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-block@vger.kernel.org
Fixes: e33a9bba85 ("sched/core: move IO scheduling accounting from io_schedule_timeout() into scheduler")
Link: http://lkml.kernel.org/r/1513613712-571-1-git-send-email-joshs@netflix.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-01-16 03:29:36 +01:00
..
2016-07-08 16:23:11 +02:00
2017-11-30 16:55:35 +00:00
2010-11-23 20:14:46 +00:00
2017-11-13 01:34:49 +01:00
2012-10-08 13:50:20 +10:30
2005-04-16 15:20:36 -07:00
2011-03-11 14:25:50 +00:00
2017-06-08 18:52:36 -07:00
2017-12-20 11:10:17 -07:00
2017-12-21 02:15:41 +01:00
2017-07-03 16:56:28 -06:00
2017-11-15 18:21:04 -08:00
2011-10-29 21:20:22 +02:00
2017-08-30 14:40:40 +02:00
2017-09-04 00:06:02 +02:00
2017-08-24 13:23:03 -07:00
2016-10-28 08:48:16 -06:00
2017-07-17 13:42:48 +02:00
2017-11-05 16:42:02 -08:00
2017-08-07 17:22:14 +02:00
2014-12-31 13:06:50 -05:00
2014-10-09 11:35:48 +03:00
2017-11-13 01:41:20 +01:00
2014-10-08 16:01:41 -04:00
2017-11-15 18:21:06 -08:00
2017-03-21 10:15:47 +02:00
2010-02-09 11:13:56 +01:00
2012-03-26 21:47:19 +02:00
2012-03-26 21:47:19 +02:00
2017-05-18 10:07:40 -04:00
2017-06-21 14:37:12 -04:00
2017-11-17 16:10:04 -08:00
2017-11-15 18:21:05 -08:00
2006-10-10 15:37:22 -07:00
2017-12-29 21:13:04 +01:00
2016-05-11 22:37:54 +02:00
2016-01-28 14:19:12 -08:00
2017-11-15 18:21:01 -08:00
2017-11-17 16:10:04 -08:00
2017-10-12 15:41:05 +02:00
2017-11-15 18:21:01 -08:00
2013-08-28 21:35:14 -07:00
2017-12-01 13:09:40 -08:00
2017-10-19 10:08:56 +02:00
2017-10-07 10:45:02 -06:00
2017-08-28 20:51:22 +02:00
2017-11-15 18:21:04 -08:00
2015-06-24 17:49:41 -07:00
2017-11-29 18:40:42 -08:00
2017-11-15 18:21:04 -08:00
2017-11-17 16:10:00 -08:00
2017-07-25 18:05:25 +02:00
2017-10-20 09:37:32 +02:00
2017-12-14 16:00:49 -08:00
2017-11-15 18:21:03 -08:00
2017-11-15 18:21:06 -08:00
2017-11-09 10:23:28 +01:00
2017-08-06 20:55:29 -07:00
2017-11-17 16:10:04 -08:00
2017-11-17 16:10:04 -08:00
2017-11-13 01:33:48 +01:00
2017-12-11 10:52:23 -05:00
2017-11-15 18:21:04 -08:00
2017-11-07 12:22:21 +01:00
2017-07-06 16:24:30 -07:00
2017-08-16 16:28:47 -07:00
2017-11-15 18:21:01 -08:00
2017-11-15 18:21:06 -08:00
2017-11-15 18:21:01 -08:00
2013-04-30 15:50:12 +05:30
2015-10-01 09:57:59 -07:00
2017-10-11 22:36:54 -04:00
2005-04-16 15:20:36 -07:00
2017-07-24 17:50:37 +02:00
2014-11-28 16:08:16 +01:00
2017-10-04 10:29:22 +02:00
2015-12-03 07:24:29 -08:00
2017-08-15 09:02:07 -07:00
2011-01-13 08:03:24 -08:00
2013-10-17 15:53:09 -04:00
2017-08-15 09:02:08 -07:00