From: Gerald Champagne <gerald.champagne@esstech.com>
To: linux-kernel@vger.kernel.org
Subject: ide prd table size
Date: 02 Aug 2002 12:30:46 -0500 [thread overview]
Message-ID: <1028309451.29024.659.camel@localhost.localdomain> (raw)
I have a question about the calculation of the PRD_ENTRIES constant used
in the ide code The documentation for the size of PRD_ENTRIES says
this:
-----------------------------
/*
Our Physical Region Descriptor (PRD) table should be large enough to
handle the biggest I/O request we are likely to see. Since requests can
have no more than 256 sectors, and since the typical blocksize is two or
more sectors, we could get by with a limit of 128 entries here for the
usual worst case. Most requests seem to include some contiguous blocks,
further reducing the number of table entries required.
As it turns out though, we must allocate a full 4KB page for this, so
the two PRD tables (ide0 & ide1) will each get half of that, allowing
each to have about 256 entries (8 bytes each) from this.
*/
#define PRD_BYTES 8
#define PRD_ENTRIES (PAGE_SIZE / (2 * PRD_BYTES))
-----------------------------
This looks a little outdated, but I'm interested in the second
paragraph. I don't see where multiple interfaces are sharing the same
page. The documentation here and for pci_alloc_consistent says that
blocks are allocated in full pages. This implies that the unused
portion is wasted.
So...
- Is the code wasting half of the page, and should PRD_ENTRIES be
redefined to be larger?
- Am I misunderstanding the documentation, and is the other half of the
page used somewhere else?
- Am I misunderstanding the code, and do multiple interfaces share the
page?
- Should this be modified to use the pci_pool interface as defined in
DMA-mapping.txt?
Thanks!
Gerald
next reply other threads:[~2002-08-02 17:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-02 17:30 Gerald Champagne [this message]
2002-08-03 23:32 ` ide prd table size Marcin Dalecki
2002-08-06 16:27 ` Gerald Champagne
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=1028309451.29024.659.camel@localhost.localdomain \
--to=gerald.champagne@esstech.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.