From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v5 04/10] xen/blkfront: split per device io_lock Date: Mon, 16 Nov 2015 15:59:03 -0500 Message-ID: <20151116205903.GA8547@char.us.oracle.com> References: <1447470739-18136-1-git-send-email-bob.liu@oracle.com> <1447470739-18136-5-git-send-email-bob.liu@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1447470739-18136-5-git-send-email-bob.liu@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Bob Liu Cc: jonathan.davies@citrix.com, felipe.franciosi@citrix.com, rafal.mielniczuk@citrix.com, linux-kernel@vger.kernel.org, xen-devel@lists.xen.org, axboe@fb.com, david.vrabel@citrix.com, avanzini.arianna@gmail.com, roger.pau@citrix.com List-Id: xen-devel@lists.xenproject.org On Sat, Nov 14, 2015 at 11:12:13AM +0800, Bob Liu wrote: > After commit "xen/blkfront: separate per ring information out of device > info", per-ring data is protected by a per-device lock('io_lock'). > > This is not a good way and will effect the scalability, so introduces a > per-ring lock('ring_lock'). > > The old 'io_lock' is renamed to 'dev_lock' which protects the ->grants list and > persistent_gnts_c shared by all rings. I changed the description a bit: xen/blkfront: split per device io_lock After patch "xen/blkfront: separate per ring information out of device info", per-ring data is protected by a per-device lock ('io_lock'). This is not a good way and will effect the scalability, so introduce a per-ring lock ('ring_lock'). The old 'io_lock' is renamed to 'dev_lock' which protects the ->grants list and ->persistent_gnts_c which are shared by all rings. Note that in 'blkfront_probe' the 'blkfront_info' is setup via kzalloc so setting ->persistent_gnts_c to zero is not needed.