From: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: device-mapper development <dm-devel@redhat.com>,
Alasdair G Kergon <agk@redhat.com>
Subject: Re: [PATCH 2/2] Use low pointer bits for dm io region
Date: Wed, 11 Nov 2009 16:26:15 +0900 [thread overview]
Message-ID: <4AFA6717.2060305@ct.jp.nec.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0911102104350.23116@hs20-bc2-1.build.redhat.com>
Hi Mikulas,
On 11/11/2009 11:05 AM +0900, Mikulas Patocka wrote:
> Use low pointer bits for dm io region
>
> We need to store two things per bio: the pointer to the main io structure and
> a region number, an index of disk where this bio belongs to (if there is
> simultaneous write to multiple disks). There can be at most BITS_PER_LONG
> regions. BITS_PER_LONG is 32 on 32-bit machines and 64 on 64-bit machines.
>
> A region number was stored in the last hidden bio vector and the pointer to
> struct io was stored in bi_private.
>
> This patch changes it so that "struct io" is always aligned on BITS_PER_LONG
> bytes and region number is stored in the low BITS_PER_LONG bits of bi_private.
The code is not easily readable for me.
Why don't you introduce a new structure in which those two things
can be stored, and allocate/attach it per bio?
If it's possible, the code should be easy to read and maintain, I think.
Thanks,
Kiyoshi Ueda
next prev parent reply other threads:[~2009-11-11 7:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 2:05 [PATCH 2/2] Use low pointer bits for dm io region Mikulas Patocka
2009-11-11 7:26 ` Kiyoshi Ueda [this message]
2009-11-11 15:04 ` Alasdair G Kergon
2009-11-11 20:50 ` Mikulas Patocka
2009-11-11 20:29 ` Mikulas Patocka
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=4AFA6717.2060305@ct.jp.nec.com \
--to=k-ueda@ct.jp.nec.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=mpatocka@redhat.com \
/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.