From: Andrew Morton <akpm@zip.com.au>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: axboe@suse.de, linux-kernel@vger.kernel.org
Subject: Re: Patch: linux-2.5.20/fs/bio.c - ll_rw_kio made incorrect assumptions about queue handler's capabilities
Date: Wed, 05 Jun 2002 17:22:07 -0700 [thread overview]
Message-ID: <3CFEAB2F.C3203ED8@zip.com.au> (raw)
In-Reply-To: <200206060004.RAA00496@baldur.yggdrasil.com>
"Adam J. Richter" wrote:
>
> ..
> + max_bytes = q->max_sectors << 9;
Does this not also need to be done in fs/mpage.c? It's
just using BIO_MAX_SIZE.
What particular problem are you trying to solve here?
> /*
> * maybe kio is bigger than the max we can easily map into a bio.
> * if so, split it up in appropriately sized chunks.
> @@ -367,8 +370,14 @@
>
> map_i = 0;
>
> + max_pages = (max_bytes + PAGE_MASK) >> PAGE_SHIFT;
> + if (max_pages > q->max_phys_segments)
> + max_pages = q->max_phys_segments;
> + if (max_pages > q->max_hw_segments)
> + max_pages = q->max_hw_segments;
> +
I think probably this should be implemented as a block API
function.
This is going to drag us back into the BIO splitting quagmire.
> next_chunk:
> - nr_pages = BIO_MAX_SECTORS >> (PAGE_SHIFT - 9);
> + nr_pages = max_pages;
hmm. So BIO is based on PAGE_SIZE pages. Not PAGE_CACHE_SIZE.
I currently have:
unsigned nr_bvecs = MPAGE_BIO_MAX_SIZE / PAGE_CACHE_SIZE;
Which is about the only sane way in which the pagecache BIO
assembly code can go from "bytes" to "number of pages".
It's going to get interesting if someone makes PAGE_SIZE != PAGE_CACHE_SIZE.
next prev parent reply other threads:[~2002-06-06 0:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-06 0:04 Patch: linux-2.5.20/fs/bio.c - ll_rw_kio made incorrect assumptions about queue handler's capabilities Adam J. Richter
2002-06-06 0:22 ` Andrew Morton [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-06-06 1:02 Adam J. Richter
2002-06-05 23:02 Adam J. Richter
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=3CFEAB2F.C3203ED8@zip.com.au \
--to=akpm@zip.com.au \
--cc=adam@yggdrasil.com \
--cc=axboe@suse.de \
--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