Re: [PATCH] Yielding processor resources during lock contention

From: Arnd Bergmann
Date: Sun Sep 12 2004 - 05:17:25 EST


On Sonntag, 12. September 2004 06:59, Zwane Mwaikambo wrote:
> The following patch introduces cpu_lock_yield which allows architectures
> to possibly yield processor resources during lock contention. The original
> requirement stems from Paul's requirement on PPC64 LPAR systems to yield
> the processor to the hypervisor instead of spinning.

For s390, this was solved by simply defining cpu_relax() to the hypervisor
yield operation, because we found that cpu_relax() is used only in busy-wait
situations where it makes sense to continue on another virtual CPU.

What is the benefit of not always doing a full hypervisor yield when
you hit cpu_relax()?

Arnd <><

Attachment: pgp00000.pgp
Description: signature