lkml.org 
[lkml]   [2011]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: some questions about block and scatterlist
On Tue, 1 Nov 2011 19:32:38 +0900
loody <miloody@gmail.com> wrote:

> My questions are below:

As are some answers :)

> 1. Are all struct page 32-bit aligned?

Certainly, I would expect any structures found in the system memory map to
be so aligned, yes. If you've created an arbitrary one elsewhere I'm only
99% sure it would be.

> If so, where is this part of code for handleing struct page be 32-bits aligned?

Note that the size of struct page is carefully considered, and that they
are packed as densely as possible, both externally and internally. No
lesser alignment would make sense.

> 2. if the page of scatterlist is located at high mem, how does
> dma_map_sg mapping the virtual address?

That depends on a vast array of things. What are the addressing
capabilities of the target device? Is there an IOMMU involved?

> 3. in blk_rq_map_sg, it seems we only copy bvec->bv_page to sg->page_link
> why don't we add dma_address in bvec and send the bio directly to
> the lower level driver?

That would be a bit of a mixing of the layers, if nothing else.

> 4. if I plug a USB HD with 3 partitions, will there be 3 request_queues?

No, there is one request queue for the underlying device.

That's an interesting mix of questions. If you have more in the future,
you'll likely get more (and more clueful) responses if they're accompanied
by the code you're working on.

Thanks,

jon


\
 
 \ /
  Last update: 2011-11-01 15:29    [W:0.046 / U:0.124 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site