Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4556458ybz; Tue, 21 Apr 2020 02:46:25 -0700 (PDT) X-Google-Smtp-Source: APiQypKMlAUYRHrOhum0GLme9oq+0EM9URQT40aSSAeLPLocCXvOoSYqGLOjaD6ssEwrdE0N4wzg X-Received: by 2002:a05:6402:1d23:: with SMTP id dh3mr16254664edb.349.1587462385061; Tue, 21 Apr 2020 02:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587462385; cv=none; d=google.com; s=arc-20160816; b=WNIB2VX7IuwhEKY8KLMoor6rgsxGipgQFXPE2vvUCVm3fH5c1eY0hKA/g3fPRebgka RscJFCAfEcv/TzwLaBvN0R1YOmL+lldP9/35P2PM1RratI30KqiDP6shlJuClVOXXBIP J3Mg7vV5z+BaMHPNh61812iH6M3CgiJI1vShs7DJl0xY7RV3SWUiWV+E6RaWB/3SweNz u+HqLTKxsBfIY1x3hyBlaaGPqQy9oSkyp44DupsXB2igvdWa3Aa/wNgXDz72wZSgQYth 4wBVLFdnDzs7uOKdKYJnCGkC1a6b8Kr06wdSsaZL6XvzebqLFxBasCBN8P6Jd87AqT9k cgPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Vn871PQoRr8hKR73ojEvQDx4nU8OlY1HT3TpH6BJBpc=; b=LWdNi/q1ksrflVX0rxBiaIG4Z2d5zf1u2E0uVyFdbL7cG5fc7HNhK1EmpnUm2Q3E8x hTTt8fcOI/leVtFKypX7MFQtsZfEZB/gPY+UxAS6WjxQPnlFsRixIJcyQneh/q4QS5qj 1UF1hsJn7GDP1nZrP2ydrhur6tfefA59M+owGqwhbdgxzA0nvrMwBl6DrbNdse1cwrXL jJKjkjWWNZeWub4fkwH2P+YJVaZw0RQ994TckmZkP/+Jzmx4i+RuWc1TTNLzc/21RbwZ QWTeIVptG66fkQdC6A92utXPSYycrs0Zo2fqdDi29fvlZSSfX/428ulTTWmTqULW2cD1 w/mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YbFC4S4t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si1215138ejx.367.2020.04.21.02.46.01; Tue, 21 Apr 2020 02:46:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YbFC4S4t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727042AbgDUJpE (ORCPT + 99 others); Tue, 21 Apr 2020 05:45:04 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:38834 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725920AbgDUJpD (ORCPT ); Tue, 21 Apr 2020 05:45:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587462301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vn871PQoRr8hKR73ojEvQDx4nU8OlY1HT3TpH6BJBpc=; b=YbFC4S4tMKyy+zCpb//seS8+jOYffmhNSSKp0JDvd1Hw0RS01HKVKIzc0toaNGCtQs1Xm2 GYxanjjC3U3jI28dgkJuGxwq92vxW3GREPirttyOzc7Wdrv0gmXkpfCM9wXnr+bIRNFhdB py6MyJ60Hzs5BSr+ngyA1gMQH9DP2Qo= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-249--oc70iImMoeGtJe4C9Wbmg-1; Tue, 21 Apr 2020 05:45:00 -0400 X-MC-Unique: -oc70iImMoeGtJe4C9Wbmg-1 Received: by mail-wr1-f69.google.com with SMTP id i10so7221258wrq.8 for ; Tue, 21 Apr 2020 02:45:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Vn871PQoRr8hKR73ojEvQDx4nU8OlY1HT3TpH6BJBpc=; b=dvcGR1YT+7luXmJDiIqWcgFBUjrOmXWKEks0GKIXWN6QJa4KzPkiFdbVJuzTEKVl1I YE7/MbvQkjZ14LhwtH6KHVizHgU/nahCt21559DzA/3UF0LckMuz79OyIqQXcLYSeXcz uXG1SXiu2V16l+jSy1KDU4b5PDHBHB11xwBlkop9vWS8u0DdRSrqTkqVdeCsUTqCN/R0 YafWaPMrEnPM9BTVT8q93m/vvlAvilIhvGY9xEX65UjGiLL0N8FsMJp336G1qi4z1mgg BwQMxfD6j5pjy2MaSdCOF6gUu0O5CYTRJ4yfSaZR2bk2NfsVv7pcKSDqg8e45kClNQlM VaNQ== X-Gm-Message-State: AGi0PubBP/98gyF57RQdqUf4h7imRPOFg9FBFewEeXQjT2bLd4+EHTGh 1Q6TbQDakgLfKmlOSKWg3bLFQCYtFlfCttoyYIAzB4aNm/HxyiYgMDlZ4svlBCVcJhi7siGOHMw bJs2ndHqoaqNMVCNxTi4/zgo4 X-Received: by 2002:adf:e982:: with SMTP id h2mr22309079wrm.425.1587462299213; Tue, 21 Apr 2020 02:44:59 -0700 (PDT) X-Received: by 2002:adf:e982:: with SMTP id h2mr22309050wrm.425.1587462299019; Tue, 21 Apr 2020 02:44:59 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:d0a0:f143:e9e4:2926? ([2001:b07:6468:f312:d0a0:f143:e9e4:2926]) by smtp.gmail.com with ESMTPSA id a7sm2684985wmj.12.2020.04.21.02.43.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Apr 2020 02:44:58 -0700 (PDT) Subject: Re: [PATCH v2] kvm: Replace vcpu->swait with rcuwait To: Davidlohr Bueso Cc: Marc Zyngier , tglx@linutronix.de, kvm@vger.kernel.org, Davidlohr Bueso , peterz@infradead.org, torvalds@linux-foundation.org, bigeasy@linutronix.de, linux-kernel@vger.kernel.org, rostedt@goodmis.org, linux-mips@vger.kernel.org, Paul Mackerras , joel@joelfernandes.org, will@kernel.org, kvmarm@lists.cs.columbia.edu References: <20200324044453.15733-1-dave@stgolabs.net> <20200324044453.15733-4-dave@stgolabs.net> <20200420164132.tjzk5ebx35m66yce@linux-p48b> <418acdb5001a9ae836095b7187338085@misterjones.org> <20200420205641.6sgsllj6pmsnwrvp@linux-p48b> <20200420215014.sarodevmhphnkkn7@linux-p48b> From: Paolo Bonzini Message-ID: <02e1b00d-a8ea-a947-bbe6-0b1380aa7ec4@redhat.com> Date: Tue, 21 Apr 2020 11:43:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200420215014.sarodevmhphnkkn7@linux-p48b> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/04/20 23:50, Davidlohr Bueso wrote: > On Mon, 20 Apr 2020, Paolo Bonzini wrote: > >> On 20/04/20 22:56, Davidlohr Bueso wrote: >>> On Mon, 20 Apr 2020, Marc Zyngier wrote: >>> >>>> This looks like a change in the semantics of the tracepoint. Before >>>> this >>>> change, 'waited' would have been true if the vcpu waited at all. Here, >>>> you'd >>>> have false if it has been interrupted by a signal, even if the vcpu >>>> has waited >>>> for a period of time. >>> >>> Hmm but sleeps are now uninterruptible as we're using TASK_IDLE. >> >> Hold on, does that mean that you can't anymore send a signal in order to >> kick a thread out of KVM_RUN?? Or am I just misunderstanding? > > Considering that the return value of the interruptible wait is not > checked, I would not think this breaks KVM_RUN. What return value? kvm_vcpu_check_block checks signal_pending, so you could have a case where the signal is injected but you're not woken up. Admittedly I am not familiar with how TASK_* work under the hood, but it does seem to be like that. Paolo