Commit ee51baa
Andreas Gruenbacher
gfs2: Faster gfs2_upgrade_iopen_glock wakeups
Move function needs_demote() to glock.h and rename it to
glock_needs_demote(). In handle_callback(), wake up the glock when
setting the GLF_PENDING_DEMOTE flag as well. (Setting the GLF_DEMOTE
flag already triggered a wake-up.)
With that, check for glock_needs_demote() in gfs2_upgrade_iopen_glock()
to wake up when either of those flags is set for the inode glock: the
faster we can react to contention, the better.
The GLF_PENDING_DEMOTE flag is only used for inode glocks (see
gfs2_glock_cb()) so it's okay to only check for the GLF_DEMOTE flag in
gfs2_drop_inode(). Still, using glock_needs_demote() there as well
makes the code a little easier to read.
Signed-off-by: Andreas Gruenbacher <[email protected]>1 parent f9417fc commit ee51baa
3 files changed
+15
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
| 566 | + | |
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | | - | |
| 570 | + | |
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| |||
1101 | 1101 | | |
1102 | 1102 | | |
1103 | 1103 | | |
1104 | | - | |
| 1104 | + | |
1105 | 1105 | | |
1106 | 1106 | | |
1107 | 1107 | | |
| |||
1443 | 1443 | | |
1444 | 1444 | | |
1445 | 1445 | | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
| 1446 | + | |
1450 | 1447 | | |
1451 | 1448 | | |
1452 | 1449 | | |
| |||
1636 | 1633 | | |
1637 | 1634 | | |
1638 | 1635 | | |
1639 | | - | |
1640 | | - | |
1641 | | - | |
1642 | | - | |
1643 | | - | |
1644 | | - | |
1645 | 1636 | | |
1646 | 1637 | | |
1647 | 1638 | | |
| |||
1650 | 1641 | | |
1651 | 1642 | | |
1652 | 1643 | | |
1653 | | - | |
1654 | | - | |
| 1644 | + | |
| 1645 | + | |
1655 | 1646 | | |
1656 | 1647 | | |
1657 | 1648 | | |
| |||
1664 | 1655 | | |
1665 | 1656 | | |
1666 | 1657 | | |
1667 | | - | |
| 1658 | + | |
1668 | 1659 | | |
1669 | 1660 | | |
1670 | 1661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
288 | 294 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1030 | 1030 | | |
1031 | 1031 | | |
1032 | 1032 | | |
1033 | | - | |
| 1033 | + | |
1034 | 1034 | | |
1035 | 1035 | | |
1036 | 1036 | | |
| |||
1294 | 1294 | | |
1295 | 1295 | | |
1296 | 1296 | | |
1297 | | - | |
| 1297 | + | |
1298 | 1298 | | |
1299 | 1299 | | |
1300 | 1300 | | |
| |||
0 commit comments