Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linuxkpi: chase spinlock_t in DECLARE_WAIT_QUEUE_HEAD #1396

Closed
wants to merge 1 commit into from

Conversation

ekhramtsov
Copy link
Contributor

@ekhramtsov ekhramtsov commented Aug 27, 2024

Remove member m to unbreak consumers, e.g. drm-kmod 5.10-lts branch.

[...]
/tmp/drm-kmod/drivers/gpu/drm/ttm/ttm_module.c:38:8: error: no member named 'm' in 'struct mtx'
   38 | static DECLARE_WAIT_QUEUE_HEAD(exit_q);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/src/sys/compat/linuxkpi/common/include/linux/wait.h:113:33: note: expanded from macro 'DECLARE_WAIT_QUEUE_HEAD'
  113 |         MTX_SYSINIT(name, &(name).lock.m, spin_lock_name("wqhead"), MTX_DEF)
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/src/sys/sys/mutex.h:528:4: note: expanded from macro 'MTX_SYSINIT'
  528 |                 (mtx),                                                  \
      |                  ^~~
/tmp/drm-kmod/drivers/gpu/drm/ttm/ttm_module.c:38:8: error: no member named 'm' in 'struct mtx'
   38 | static DECLARE_WAIT_QUEUE_HEAD(exit_q);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/src/sys/compat/linuxkpi/common/include/linux/wait.h:113:33: note: expanded from macro 'DECLARE_WAIT_QUEUE_HEAD'
  113 |         MTX_SYSINIT(name, &(name).lock.m, spin_lock_name("wqhead"), MTX_DEF)
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[...]

Fixes: ae38a1a ("linuxkpi: spinlock: Simplify code")
MFC after: ?

Remove member m to unbreak consumers, e.g. drm-kmod 5.10-lts branch.

[...]
/tmp/drm-kmod/drivers/gpu/drm/ttm/ttm_module.c:38:8: error: no member named 'm' in 'struct mtx'
   38 | static DECLARE_WAIT_QUEUE_HEAD(exit_q);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/src/sys/compat/linuxkpi/common/include/linux/wait.h:113:33: note: expanded from macro 'DECLARE_WAIT_QUEUE_HEAD'
  113 |         MTX_SYSINIT(name, &(name).lock.m, spin_lock_name("wqhead"), MTX_DEF)
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/src/sys/sys/mutex.h:528:4: note: expanded from macro 'MTX_SYSINIT'
  528 |                 (mtx),                                                  \
      |                  ^~~
/tmp/drm-kmod/drivers/gpu/drm/ttm/ttm_module.c:38:8: error: no member named 'm' in 'struct mtx'
   38 | static DECLARE_WAIT_QUEUE_HEAD(exit_q);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/src/sys/compat/linuxkpi/common/include/linux/wait.h:113:33: note: expanded from macro 'DECLARE_WAIT_QUEUE_HEAD'
  113 |         MTX_SYSINIT(name, &(name).lock.m, spin_lock_name("wqhead"), MTX_DEF)
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[...]

Fixes:		ae38a1a ("linuxkpi: spinlock: Simplify code")
MFC after:	?
@evadot
Copy link
Contributor

evadot commented Aug 28, 2024

This isn't correct, this will break all other drm-kmod version. Also 5.10 isn't supported for main and stable/14, please use drm-515-kmod or drm-61-kmod.

@evadot
Copy link
Contributor

evadot commented Aug 28, 2024

Wait sorry I'm misread the patch, it's correct.

@bsdimp
Copy link
Member

bsdimp commented Aug 28, 2024

Merged 84f4633

@bsdimp bsdimp closed this Aug 28, 2024
@bsdimp bsdimp added the merged label Aug 28, 2024
@ekhramtsov
Copy link
Contributor Author

stable/14 is still affected and expected EoL of stable/14 is November 30, 2028.

Also according to FreshPorts, graphics/drm-510-kmod is available for i386 unlike graphics/drm-515-kmod, also freebsd/freebsd-ports@5eb743945303.

@ekhramtsov
Copy link
Contributor Author

stable/14 code slush is expected on October 18 and releng/14.2 branch is expected on November 1, see schedule.

No one has yet volunteered to fix drm-kmod 6.1 for non-amd64 as far as can the package section of FreshPorts tell.

Isn't it early for i386 to lose modesetting X.Org given that stable/15 is likely to lose agp(4) thus drm-kmod could become useless on AGP-era machines and x11-drivers being dropped, thus causing revert to VESA which may be inadequate possible due to loss of resolution and performance?

drm-kmod starting with tag drm_v5.11_0 (bisected to) also includes the new ttmv3 allocator which uses phys contig allocations but lacks bus_dma(9) for DMA allocations, resulting in stalls due to page reclaim taking long with enough free memory fragmentation, which makes a modern desktop that uses DRM drivers with TTM unusable after a long uptime or several poudriere runs. Until bus_dma(9) for ttmv3 is implemented only 5.10 remains viable as a workaround and users are unlikely to use -CURRENT just for 5.10.

@evadot, what is your stance on drm-kmod 5.10 for FreeBSD 14?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants