lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200320125455.GE20696@hirez.programming.kicks-ass.net>
Date:   Fri, 20 Mar 2020 13:54:55 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Davidlohr Bueso <dave@...olabs.net>
Cc:     tglx@...utronix.de, arnd@...db.de, balbi@...nel.org,
        bhelgaas@...gle.com, bigeasy@...utronix.de, davem@...emloft.net,
        gregkh@...uxfoundation.org, joel@...lfernandes.org,
        kurt.schwemmer@...rosemi.com, kvalo@...eaurora.org,
        linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-wireless@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org, logang@...tatee.com,
        mingo@...nel.org, mpe@...erman.id.au, netdev@...r.kernel.org,
        oleg@...hat.com, paulmck@...nel.org, rdunlap@...radead.org,
        rostedt@...dmis.org, torvalds@...ux-foundation.org,
        will@...nel.org, Paolo Bonzini <pbonzini@...hat.com>,
        Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH 18/15] kvm: Replace vcpu->swait with rcuwait

On Fri, Mar 20, 2020 at 01:55:26AM -0700, Davidlohr Bueso wrote:
> -	swait_event_interruptible_exclusive(*wq, ((!vcpu->arch.power_off) &&
> -				       (!vcpu->arch.pause)));
> +	rcuwait_wait_event(*wait,
> +			   (!vcpu->arch.power_off) && (!vcpu->arch.pause),
> +			   TASK_INTERRUPTIBLE);

> -	for (;;) {
> -		prepare_to_swait_exclusive(&vcpu->wq, &wait, TASK_INTERRUPTIBLE);
> -
> -		if (kvm_vcpu_check_block(vcpu) < 0)
> -			break;
> -
> -		waited = true;
> -		schedule();
> -	}
> -
> -	finish_swait(&vcpu->wq, &wait);
> +	rcuwait_wait_event(&vcpu->wait,
> +			   (block_check = kvm_vcpu_check_block(vcpu)) < 0,
> +			   TASK_INTERRUPTIBLE);

Are these yet more instances that really want to be TASK_IDLE ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ