Kirill Tkhai 83ced169d9 locking/rwsem-xadd: Add killable versions of rwsem_down_read_failed()
Rename rwsem_down_read_failed() in __rwsem_down_read_failed_common()
and teach it to abort waiting in case of pending signals and killable
state argument passed.

Note, that we shouldn't wake anybody up in EINTR path, as:

We check for (waiter.task) under spinlock before we go to out_nolock
path. Current task wasn't able to be woken up, so there are
a writer, owning the sem, or a writer, which is the first waiter.
In the both cases we shouldn't wake anybody. If there is a writer,
owning the sem, and we were the only waiter, remove RWSEM_WAITING_BIAS,
as there are no waiters anymore.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: arnd@arndb.de
Cc: avagin@virtuozzo.com
Cc: davem@davemloft.net
Cc: fenghua.yu@intel.com
Cc: gorcunov@virtuozzo.com
Cc: heiko.carstens@de.ibm.com
Cc: hpa@zytor.com
Cc: ink@jurassic.park.msu.ru
Cc: mattst88@gmail.com
Cc: rth@twiddle.net
Cc: schwidefsky@de.ibm.com
Cc: tony.luck@intel.com
Link: http://lkml.kernel.org/r/149789534632.9059.2901382369609922565.stgit@localhost.localdomain
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-08-10 12:28:55 +02:00
..
2017-07-09 18:48:37 -07:00
2017-04-12 18:51:01 +02:00
2017-07-03 20:55:59 -07:00
2017-07-11 09:55:47 -07:00
2017-06-03 19:29:26 +09:00
2017-07-03 01:43:45 -07:00
2017-06-29 17:34:57 +02:00
2017-07-22 08:55:16 -07:00
2016-12-22 22:58:37 -05:00
2017-06-08 18:52:36 -07:00
2017-07-03 17:00:59 -06:00
2017-02-10 15:52:24 -05:00
2017-07-06 16:24:33 -07:00
2017-01-25 13:17:47 -05:00
2017-07-01 16:15:13 -07:00
2017-07-03 02:22:52 -07:00
2017-07-10 10:51:53 -07:00
2017-07-03 16:56:28 -06:00
2017-05-24 12:43:30 -04:00
2017-06-05 16:59:12 +02:00
2017-04-18 20:41:12 +02:00
2017-06-22 15:43:47 +01:00
2017-06-09 11:52:07 +02:00
2016-12-05 19:01:16 -05:00
2017-07-07 09:44:06 -07:00
2017-04-10 17:15:02 +02:00
2017-04-27 05:13:04 -04:00
2016-12-05 19:01:16 -05:00
2017-07-07 20:09:10 -04:00
2017-06-05 16:59:10 +02:00
2017-03-21 10:15:47 +02:00
2017-05-18 10:07:41 -04:00
2017-05-18 10:07:40 -04:00
2017-06-21 14:37:12 -04:00
2017-07-10 16:32:34 -07:00
2017-07-10 10:51:53 -07:00
2017-01-05 15:01:55 -06:00
2017-07-31 22:01:21 -07:00
2017-05-03 15:52:10 -07:00
2017-07-10 13:41:04 -04:00
2017-02-24 17:46:57 -08:00
2016-12-06 11:05:46 +01:00
2017-07-07 18:39:15 -07:00
2017-04-24 14:30:46 -04:00
2017-01-12 16:48:26 -05:00
2017-02-23 11:53:22 -08:00
2017-07-13 16:00:15 -04:00
2017-07-12 16:26:02 -07:00
2017-07-06 11:30:07 -04:00
2017-07-25 18:05:25 +02:00
2017-05-09 15:15:47 -07:00
2017-05-26 10:10:37 +02:00
2016-12-06 10:17:03 +02:00
2017-07-08 15:51:57 -07:00
2016-12-13 16:07:55 -08:00
2017-05-18 10:07:40 -04:00
2017-07-03 15:12:52 -07:00
2017-02-13 21:44:09 -05:00
2017-06-29 10:48:57 +01:00
2017-05-03 15:52:10 -07:00
2017-07-12 23:11:23 +02:00
2017-06-08 10:35:49 +02:00
2017-07-06 16:24:30 -07:00
2017-03-26 15:09:45 +02:00
2017-06-15 12:12:40 -04:00
2016-12-26 23:53:46 -05:00
2017-06-08 18:52:42 -07:00
2017-06-01 14:53:04 -04:00
2017-03-09 15:42:33 +01:00
2017-01-10 18:31:55 -08:00
2017-07-24 17:50:37 +02:00
2017-05-09 16:43:22 +03:00
2017-06-09 11:54:54 +02:00