From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: pvSCSI question - can a gref describe more than one page? Date: Wed, 10 Mar 2010 11:18:46 -0800 Message-ID: <4B97F096.8040406@goop.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: James Harper Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 03/09/2010 07:18 PM, James Harper wrote: > Porting the pvSCSI backend driver to the pvops kernel is turning out to > be a bit harder than first thought, mostly because all the Linux > routines that might be useful are written with the assumption that they > would be passed a mapped buffer and they would then build an sg list out > of that. pvSCSI already has an sg list, and all the routines that it > makes use of have been deprecated since 2.6.18 (all the comments on the > patches that remove the routines are like "nobody uses this anymore". > D'oh.) > > The big complication appears to be that pvSCSI seems to think that an > individual sg element can span a page, and so has to muck around > splitting it into page-sized chunks. My assumption is that this is > because the code in pvSCSI was cut&pasted from somewhere else. > In general its a bug if an sg entry crosses a page boundary. We define BIOVEC_PHYS_MERGEABLE so that we avoid doing any cross-page merges (unless, I think, the underlying mfns are actually contiguous). Does that help? J