Page MenuHomeFreeBSD

linuxkpi: Add stop_machine
AbandonedPublic

Authored by manu on Tue, Aug 2, 3:33 PM.

Details

Reviewers
None
Summary

This function schedule a thread on all CPU, exec a function.

Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 46728
Build 43617: arc lint + arc unit

Event Timeline

manu requested review of this revision.Tue, Aug 2, 3:33 PM

I'm unsure if sched_pin does this but we had this in drm-kmod for quite some time now so I guess it's somewhat working for us ?

Huh, this seems quite surprising. I'm not sure where this was originally introduced but ISTM this is not equivalent. It's "working" now so moving it here is no worse I'd say, but should have a giant warning comment on it?

this code definitely does not do anything like the linux variant. sched_pin just means it wont be migrated to a different cpu, but it does not execute anywhere else and most definitely does not stop anything.

i don't know what exact semantics are needed, chances are this will work iwth smp_rendezvous

Huh, this seems quite surprising. I'm not sure where this was originally introduced but ISTM this is not equivalent. It's "working" now so moving it here is no worse I'd say, but should have a giant warning comment on it?

Looks like it's only called in i915 on some case for VT-d (which we do not support) so unsurprising that it "worked" (i.e. never called).
I'll patch drm.

I think we use something else to execute a function on all CPUs? IPI / AST ??