Linus Torvalds
4f988f152e
seqlock: add 'raw_seqcount_begin()' function
...
The normal read_seqcount_begin() function will wait for any current
writers to exit their critical region by looping until the sequence
count is even.
That "wait for sequence count to stabilize" is the right thing to do if
the read-locker will just retry the whole operation on contention: no
point in doing a potentially expensive reader sequence if we know at the
beginning that we'll just end up re-doing it all.
HOWEVER. Some users don't actually retry the operation, but instead
will abort and do the operation with proper locking. So the sequence
count case may be the optimistic quick case, but in the presense of
writers you may want to do full locking in order to guarantee forward
progress. The prime example of this would be the RCU name lookup.
And in that case, you may well be better off without the "retry early",
and are in a rush to instead get to the failure handling. Thus this
"raw" interface that just returns the sequence number without testing it
- it just forces the low bit to zero so that read_seqcount_retry() will
always fail such a "active concurrent writer" scenario.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2012-05-04 15:13:54 -07:00
..
2012-04-15 17:35:19 -07:00
2012-03-06 15:16:18 -05:00
2011-08-26 12:02:50 -04:00
2012-03-28 10:01:29 -07:00
2011-03-31 11:26:23 -03:00
2012-01-04 17:30:20 -02:00
2012-04-23 14:23:32 +03:00
2012-04-16 16:45:34 +02:00
2012-03-17 12:20:44 -07:00
2012-02-15 00:19:48 -05:00
2012-04-16 21:27:07 +02:00
2012-03-24 10:41:37 -07:00
2012-04-20 20:30:19 -04:00
2012-03-30 17:31:56 -07:00
2012-04-09 16:29:34 +02:00
2012-04-16 15:19:12 -04:00
2012-04-11 09:31:01 +02:00
2012-04-02 14:41:25 -07:00
2012-03-26 20:41:01 +04:00
2012-03-13 11:21:23 +11:00
2012-04-04 10:09:30 -07:00
2012-04-27 11:03:38 -06:00
2012-03-26 11:48:54 -04:00
2012-04-24 13:55:43 -07:00
2008-06-16 10:20:58 -07:00
2011-12-13 15:07:49 +00:00
2012-03-30 16:45:39 -07:00
2008-07-01 11:28:06 +10:00
2009-03-26 18:14:14 +01:00
2011-11-02 16:07:03 -07:00
2011-08-10 14:55:29 -07:00
2005-04-16 15:20:36 -07:00
2011-06-06 22:55:11 -07:00
2005-06-21 19:07:41 -07:00
2009-02-08 09:56:11 -08:00
2011-03-15 02:42:32 -04:00
2008-12-03 22:12:38 -08:00
2005-04-16 15:20:36 -07:00
2012-03-24 10:41:37 -07:00
2009-03-26 18:14:15 +01:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2012-03-07 17:06:08 +11:00
2012-03-20 21:29:40 -04:00
2009-01-08 08:31:12 -08:00
2010-12-06 15:58:43 -05:00
2011-08-26 12:02:50 -04:00
2005-04-16 15:20:36 -07:00
2011-10-31 00:33:36 +08:00
2011-03-22 17:43:59 -07:00
2005-04-16 15:20:36 -07:00
2008-10-20 08:52:42 -07:00
2011-03-11 14:25:50 +00:00
2012-03-20 21:29:46 -04:00
2012-03-24 10:08:39 -07:00
2011-08-03 11:30:42 -04:00
2012-03-23 16:58:34 -07:00
2008-06-06 11:29:10 -07:00
2012-03-30 12:33:28 +02:00
2006-04-27 16:46:56 +01:00
2011-07-14 11:47:49 -07:00
2010-06-24 21:30:09 -07:00
2011-07-31 22:05:09 +02:00
2009-03-28 13:30:43 -07:00
2009-11-20 20:13:39 +01:00
2012-03-04 17:54:35 -05:00
2011-10-17 19:22:46 -04:00
2012-01-14 18:36:33 -08:00
2009-01-15 16:39:41 -08:00
2009-07-31 12:28:46 +02:00
2011-01-13 08:03:17 -08:00
2011-03-31 11:26:23 -03:00
2012-03-24 10:41:37 -07:00
2012-03-21 17:55:01 -07:00
2009-01-30 23:44:41 +05:30
2009-12-04 15:39:55 +01:00
2012-01-23 16:06:37 -05:00
2012-03-16 20:35:01 +00:00
2011-10-13 14:36:58 +01:00
2011-09-08 11:10:56 +02:00
2008-07-25 10:53:33 -07:00
2005-04-16 15:20:36 -07:00
2009-01-23 22:28:48 -08:00
2012-03-21 17:54:56 -07:00
2012-03-29 18:12:23 -07:00
2007-10-17 08:42:47 -07:00
2012-02-28 16:02:54 +01:00
2011-01-05 14:15:50 +01:00
2005-04-16 15:20:36 -07:00
2008-04-30 08:29:54 -07:00
2012-01-03 22:54:57 -05:00
2012-01-13 09:32:20 +10:30
2008-06-04 14:56:12 +01:00
2008-01-30 13:32:42 +01:00
2011-03-31 11:26:23 -03:00
2012-03-24 10:41:37 -07:00
2012-03-24 10:41:37 -07:00
2012-03-30 03:23:30 -04:00
2012-03-29 15:38:31 +10:30
2012-03-29 14:46:05 -07:00
2011-06-03 15:01:06 -04:00
2012-03-23 16:58:38 -07:00
2012-01-05 18:52:59 -05:00
2012-03-24 10:08:39 -07:00
2011-08-06 22:12:37 -07:00
2012-03-29 19:52:48 +08:00
2011-12-13 09:26:45 +00:00
2009-09-10 10:00:05 -07:00
2012-03-20 21:29:37 -04:00
2012-03-03 09:02:52 -07:00
2012-03-28 15:58:21 -07:00
2012-03-20 21:29:53 -04:00
2011-11-23 18:49:22 +01:00
2010-08-04 11:00:45 +02:00
2010-03-30 22:02:32 +09:00
2011-10-31 20:19:04 +00:00
2012-03-21 18:55:10 -07:00
2012-02-20 19:46:36 +11:00
2011-06-10 14:55:36 +02:00
2008-04-21 11:22:29 -05:00
2011-10-31 20:21:24 +00:00
2012-03-28 15:02:41 -07:00
2009-04-15 12:22:37 +02:00
2011-06-21 19:17:20 -07:00
2012-04-04 17:13:43 -07:00
2012-04-10 15:30:16 -07:00
2007-02-09 17:39:36 -05:00
2011-10-31 17:30:44 -07:00
2011-02-25 12:00:34 -08:00
2009-11-04 09:50:58 -08:00
2011-05-24 10:21:29 +02:00
2011-06-27 09:11:02 -04:00
2012-03-28 14:24:40 -07:00
2009-01-30 23:46:40 +05:30
2012-04-30 15:30:18 -07:00
2009-06-15 21:30:26 -07:00
2011-10-06 19:47:19 -04:00
2011-12-12 13:54:36 +00:00
2008-01-28 23:21:18 +01:00
2011-03-22 17:44:11 -07:00
2012-02-13 00:46:41 -05:00
2012-04-06 02:43:12 -04:00
2010-01-25 12:26:38 -02:00
2012-01-12 20:13:04 -08:00
2011-09-14 15:24:51 -04:00
2012-03-31 16:03:16 -04:00
2011-01-12 20:16:43 -05:00
2012-03-24 10:41:37 -07:00
2005-04-16 15:20:36 -07:00
2011-03-14 19:12:20 -04:00
2008-11-20 20:29:48 -08:00
2010-10-18 11:03:14 +02:00
2012-02-19 10:30:57 -08:00
2011-01-09 15:42:55 -08:00
2012-03-20 21:29:32 -04:00
2009-06-18 19:50:21 +08:00
2012-03-18 22:15:39 +01:00
2012-04-02 14:41:27 -07:00
2011-01-10 08:51:44 -08:00
2011-10-31 19:32:32 -04:00
2005-04-16 15:20:36 -07:00
2007-05-08 11:15:31 -07:00
2012-01-29 20:35:52 +01:00
2012-04-05 15:30:34 -07:00
2011-10-31 17:30:54 -07:00
2011-07-07 13:21:56 -07:00
2012-03-04 17:54:34 -05:00
2012-02-21 11:08:30 -05:00
2012-04-12 12:57:08 +02:00
2009-10-08 12:16:35 -07:00
2009-06-18 13:04:05 -07:00
2011-08-03 11:15:57 -04:00
2011-12-03 09:35:08 -08:00
2012-03-02 10:38:33 +01:00
2006-09-30 01:47:55 +02:00
2012-01-10 16:30:43 -08:00
2012-04-27 10:46:45 +08:00
2012-03-28 14:08:46 -07:00
2011-08-17 13:00:20 -07:00
2009-04-01 21:42:26 +02:00
2012-01-09 11:24:59 +01:00
2011-02-11 15:05:49 +01:00
2012-03-24 10:08:39 -07:00
2006-04-26 12:56:16 +01:00
2010-02-09 11:13:56 +01:00
2011-06-27 16:06:19 -07:00
2010-03-07 22:17:09 +01:00
2012-03-16 10:38:24 -04:00
2012-03-16 10:38:24 -04:00
2012-03-26 21:47:19 +02:00
2012-03-26 21:47:19 +02:00
2007-01-30 08:26:45 -08:00
2012-03-04 17:54:34 -05:00
2009-01-21 14:02:26 -08:00
2007-04-25 22:25:31 -07:00
2012-03-28 15:58:21 -07:00
2012-02-24 01:37:35 -08:00
2011-03-10 16:37:26 -08:00
2008-08-02 18:36:10 +01:00
2011-07-18 12:29:38 -04:00
2012-02-08 15:52:45 -05:00
2012-02-08 15:52:45 -05:00
2008-07-09 12:09:28 -04:00
2012-03-16 23:00:20 -07:00
2012-01-13 09:32:18 +10:30
2005-04-16 15:20:36 -07:00
2010-07-28 10:18:49 -04:00
2011-01-31 21:17:41 -08:00
2012-03-09 10:56:35 -08:00
2012-03-28 18:30:03 +01:00
2012-03-04 17:54:34 -05:00
2010-07-09 11:42:03 -07:00
2006-10-05 15:10:12 +01:00
2005-04-16 15:20:36 -07:00
2007-04-25 22:25:31 -07:00
2012-01-03 22:55:17 -05:00
2012-03-16 10:38:24 -04:00
2006-10-04 00:31:09 -07:00
2012-02-13 00:46:41 -05:00
2011-08-26 12:02:50 -04:00
2012-04-23 11:04:29 +10:00
2012-04-12 00:37:48 -06:00
2010-10-07 14:08:55 +01:00
2007-09-16 21:13:58 -07:00
2011-03-31 11:26:23 -03:00
2012-03-13 22:45:38 -04:00
2012-01-09 13:52:09 +01:00
2010-05-20 23:05:28 -07:00
2012-04-02 09:50:40 -07:00
2008-04-29 08:06:29 -07:00
2012-04-12 18:35:58 -07:00
2011-10-31 17:30:54 -07:00
2007-07-31 15:39:40 -07:00
2012-03-31 13:34:04 -07:00
2012-01-23 08:38:48 -08:00
2012-03-23 08:53:47 -07:00
2012-03-08 10:50:35 -08:00
2011-03-08 11:17:22 +11:00
2012-03-29 17:41:25 -05:00
2011-01-24 14:45:11 +10:30
2012-03-28 23:30:28 +02:00
2011-12-21 15:13:54 -08:00
2012-01-17 15:40:51 -08:00
2011-11-21 12:32:23 -08:00
2011-03-31 11:26:23 -03:00
2012-04-11 22:55:25 -03:00
2012-03-08 14:11:36 +02:00
2011-08-26 12:02:50 -04:00
2011-09-16 19:20:20 -04:00
2011-11-17 12:20:19 +01:00
2010-05-26 17:34:16 +01:00
2010-03-15 12:47:59 +01:00
2011-05-25 08:39:51 -07:00
2011-12-22 02:02:20 -05:00
2011-07-22 14:39:48 +09:30
2012-04-23 12:11:47 +01:00
2009-09-17 23:23:45 -07:00
2006-06-09 21:53:55 +02:00
2007-07-17 10:23:03 -07:00
2012-01-12 20:13:03 -08:00
2011-08-26 12:02:50 -04:00
2011-11-14 13:35:16 +01:00
2011-12-12 22:06:55 -08:00
2011-11-04 17:22:14 -07:00
2012-03-26 20:40:59 +04:00
2008-02-06 10:41:01 -08:00
2012-04-03 09:49:59 -07:00
2007-07-16 09:05:34 -07:00
2012-03-23 16:58:31 -07:00
2012-03-16 10:38:24 -04:00
2012-03-15 21:41:34 +01:00
2010-05-25 08:07:09 -07:00
2011-01-10 19:04:08 +01:00
2011-12-13 18:46:55 -05:00
2012-03-03 15:04:45 -05:00
2011-03-22 04:53:56 -03:00
2011-12-08 10:22:09 -08:00
2009-09-22 07:17:35 -07:00
2009-01-09 16:54:41 -08:00
2010-05-18 00:52:36 -03:00
2012-03-21 17:54:57 -07:00
2012-01-13 10:12:23 -08:00
2012-04-21 01:58:20 -04:00
2011-07-26 16:49:47 -07:00
2010-08-09 20:44:58 -07:00
2012-03-21 17:54:56 -07:00
2012-03-26 12:50:52 +10:30
2011-07-24 22:06:04 +09:30
2012-03-26 12:50:51 +10:30
2012-01-03 22:57:12 -05:00
2009-04-01 07:38:54 -04:00
2008-06-06 11:29:12 -07:00
2011-12-05 10:21:44 -08:00
2012-03-27 08:26:34 +01:00
2008-02-13 16:21:18 -08:00
2011-07-26 16:49:47 -07:00
2010-08-22 21:15:39 -07:00
2010-08-22 21:15:39 -07:00
2012-02-21 15:03:48 -05:00
2012-04-03 17:23:23 -04:00
2012-04-24 00:16:24 -04:00
2012-02-26 14:10:44 -05:00
2011-07-03 20:02:07 -07:00
2011-08-26 12:02:50 -04:00
2012-03-06 15:16:19 -05:00
2012-04-20 23:14:28 -04:00
2012-01-31 18:20:25 -05:00
2011-11-18 10:51:01 -08:00
2011-12-21 14:48:43 -08:00
2011-07-25 20:57:15 -07:00
2011-07-20 01:44:07 -04:00
2011-11-04 16:24:23 -04:00
2009-01-08 16:25:18 +11:00
2012-03-28 14:41:36 -07:00
2011-08-29 12:38:51 -03:00
2012-02-23 09:39:23 +02:00
2011-12-03 09:35:17 -08:00
2012-03-16 10:38:24 -04:00
2011-09-13 11:12:05 +02:00
2012-03-14 17:25:56 +08:00
2012-01-10 16:30:42 -08:00
2010-10-26 16:52:05 -07:00
2012-01-12 20:13:10 -08:00
2008-10-13 10:10:37 -07:00
2011-12-13 15:07:49 +00:00
2011-01-16 13:47:07 -05:00
2012-03-23 14:02:12 -07:00
2010-10-27 17:53:25 +02:00
2012-03-04 09:34:15 -08:00
2011-08-25 10:17:28 -07:00
2008-09-14 17:24:26 +02:00
2009-01-15 16:39:41 -08:00
2011-11-18 14:37:40 -05:00
2012-03-16 10:38:24 -04:00
2012-03-28 17:14:36 -07:00
2011-05-26 17:12:37 -07:00
2009-02-14 22:58:35 -08:00
2012-04-29 13:12:42 -07:00
2012-03-28 23:31:24 +02:00
2012-03-16 21:49:24 +01:00
2011-12-13 09:26:45 +00:00
2011-06-10 14:55:36 +02:00
2012-03-23 16:58:38 -07:00
2006-10-03 23:01:26 +02:00
2012-03-04 20:41:38 -05:00
2011-11-02 16:07:02 -07:00
2011-01-13 08:03:21 -08:00
2012-03-23 16:58:32 -07:00
2012-03-01 10:28:04 +01:00
2011-03-31 11:26:23 -03:00
2012-03-20 11:16:20 -07:00
2008-10-23 08:55:01 -07:00
2011-07-01 15:39:38 -07:00
2012-03-28 17:14:37 -07:00
2012-01-03 22:55:07 -05:00
2011-07-26 16:49:46 -07:00
2011-10-28 05:29:07 -07:00
2010-02-10 17:47:17 -08:00
2011-09-13 11:11:54 +02:00
2012-03-24 10:08:39 -07:00
2011-07-25 20:57:14 -07:00
2012-03-24 10:41:37 -07:00
2012-03-24 10:08:39 -07:00
2012-03-04 17:54:34 -05:00
2012-03-16 10:38:24 -04:00
2011-04-14 16:06:56 -07:00
2012-03-21 17:54:57 -07:00
2011-08-26 12:02:50 -04:00
2009-11-04 09:50:58 -08:00
2007-05-02 11:56:33 +01:00
2012-03-15 18:23:10 -07:00
2011-07-08 14:02:53 +02:00
2012-02-21 16:56:45 -05:00
2010-03-13 01:21:21 +01:00
2012-03-28 18:30:03 +01:00
2009-09-15 02:44:17 -07:00
2006-04-26 12:56:16 +01:00
2012-03-28 15:58:21 -07:00
2010-06-03 03:21:52 -07:00
2011-07-18 11:06:03 -07:00
2011-06-07 10:02:35 +02:00
2009-10-30 08:27:25 +11:00
2012-03-21 13:25:04 -07:00
2010-10-22 10:20:06 -07:00
2011-11-02 16:07:01 -07:00
2012-05-04 15:13:54 -07:00
2008-02-07 08:42:34 -08:00
2012-04-09 10:38:30 -07:00
2012-03-08 11:38:50 -08:00
2011-10-31 19:32:32 -04:00
2011-07-30 08:44:19 -10:00
2011-12-09 07:50:27 -08:00
2012-05-01 09:40:19 -04:00
2012-03-06 11:01:33 +02:00
2012-03-28 15:04:26 -07:00
2011-03-22 17:16:34 +09:00
2012-03-28 17:14:35 -07:00
2012-01-03 20:23:18 -05:00
2012-03-19 16:53:08 -04:00
2012-04-05 19:04:27 -04:00
2011-03-09 14:08:09 -08:00
2011-07-26 16:49:47 -07:00
2012-03-28 15:58:21 -07:00
2011-07-25 20:57:11 -07:00
2012-02-21 09:06:09 -08:00
2010-08-09 16:48:44 -04:00
2012-04-14 07:47:49 -07:00
2011-10-31 17:30:47 -07:00
2009-04-10 15:48:52 +02:00
2012-04-05 15:25:51 -07:00
2012-03-04 17:54:34 -05:00
2010-10-27 18:03:14 -07:00
2012-03-04 17:54:34 -05:00
2012-01-24 16:40:30 -08:00
2012-01-03 22:54:56 -05:00
2012-02-20 12:48:47 -08:00
2010-02-04 14:20:41 +11:00
2011-01-24 09:33:36 -08:00
2010-12-22 19:43:34 -08:00
2012-03-13 14:06:33 -04:00
2012-03-01 17:57:40 -05:00
2008-11-11 09:30:23 -08:00
2011-10-31 19:32:32 -04:00
2010-05-27 09:12:51 -07:00
2012-03-29 18:12:23 -07:00
2011-05-23 13:59:53 +02:00
2011-04-26 14:01:42 -07:00
2009-03-26 18:14:14 +01:00
2012-03-22 19:43:43 -07:00
2010-11-29 08:55:22 +11:00
2012-03-23 16:58:40 -07:00
2012-02-24 10:05:59 +01:00
2012-03-28 18:30:03 +01:00
2012-04-10 22:39:17 -06:00
2011-05-25 19:56:23 -04:00
2009-11-10 20:54:38 -08:00
2011-10-12 21:13:11 -07:00
2009-07-29 19:10:39 -07:00
2009-03-26 18:14:14 +01:00
2011-06-15 20:04:00 -07:00
2011-11-02 16:07:02 -07:00
2011-03-22 04:53:33 -03:00
2011-10-31 19:32:23 -04:00
2007-12-26 19:36:35 -08:00
2012-04-11 09:36:00 +01:00
2010-01-15 01:43:29 -08:00
2012-03-19 15:33:24 -03:00
2012-03-31 08:09:50 +05:30
2012-04-25 21:26:33 -07:00
2011-12-05 23:27:59 +00:00
2011-07-26 16:49:47 -07:00
2011-07-25 20:57:15 -07:00
2012-03-28 18:30:03 +01:00
2010-10-13 15:45:21 -04:00
2012-03-07 16:08:46 +01:00
2011-08-26 12:02:50 -04:00
2011-09-14 15:24:51 -04:00
2011-03-31 11:26:23 -03:00
2011-03-22 17:44:17 -07:00
2006-06-22 15:05:58 -07:00