[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH RFC] evtchn: add early-out to evtchn_move_pirqs()


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 11 Apr 2022 14:13:42 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pfltAWvtqebYL/YjpIbHeXdHvY76RQY6YsBcpCchCIU=; b=Dc05SpZpXQtv1Dk5E/XTwNBlyUXUYQq6sCCj6R90rHwJybdsx/pU5gHT7Br1s62EeANLMSRTz/a6YfMVvN11kzmWjRkyCi2fDfwiU0VAPtThYPBRKaT6VxyPIhCRa6OF448MgujYcMWTF2BDMb/nLxfkjDfm5WpDINZ59Y88y43vj5RLnz13Ls286ozqOK+zQmLRJo7fWhXsUM5j3zmxAIHfK05VE4bXcBsByJqH6qjUfP/Xk6iFw2ZtZeTRmw6VNSX0m71OsesOIISyQNTbmL8UJlyo/GmJuN3uXO6HIUSUKQSzf1QMWhPYNnl8zfKrTdvxrgKYPfjiiFP7hNbqqw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jYc2t9Ps1dmAe3YeKDPoj4WcLkLvwppHS+1oKwPTS1xzAZVhM/st3VszAtzEHVBoFED2de/RkPRkH4zVM98dohCN+TewVPJy+ZvzRHD1DBHyz0hpugWBMEYw8VcH3vD93524Y69LQhpzT5jCS9oU4iaGw6HZLcoKuXxqHSBIeKdd8YGuyaGVqb0/KdmY/NSwmZKV8XRUDk5aRHoSZJnigyikqe6knVx3bJQs0t0+iJW2qVID8QPzUZBKhFmws1+b30TJ6/SsGvTtODWe58KP8tendR5NQ1S+PY/AarZlCZ5yu+jM0PqkXxgIO4/eCIzRsIhc2VmQAcXJ0/3CurKchA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 11 Apr 2022 12:14:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.04.2022 13:00, Julien Grall wrote:
> On 11/04/2022 11:45, Jan Beulich wrote:
>> On 11.04.2022 12:25, Julien Grall wrote:
>>> On 11/04/2022 07:13, Jan Beulich wrote:
>>>>>>>> --- a/xen/common/event_channel.c
>>>>>>>> +++ b/xen/common/event_channel.c
>>>>>>>> @@ -1559,6 +1559,16 @@ void evtchn_move_pirqs(struct vcpu *v)
>>>>>>>>          unsigned int port;
>>>>>>>>          struct evtchn *chn;
>>>>>>>>      
>>>>>>>> +    /*
>>>>>>>> +     * The work done below is an attempt to keep pIRQ-s on the pCPU-s 
>>>>>>>> that the
>>>>>>>> +     * vCPU-s they're to be delivered to run on. In order to limit 
>>>>>>>> lock
>>>>>>>> +     * contention, check for an empty list prior to acquiring the 
>>>>>>>> lock. In the
>>>>>>>> +     * worst case a pIRQ just bound to this vCPU will be delivered 
>>>>>>>> elsewhere
>>>>>>>> +     * until the vCPU is migrated (again) to another pCPU.
>>>>>>>> +     */
>>>>>>>
>>>>>>> AFAIU, the downside is another pCPU (and therefore vCPU) will get
>>>>>>> disturbed by the interrupt.
>>>>>>
>>>>>> But only rarely, i.e. in case a race would actually have occurred.
>>>>>
>>>>> Maybe I am too paranoid here. The other side of race is controlled by a
>>>>> domain. So wouldn't it be possible to increase how often the race is hit?
>>>>
>>>> Yes, of course - just to harm itself.
>>>
>>> Are you sure? Wouldn't this also harm the next vCPU running on the pCPU
>>> because it will get interrupted more often?
>>
>> Possibly, sure. But we don't make any promises here. And recall that
>> this optimization as a whole has been put under question in the past.
> 
> I don't remember this discussion. Do you have a pointer?

I'm sorry, but no, I don't have a pointer. This may even have been on irc.
All I recall (or at least I think I do) is that it was Andrew who raised
the concern.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.