Commit 3f6d517
locking/rwsem: Make rwsem_spin_on_owner() return owner state
This patch modifies rwsem_spin_on_owner() to return four possible
values to better reflect the state of lock holder which enables us to
make a better decision of what to do next.
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: huang ying <huang.ying.caritas@gmail.com>
Link: https://lkml.kernel.org/r/20190520205918.22251-7-longman@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>1 parent 6cef7ff commit 3f6d517
1 file changed
+47
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
418 | 426 | | |
419 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
420 | 436 | | |
421 | | - | |
| 437 | + | |
| 438 | + | |
422 | 439 | | |
423 | | - | |
424 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
425 | 456 | | |
426 | 457 | | |
427 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
428 | 465 | | |
429 | 466 | | |
430 | 467 | | |
| |||
433 | 470 | | |
434 | 471 | | |
435 | 472 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | 473 | | |
441 | | - | |
442 | | - | |
| 474 | + | |
| 475 | + | |
443 | 476 | | |
444 | 477 | | |
445 | 478 | | |
446 | 479 | | |
447 | 480 | | |
448 | 481 | | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
| 482 | + | |
454 | 483 | | |
455 | 484 | | |
456 | 485 | | |
| |||
473 | 502 | | |
474 | 503 | | |
475 | 504 | | |
476 | | - | |
| 505 | + | |
477 | 506 | | |
478 | 507 | | |
479 | 508 | | |
| |||
0 commit comments