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

Re: [PATCH] x86/PoD: defer nested P2M flushes


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 19 Oct 2021 12:50:24 +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=PdSCyaJ77SNV6Fu86xcQ6jM8t+zvodwnQIieN78m3So=; b=ao0Yg6fYh48iYUbCHy8ASnJdrLJHxFFbJ2BshbwWyp29Fb7rj54YxR3R3XJB2Tv4O7V/+BSOF6wZWe3D64KCGStdktBeY9vtsucqh32KpAO5OSXWaO5OxgWu36vuxTPQpiX5vjU1Wc+NcAFthAoIh0WUFN4OIFYZUQe5rYooGEQWsLxlLXkPCnRr86966NBT10x3H6/bUdhS+d9hm4uTGyh6QvIQL0r6P4MdcqD056NO5S6Km+IUpBsiLYsR51wsZXMqOM052CRTbpZXoI+2/4mlYVkOQwD7c7g4Zj9rjIGRatrH1kqlmjtsxRDY9UYI8P5yEI60AZmpof1Gb9kTIQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j4ROPjMjblziqLt4GIbz0h7jI5cc2+qJDmFPHPdFSxFSpAwMBZ/kUCX4M4lIJWSviokGZxG+HRnVorCTfvnCwTpIeyj6VM5OW3b2riL6RlvLgp8Hso5AzdHtmOs2uMFew6QGFHgZzzb90GoOq+57g7VlsOKyhGN5UdqKSne7Tvuq2/hQ+PIwWHm41VKMWjrrIi2rOcyoJnxtvwIIOXO0PNU/nt6gNM4LFsNOoZwia5Y8eHDEzRFvcJcILs+LCAay1NlCnCdxNzv7EV2o+bi+saPUhQ8tRuVMaEql6C4SuC9AMAnLJdiSOVibB0776bZauwSx3kayXTeVekwf6HIZGg==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
  • Delivery-date: Tue, 19 Oct 2021 10:50:37 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.10.2021 12:39, Roger Pau Monné wrote:
> On Tue, Oct 19, 2021 at 10:19:57AM +0200, Jan Beulich wrote:
>> On 19.10.2021 10:17, Jan Beulich wrote:
>>> On 19.10.2021 10:09, Roger Pau Monné wrote:
>>>> On Mon, Oct 11, 2021 at 10:17:08AM +0200, Jan Beulich wrote:
>>>>> @@ -1229,8 +1242,9 @@ p2m_pod_demand_populate(struct p2m_domai
>>>>>          __trace_var(TRC_MEM_POD_POPULATE, 0, sizeof(t), &t);
>>>>>      }
>>>>>  
>>>>> -    pod_unlock(p2m);
>>>>> +    pod_unlock_and_flush(p2m);
>>>>>      return true;
>>>>> +
>>>>>  out_of_memory:
>>>>>      pod_unlock(p2m);
>>>>
>>>> Don't you need to set defer_nested_flush = false in the out_of_memory
>>>> label? (as you don't call pod_unlock_and_flush that would do it)
>>>
>>> Yes of course - thanks for spotting. I had pod_unlock_and_flush() here
>>> too initially, and when switching back I forgot to convert rather than
>>> just delete that.
>>
>> Oh, wait, that was on purpose: There's no point clearing the flag
>> when the next thing we do is invoke domain_crash(). If it wasn't
>> that way, I don't think I could avoid using pod_unlock_and_flush()
>> here as well.
> 
> Oh, I see. We would need to be careful if that domain crash is ever
> removed.

Well, I can change the call there as well. Doing so would seem preferable
over adding a respective comment there. I didn't do so originally because
as it stands this would be meaningless code churn. Let me know what you
think.

Jan




 


Rackspace

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