[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <04d7dee9-3011-512a-09b0-0e8dcbdd99d6@oracle.com>
Date: Sun, 16 Sep 2018 16:17:35 -0400
From: Boris Ostrovsky <boris.ostrovsky@...cle.com>
To: Dongli Zhang <dongli.zhang@...cle.com>,
xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org
Cc: jgross@...e.com, paul.durrant@...rix.com, wei.liu2@...rix.com,
konrad.wilk@...cle.com, roger.pau@...rix.com,
srinivas.eeda@...cle.com
Subject: Re: [PATCH 1/6] xenbus: prepare data structures and parameter for
xenwatch multithreading
On 9/14/18 3:34 AM, Dongli Zhang wrote:
> +
> +struct mtwatch_info {
> + /*
> + * The mtwatch_domain is put on both a hash table and a list.
> + * domain_list is used to optimize xenbus_watch un-registration.
> + *
> + * The mtwatch_domain is removed from domain_hash (with state set
> + * to MTWATCH_DOMAIN_DOWN) when its refcnt is zero. However, it is
> + * left on domain_list until all events belong to such
> + * mtwatch_domain are processed in mtwatch_thread().
Do we really need to keep mwatch_domain on both lists? Why is keeping it
on, say, only the hash not sufficient?
> + *
> + * While there may exist two mtwatch_domain with the same domid on
> + * domain_list simultaneously,
How is it possible to have two domids on the list at the same time?
Don't you want to remove it (which IIUIC means moving it to the purge
list) when domain is destroyed?
-boris
> + * all mtwatch_domain on hash_hash
> + * should have unique domid.
> + */
> + spinlock_t domain_lock;
> + struct hlist_head domain_hash[MTWATCH_HASH_SIZE];
> + struct list_head domain_list;
> +
> + /*
> + * When a per-domU kthread is going to be destroyed, it is put
> + * on the purge_list, and will be flushed by purge_work later.
> + */
> + struct work_struct purge_work;
> + spinlock_t purge_lock;
> + struct list_head purge_list;
> +};
Powered by blists - more mailing lists