From: Boaz Harrosh <bharrosh@panasas.com>
To: Peng Tao <bergwolf@gmail.com>
Cc: linuxnfs <linux-nfs@vger.kernel.org>, Benny Halevy <bhalevy@tonian.com>
Subject: Re: pnfs LD partial sector write
Date: Thu, 26 Jul 2012 17:30:28 +0300 [thread overview]
Message-ID: <50115484.6040005@panasas.com> (raw)
In-Reply-To: <CA+a=Yy6+7G_-Mef+dEZKqftjwgubMxboCLB9YB4DdrDJoznXvQ@mail.gmail.com>
On 07/26/2012 04:57 PM, Peng Tao wrote:
> On Thu, Jul 26, 2012 at 8:16 PM, Boaz Harrosh <bharrosh@panasas.com> wrote:
>> On 07/26/2012 11:25 AM, Peng Tao wrote:
>>
>>> For these two sectors, I need to allocate two pages... Just look at
>>> struct bio_vec.
>>>
>>
>>
>> NO! I know all about bio_vecs
>>
>> You need 1024 bytes, and 2 x one entry BIOs which is a few bytes, where
>> did you get the "two pages" from?
>>
> What do you put int bio_vec->bv_page? Even if you just use 512 bytes
> of a page, it is still allocated page.
>
No!!
You just use bio_map_kern or in one go blk_rq_map_kern() with any: kmalloc,
stack, or kernel pointer. And that's that. It will take what it will take.
Two such BIOs can use the same page different regions, or a small region
sharing a page with other kmalloc allocations.
I don't see how you got your idea from?
And for the bio itself you use bio_kmalloc(GFP_KERNEL/GFP_NOIO, numentries);
which will give you one BIO + bio_vects in one allocation.
And that is that
You should give me more credit
Boaz
next prev parent reply other threads:[~2012-07-26 14:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 7:31 pnfs LD partial sector write Peng Tao
2012-07-25 10:28 ` Boaz Harrosh
2012-07-25 10:45 ` Boaz Harrosh
2012-07-25 14:43 ` Peng Tao
2012-07-25 20:29 ` Boaz Harrosh
2012-07-26 2:43 ` Peng Tao
2012-07-26 7:29 ` Boaz Harrosh
2012-07-26 8:25 ` Peng Tao
2012-07-26 12:16 ` Boaz Harrosh
2012-07-26 13:57 ` Peng Tao
2012-07-26 14:30 ` Boaz Harrosh [this message]
2012-07-26 15:30 ` Peng Tao
2012-07-26 15:44 ` Boaz Harrosh
2012-07-26 7:47 ` Boaz Harrosh
2012-07-26 9:12 ` Peng Tao
2012-07-26 14:12 ` Boaz Harrosh
2012-07-26 15:07 ` Peng Tao
2012-07-26 16:00 ` Boaz Harrosh
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=50115484.6040005@panasas.com \
--to=bharrosh@panasas.com \
--cc=bergwolf@gmail.com \
--cc=bhalevy@tonian.com \
--cc=linux-nfs@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