lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151105024314.GD3949@x230.dumpdata.com>
Date:	Wed, 4 Nov 2015 21:43:15 -0500
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	Bob Liu <bob.liu@...cle.com>
Cc:	xen-devel@...ts.xen.org, linux-kernel@...r.kernel.org,
	roger.pau@...rix.com, felipe.franciosi@...rix.com, axboe@...com,
	avanzini.arianna@...il.com, rafal.mielniczuk@...rix.com,
	jonathan.davies@...rix.com, david.vrabel@...rix.com
Subject: Re: [PATCH v4 10/10] xen/blkback: make pool of persistent grants and
 free pages per-queue

On Mon, Nov 02, 2015 at 12:21:46PM +0800, Bob Liu wrote:
> Make pool of persistent grants and free pages per-queue/ring instead of
> per-device to get better scalability.

How much better scalability do we get?

.. snip .. 
>  
>  
>  /*
> - * pers_gnts_lock must be used around all the persistent grant helpers
> - * because blkback may use multi-thread/queue for each backend.
> + * We don't need locking around the persistent grant helpers
> + * because blkback uses a single-thread for each backed, so we

s/backed/backend/
> + * can be sure that this functions will never be called recursively.
> + *
> + * The only exception to that is put_persistent_grant, that can be called
> + * from interrupt context (by xen_blkbk_unmap), so we have to use atomic
> + * bit operations to modify the flags of a persistent grant and to count
> + * the number of used grants.
>   */

..snip..
> --- a/drivers/block/xen-blkback/common.h
> +++ b/drivers/block/xen-blkback/common.h
> @@ -282,6 +282,22 @@ struct xen_blkif_ring {
>  	spinlock_t		pending_free_lock;
>  	wait_queue_head_t	pending_free_wq;
>  
> +	/* buffer of free pages to map grant refs */

Full stop.
> +	spinlock_t		free_pages_lock;
> +	int			free_pages_num;
> +	struct list_head	free_pages;
> +
> +	/* tree to store persistent grants */

Full stop.
> +	spinlock_t		pers_gnts_lock;
> +	struct rb_root		persistent_gnts;
> +	unsigned int		persistent_gnt_c;
> +	atomic_t		persistent_gnt_in_use;
> +	unsigned long           next_lru;
> +
> +	/* used by the kworker that offload work from the persistent purge */

Full stop.
> +	struct list_head	persistent_purge_list;
> +	struct work_struct	persistent_purge_work;
> +
>  	/* statistics */
>  	unsigned long		st_print;
>  	unsigned long long			st_rd_req;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ