Page MenuHomeFreeBSD

vm: retire pa_lock
ClosedPublic

Authored by alc on Mon, Jun 9, 9:16 PM.
Tags
None
Referenced Files
F120360135: D50767.id156773.diff
Tue, Jun 17, 8:30 AM
F120343504: D50767.id156742.diff
Tue, Jun 17, 5:26 AM
F120326473: D50767.id156840.diff
Tue, Jun 17, 2:26 AM
Unknown Object (File)
Sun, Jun 15, 7:23 PM
Unknown Object (File)
Sun, Jun 15, 12:51 PM
Unknown Object (File)
Sun, Jun 15, 12:51 PM
Unknown Object (File)
Sun, Jun 15, 12:51 PM
Unknown Object (File)
Sun, Jun 15, 12:51 PM

Details

Test Plan

This compiles.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

alc requested review of this revision.Mon, Jun 9, 9:16 PM
sys/compat/linuxkpi/common/include/linux/highmem.h
82–83

This seems highly suspect, and warrants investigation.

sys/compat/linuxkpi/common/include/linux/highmem.h
84

This is a hack that I don't understand, but the change is probably ok.

sys/compat/linuxkpi/common/include/linux/mm.h
417

These are used by drm-kmod. I believe changing them to vm_page_tryxbusy() and vm_page_xunbusy() would be correct. I can test such a change.

sys/compat/linuxkpi/common/include/linux/mm.h
406–418

Is the out-of-tree i915kms driver that you mentioned using these?

sys/compat/linuxkpi/common/include/linux/mm.h
406–418

Yes, here: https://github.com/freebsd/drm-kmod/blob/master/drivers/gpu/drm/i915/gem/i915_gem_userptr.c#L209

It's more correct to use the busy lock there. I'm not convinced that that code is sane at all in any case, but now I'm not sure that the userptr code gets compiled in at all. All of this file is conditionally defined based on whether CONFIG_MMU_NOTIFIER is configured, and I can't see any evidence that it is.

Use busy style synchronization in linux emulation.

Delete more unused declarations from vm_page.h.

markj added inline comments.
sys/compat/linuxkpi/common/include/linux/mm.h
406–418

That code isn't compiled indeed, so we could drop these wrappers as well.

This revision is now accepted and ready to land.Tue, Jun 10, 2:18 PM

Can we remove PA_LOCK_COUNT too? There is one use in a powerpc64 pmap to size the PV lock array, but substituting MAXCPU there would be more consistent with other platforms and would also avoid changing the size of the array.

This revision now requires review to proceed.Tue, Jun 10, 5:44 PM
This revision is now accepted and ready to land.Tue, Jun 10, 6:08 PM
This revision was automatically updated to reflect the committed changes.