On Tue, Jun 23, 2026 at 06:17:36AM -0400, Zhenzhong Duan wrote:
> +     spin_lock_irqsave(&unaccepted_memory_lock, flags);
> +     for (; range_start < bitmap_size; range_start = range_end) {
> +             unsigned long phys_start, phys_end;
> +             unsigned long unaccepted_one, plugged_zero;
> +
> +             range_start = find_next_andnot_bit(plugged_bitmap, 
> unaccepted->bitmap,
> +                                                bitmap_size, range_start);
> +
> +             if (range_start >= bitmap_size)
> +                     break;
> +
> +             unaccepted_one = find_next_bit(unaccepted->bitmap, bitmap_size, 
> range_start);
> +             plugged_zero = find_next_zero_bit(plugged_bitmap, bitmap_size, 
> range_start);
> +             range_end = min(unaccepted_one, plugged_zero);
> +
> +             phys_start = range_start * unit_size + unaccepted->phys_base;
> +             phys_end = range_end * unit_size + unaccepted->phys_base;
> +
> +             arch_unaccept_memory(phys_start, phys_end);
> +             bitmap_set(unaccepted->bitmap, range_start, range_end - 
> range_start);
> +     }
> +     spin_unlock_irqrestore(&unaccepted_memory_lock, flags);

Accept TDCALL under the spin lock will kill scalability.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

Reply via email to