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

Re: [PATCH] dom0/pvh: fix processing softirqs during memory map population


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 7 Feb 2022 10:52:50 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=Yld6LlMD3YNTlB7jKatulCSudWVWc+yVLJhJMQevo3Q=; b=hayKKoVThXUNebK7mskNXPygJ72UoaogP/nHnFN0FaI77RlBow0A8TxiShUjeKnEYXNCtrtYz/b1i0nmEeffagfoUcbk/K3gnzMDMqxveXB3w5crfoua+pbarNgV6dT6GcImGP1q5Jm3ILqgKTdjVS9ibu+lfn53b8XsRXqCBcnBDmPx+d4aXqYYWzXY/tl8qdteKMqjOg0UuCr1dYCb46RHckfVUtR6QkRnp4pnvxc30TXABTkAEXKOdsQLHqoAva26nKEyFaH2c12b2uXlLGcol/V4OYTz6Ca3tIPD7YOcgZM+sk9UDZaL6+ndtGi/qAjkggj7/c+rrUw5dKvIUQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DY0/f0n7b+1IYNutyR6QYvg//WqwUDJ3eI0ad+swcj4HPpj3t4mFaH+XrElfGeRoLDkU0ZmjuvxtKGSX7hxVVHsAiDd73gq7BJIPaVRUUiJpd4/+4TN9csODMp3+Ran8etggbeeAMpM6BKnIHDT770rXIfjP/pLgp0XWDCSz/pzDvYN3mx6MzWmYi/oTz7g31jWdsKGiZISYSi972Aeu5D8KVJpzApTiBgW3B37hhpr8G5rfgjBmGI0z9GQ3YXKX8IZw1J+yPIbwTg6G5/CDo9h08hzVIHBJn9Ur6zVdLfbASBrw91x6wxn7FKaZKd3NQ3AyCAp7EVXWMdax64SQfw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 07 Feb 2022 09:52:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.02.2022 10:51, Roger Pau Monné wrote:
> On Mon, Feb 07, 2022 at 09:21:11AM +0100, Jan Beulich wrote:
>> On 05.02.2022 11:18, Roger Pau Monne wrote:
>>> --- a/xen/arch/x86/hvm/dom0_build.c
>>> +++ b/xen/arch/x86/hvm/dom0_build.c
>>> @@ -186,7 +186,7 @@ static int __init pvh_populate_memory_range(struct 
>>> domain *d,
>>>          start += 1UL << order;
>>>          nr_pages -= 1UL << order;
>>>          order_stats[order]++;
>>> -        if ( (++i % MAP_MAX_ITER) == 0 )
>>> +        if ( (i++ % MAP_MAX_ITER) == 0 )
>>>              process_pending_softirqs();
>>>      }
>>
>> This way is perhaps easiest, so
>>
>> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
>>
>> but I'd like you to consider to avoid doing this on the first
>> iteration. How about keeping the code here as is, but instead
>> insert an invocation in the sole caller (and there unconditionally
>> at the end of every successful loop iteration)?
> 
> In fact I was thinking that we should call process_pending_softirqs on
> every iteration: the calls to guest_physmap_add_page could use a 1G
> page order, so if not using sync-pt (at least until your series for
> IOMMU super-page support is committed) mapping a whole 1G page using
> 4K chunks on the IOMMU page-tables could be quite time consuming, and
> hence we would likely need to process softirqs on every iteration.

Good point; please do so.

Jan




 


Rackspace

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