From: Mikulas Patocka <mpatocka@redhat.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org,
jens.axboe@oracle.com
Subject: Re: [SUGGESTION]: drop virtual merge accounting in I/O requests
Date: Fri, 11 Jul 2008 06:52:09 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0807110649510.16550@engineering.redhat.com> (raw)
In-Reply-To: <20080711152054C.fujita.tomonori@lab.ntt.co.jp>
On Fri, 11 Jul 2008, FUJITA Tomonori wrote:
> On Thu, 10 Jul 2008 17:56:08 -0400 (EDT)
> Mikulas Patocka <mpatocka@redhat.com> wrote:
>
>> When I thought about it more, I realized that this accounting of virtual
>> segments in I/O layer can't work correctly at all. If an architecture
>> defines symbols BIOVEC_VIRT_MERGEABLE and BIOVEC_VIRT_OVERSIZE, it
>> declares that it's IOMMU must merge any two regions satisfying these
>> conditions. But in an IOMMU, it is impossible to guarantee, because:
>
> Yeah, IOMMUs can't guarantee that. The majority of architectures set
> BIO_VMERGE_BOUNDARY to 0 so they don't hit this, I think.
Yes, the architectures without IOMMU don't hit this problem.
>> * the bus address is allocated basiclly randomly, so we can hit
>> dev->dma_parms->segment_boundary_mask any time. This will prevent virtual
>> merging from happenning. I/O layer doesn't know the bus address at the
>> time it merges requests, so it can't predict when this happens.
>>
>> * the IOMMU isn't guaranteed to find a continuous space in it's bus
>> address space. If it skips over already mapped regions, it can't perform
>> virtual merging.
>>
>> * when creating the mapping, we can hit per-device limit
>> "dev->dma_parms->max_segment_size" --- but the I/O layer checks only
>> against global limit BIOVEC_VIRT_OVERSIZE. (this last issue is fixable,
>> the previous two are not).
>
> I think that the block layer can handle this properly via
> q->max_segment_size. We have the same value at two different
> places. Yeah, it's not good...
>
>
> BTW, inia100_template sets sg_tablesize to SG_ALL. If the controller
> has at most 32 SG entries per request, we need to fix that.
Later, it sets that to shost->sg_tablesize = TOTAL_SG_ENTRY; I don't know
why in inia100_template there is SG_ALL.
Mikulas
next prev parent reply other threads:[~2008-07-11 10:53 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 21:56 Mikulas Patocka
2008-07-10 22:59 ` Julian Calaby
2008-07-10 23:57 ` Mikulas Patocka
2008-07-11 6:20 ` FUJITA Tomonori
2008-07-11 10:52 ` Mikulas Patocka [this message]
2008-07-11 11:15 ` FUJITA Tomonori
2008-07-11 19:41 ` David Miller
2008-07-11 20:22 ` Mikulas Patocka
2008-07-12 12:30 ` Andi Kleen
2008-07-13 13:34 ` Mikulas Patocka
2008-07-13 13:50 ` Andi Kleen
2008-07-13 19:46 ` David Miller
2008-07-13 20:13 ` Andi Kleen
2008-07-13 23:53 ` Mikulas Patocka
2008-07-14 0:48 ` David Miller
2008-07-14 12:16 ` Mikulas Patocka
2008-07-14 12:28 ` David Miller
2008-07-14 14:03 ` Mikulas Patocka
2008-07-14 21:37 ` David Miller
2008-07-14 23:16 ` Mikulas Patocka
2008-07-15 1:31 ` David Miller
2008-07-15 22:32 ` Mikulas Patocka
2008-07-15 22:37 ` David Miller
2008-07-15 22:59 ` Mikulas Patocka
2008-07-15 2:40 ` FUJITA Tomonori
2008-07-14 0:41 ` David Miller
2008-07-14 2:19 ` FUJITA Tomonori
2008-07-14 3:20 ` David Miller
2008-07-14 17:45 ` FUJITA Tomonori
2008-07-14 21:26 ` Mikulas Patocka
2008-07-15 2:40 ` FUJITA Tomonori
2008-07-15 12:09 ` Mikulas Patocka
2008-07-15 12:15 ` Andi Kleen
2008-07-15 13:16 ` Mikulas Patocka
2008-07-15 14:06 ` Andi Kleen
2008-07-15 12:19 ` FUJITA Tomonori
2008-07-16 3:10 ` David Miller
2008-07-16 4:38 ` FUJITA Tomonori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0807110649510.16550@engineering.redhat.com \
--to=mpatocka@redhat.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome