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

Re: [Xen-devel] [PATCH v7 03/16] xen: clean up grant_table.h



>>> On 19.09.17 at 11:58, <jgross@xxxxxxxx> wrote:
> --- a/xen/common/grant_table.c
> +++ b/xen/common/grant_table.c
> @@ -40,6 +40,45 @@
>  #include <xsm/xsm.h>
>  #include <asm/flushtlb.h>
>  
> +/* Per-domain grant information. */
> +struct grant_table {
> +    /*
> +     * Lock protecting updates to grant table state (version, active
> +     * entry list, etc.)
> +     */
> +    percpu_rwlock_t       lock;
> +    /* Lock protecting the maptrack limit */
> +    spinlock_t            maptrack_lock;

Hmm, I'm not sure about putting two locks so obviously close to one
another. But then again the structure doesn't look to be larger than
a cache line anyway, so moving it wouldn't be any win as it seems.

> @@ -1580,7 +1659,7 @@ gnttab_unpopulate_status_frames(struct domain *d, 
> struct grant_table *gt)
>   * Grow the grant table. The caller must hold the grant table's
>   * write lock before calling this function.
>   */
> -int
> +static int
>  gnttab_grow_table(struct domain *d, unsigned int req_nr_frames)
>  {

Wouldn't this better be part of patch 2? But no need to resend
because of this unless v8 becomes necessary anyway.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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