Page MenuHomeFreeBSD

vfs: manage mnt_writeopcount with atomics
ClosedPublic

Authored by mjg on Mon, Sep 9, 12:07 PM.

Details

Summary

This requires a small hack in SU code which disables suspension "by hand". I did not think it's worthwhile making it use a generic routine.

Tested by pho

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mjg created this revision.Mon, Sep 9, 12:07 PM
mjg updated this revision to Diff 62110.Sat, Sep 14, 9:09 PM
  • rebase on top of the custom barrier
kib accepted this revision.Sat, Sep 14, 9:35 PM
kib added inline comments.
sys/kern/vfs_vnops.c
1638 ↗(On Diff #62110)

I think you can write
if (__predict_true(!mplocked && (flags & V_XSLEEP) == 0) && vfs_op_thread_enter(mp)) {
and remove that ugly slowpath label.

This revision is now accepted and ready to land.Sat, Sep 14, 9:35 PM
mjg updated this revision to Diff 62114.Sat, Sep 14, 10:28 PM
  • remove the slowpath label
This revision now requires review to proceed.Sat, Sep 14, 10:28 PM
mjg updated this revision to Diff 62130.Sun, Sep 15, 7:55 PM
  • fix parens placement
kib accepted this revision.Mon, Sep 16, 7:29 AM
This revision is now accepted and ready to land.Mon, Sep 16, 7:29 AM
jeff accepted this revision.Mon, Sep 16, 8:53 PM
jeff added inline comments.
sys/kern/vfs_vnops.c
1800–1802 ↗(On Diff #62130)

Since we do this twice it could just be part of a macro or inline.

This revision was automatically updated to reflect the committed changes.