Skip to content
  • Heiko Carstens's avatar
    mutex: have non-spinning mutexes on s390 by default · 36cd3c9f
    Heiko Carstens authored
    
    
    Impact: performance regression fix for s390
    
    The adaptive spinning mutexes will not always do what one would expect on
    virtualized architectures like s390. Especially the cpu_relax() loop in
    mutex_spin_on_owner might hurt if the mutex holding cpu has been scheduled
    away by the hypervisor.
    
    We would end up in a cpu_relax() loop when there is no chance that the
    state of the mutex changes until the target cpu has been scheduled again by
    the hypervisor.
    
    For that reason we should change the default behaviour to no-spin on s390.
    
    We do have an instruction which allows to yield the current cpu in favour of
    a different target cpu. Also we have an instruction which allows us to figure
    out if the target cpu is physically backed.
    
    However we need to do some performance tests until we can come up with
    a solution that will do the right thing on s390.
    
    Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
    Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Cc: Christian Borntraeger <borntraeger@de.ibm.com>
    LKML-Reference: <20090409184834.7a0df7b2@osiris.boeblingen.de.ibm.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    36cd3c9f