From: "Jeff V. Merkey" <jmerkey@drdos.com>
To: Jens Axboe <axboe@suse.de>
Cc: jmerkey@galt.devicelogics.com, linux-kernel@vger.kernel.org
Subject: Re: 2.6.9-rc2 bio sickness with large writes
Date: Mon, 20 Sep 2004 13:20:32 -0600 [thread overview]
Message-ID: <414F2D80.9090909@drdos.com> (raw)
In-Reply-To: <20040920180957.GB7616@suse.de>
Jens Axboe wrote:
>>page and offset sematics in the interface are also somewhat burdensome.
>>Wouldn't a more reasonable
>>interface for async IO be:
>>
>>address
>>length
>>address
>>length
>>
>>rather than
>>
>>page structure
>>offset in page structure
>>page structure
>>offset in page structure
>>
>>
>
>No, because { address, length } cannot fully describe all memory in any
>given machine.
>
>
>
This response I don't understand. How memory is described in a machine
for DMA addressibility
is pretty standard (with the exception of memory on intel machine in 32
bit systems above 4GBthat need page tables) --
a physical numerical address. But who is going to DMA into memory not in
the address space.
>Any chunk of memory has a page associated with it, but it may not have a
>kernel address mapping associated with it. So some identifier was needed
>other than a virtual address, a page is as good as any so making one up
>would be silly.
>
>Once you understand this, it doesn't seem so odd. You need to pass in a
>single page or sg table to map for dma anyways, the sg table holds page
>pointers as well.
>
>
>
>>I can assume from the interface as designed that if you pass an offset
>>for a page that is not page aligned,
>>and ask for a 4K write, then you will end up dropping the data on the
>>floor than spans beyond the end of the page.
>>
>>
>
>What kind of bogus example is that? Asking for a 4K write from a 4K page
>but asking to start 1K in that page is just stupid and not even remotely
>valid.
>
>
>
Hardware doesn't care about page boundries. It sees hardware addresses
and lengths, at
least most SG hardware I've worked with does. For ease of submission, an
interface that
takes <address,length> would suffice. Why on earth would someone need a
context
pointer into the kernel's page tables to submit an SG into a device,
apart from performing
virtual-to-physical translation?
>It's not difficult at all. Apparently you don't understand it so you
>think it's difficult, that's only natural. But you have access to the
>page mapping of any given piece of data always, or if you have the
>virtual address only it's trivial to go to the { page, offset } mapping.
>
>
No, I do understand, and using page/offset at a low level SG interface
IS burdensome.
I mean, if this is what I have to support I guess I have to use it, but
it will be just another
section of code where I have another **FAT** layer to waste more CPU
cycles calculating
offset/page (oh yeah I have to lookup the struct page * structure also)
when it would be much
simpler to just submit address/len in i386 systems. With this type of
interface, If I have for instance
an on-disk structure that starts in the middle of a 4K page due to other
headers, etc. than spans
a page, I cannot just submit the address and length, I have to break it
into two bio requests instead
of one with a for () loop from hell and calculate the offsets and rumage
around in memory looking
up struct page * addresses.
>I can only imagine that you are used to a very different interface on
>some other OS so you think it's difficult to use. Most of your
>complaints seem to be based on false assumptions or because you don't
>understand why certain design decisions were made.
>
>
>
No. I am used to programming to hardware with SG devices that all OS
use. Is there somewhere a page based
SG device (other than SCI) for disk drive?. I don't think so, I think
they operate address/len, address/len, etc.
:-)
Jeff
next prev parent reply other threads:[~2004-09-20 19:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-15 23:39 2.6.9-rc2 bio sickness with large writes Jeff V. Merkey
2004-09-16 6:34 ` Jens Axboe
2004-09-16 16:38 ` Jeff V. Merkey
2004-09-17 7:36 ` Jens Axboe
[not found] ` <20040917201604.GA12974@galt.devicelogics.com>
2004-09-20 17:12 ` Jeff V. Merkey
2004-09-20 18:09 ` Jens Axboe
2004-09-20 19:20 ` Jeff V. Merkey [this message]
2004-09-21 6:40 ` Jens Axboe
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=414F2D80.9090909@drdos.com \
--to=jmerkey@drdos.com \
--cc=axboe@suse.de \
--cc=jmerkey@galt.devicelogics.com \
--cc=linux-kernel@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