lkml.org 
[lkml]   [2013]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook
>>> "Xu, Dongxiao" <dongxiao.xu@intel.com> 01/07/13 8:17 AM >>>
> From: Jan Beulich [mailto:JBeulich@suse.com]
> >>> On 20.12.12 at 02:23, "Xu, Dongxiao" <dongxiao.xu@intel.com> wrote:
>> > Take the libata case as an example, the static DMA buffer locates
>> > (dev->link->ap->sector_buf , here we use Data Structure B in the graph) in
>> > the following structure:
>> >
>> > -------------------------------------Page boundary
>> > <Data Structure A>
>> > <Data Structure B>
>> > -------------------------------------Page boundary
>> > <Data Structure B (cross page)>
>> > <Data Structure C>
>> > -------------------------------------Page boundary
>> >
>> > Where Structure B is our DMA target.
>> >
>> > For Data Structure B, we didn't care about the simultaneous access, either
>> > lock or sync function will take care of it.
>> > What we are not sure is "read/write of A and C from other processor". As we
>> > will have memory copy for the pages, and at the same time, other CPU may
>> > access A/C.
>>
>> The question is whether what libata does here is valid in the first
>> place - fill an SG list entry with something that crosses a page
>> boundary and is not a compound page.
>
>To make sure I understand you correctly, so do you mean the correct fix should be
> applied to libata driver, and make sure it DMA from/to correct place (for example,
> some memory allocated by DMA API), but not such certain field in a static structure?

Yes.

Jan



\
 
 \ /
  Last update: 2013-01-07 10:21    [W:0.045 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site