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

RE: [XEN][PATCH v7 14/19] common/device_tree: Add rwlock for dt_host


  • To: Vikram Garhwal <vikram.garhwal@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Fri, 2 Jun 2023 01:58:25 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=v6HTBq2BtnCXTO9LEis8hpg7lMj2+rcpyw1lBs0GN7I=; b=XktVANklJcKKHDVw5ioVMrfXu6nmhQ09XGQKoc3sFDc9AU6DABzzJ3jjQ0xYQyDOAWHS+okNACc7vWET9lqtG39NpcEjOHcEmfez7165KX/aPIKtQUCuIOSk3sNEyJK3L0qGEB9lpYaY5RT7vjjS5861WrGdXX3AxyXtSRar+FSM0u61C9wSO7nMl4m0r5sg7LgnocywsJojSqssydHKt9wAc2hZQtBYhEgN84Qp9RlQ5nqztMKZPupVFGHpJsLt3R4PnhpKiEqESVPEiLjFNG0NGMQ5ed1XM4KnRW/BqTWekdS0i0WkOb2oIfQ5K/GVA8XNO7D1fazpzMDVaEXaRA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ff5UF5Ggr95yP4h6iHogJxyKMFqr9vw8hxZ+4qBQfwP8+h7Bn6+qk1/xnPEYn1GKMvtfYU8t7AjlvPRYol/Vo/Pokh/49H3753tf5vgpxoZz3CTovvcOcMpWqFGoCrpw8uNNtuXKgbZVhWfg0392P6xm6HNXF0/t6WV7qa0u+7bp9nbgICcuk83pkm1pWPqBYDJquY071jKo7Ms0xtIBWs2qfuCII628gBZyzyeitv0cA689aJk5epvR84FQHvzJcXXf4/U7nR6KW4UWEFYwz159r0GiypeMgYNJzzku1VTWAPDA8lEbH3mdrohYvzusek4cktAvIXN/kg20Dg2C8A==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Fri, 02 Jun 2023 01:58:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZlOwaX4LVBFA07UiCkT/feXB9lq92wX/Q
  • Thread-topic: [XEN][PATCH v7 14/19] common/device_tree: Add rwlock for dt_host

Hi Vikram,

> -----Original Message-----
> Subject: [XEN][PATCH v7 14/19] common/device_tree: Add rwlock for dt_host
> 
>  Dynamic programming ops will modify the dt_host and there might be other
>  function which are browsing the dt_host at the same time. To avoid the race
>  conditions, adding rwlock for browsing the dt_host during runtime.
> 
>  Reason behind adding rwlock instead of spinlock:
>     For now, dynamic programming is the sole modifier of dt_host in Xen
> during
>         run time. All other access functions like iommu_release_dt_device() 
> are
>         just reading the dt_host during run-time. So, there is a need to 
> protect
>         others from browsing the dt_host while dynamic programming is
> modifying
>         it. rwlock is better suitable for this task as spinlock won't be able 
> to
>         differentiate between read and write access.
> 
> Signed-off-by: Vikram Garhwal <vikram.garhwal@xxxxxxx>

Reviewed-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry



 


Rackspace

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