git: nvmm: Implement waits for lwkt_send_ipiq_mask()

Aaron LI aly at crater.dragonflybsd.org
Tue Jul 20 16:30:22 PDT 2021


commit 8b383bf46fb3eda81af783e8a2acc6ad467bf0b5
Author: Aaron LI <aly at aaronly.me>
Date:   Sun Jun 13 14:25:39 2021 +0800

    nvmm: Implement waits for lwkt_send_ipiq_mask()
    
    Unlike lwkt_send_ipiq(), lwkt_send_ipiq_mask() doesn't have a sequence
    number to wait for completion, and a wait mechanism like that would be
    very expensive.
    
    Here we choose a simple method.  Just have {vmx,svm}_change_cpu()
    decrement a global with an atomic op and issue a wakeup() when it hits
    0.  And the callers can just tsleep in a loop until its zero
    
    Credit to Matt Dillon for the patch.

Summary of changes:
 sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c | 31 +++++++++++++++++++++++++------
 sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c | 30 ++++++++++++++++++++++++------
 2 files changed, 49 insertions(+), 12 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8b383bf46fb3eda81af783e8a2acc6ad467bf0b5


-- 
DragonFly BSD source repository


More information about the Commits mailing list