From: crquan@gmail.com
To: dm-devel@redhat.com
Cc: Alasdair G Kergon <agk@redhat.com>, linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] dm-target: target_type improvements
Date: Fri, 19 Dec 2008 12:19:42 +0800 [thread overview]
Message-ID: <1229660385-17153-1-git-send-email-crquan@gmail.com> (raw)
From: Cheng Renquan <crquan@gmail.com>
The series of patches:
1. use module's refcount instead of self-maintained use field;
2. use pointer reference instead of making a copy of target_type;
3. totally remove tt_internal;
The 3rd patch may be controversial,
On Wed, Dec 17, 2008 at 7:48 PM, Alasdair G Kergon <agk@redhat.com> wrote:
> Target registrations should be rare one-off events. The existing trade-off
> is
> in favour of a cleaner interface (that does not expose private fields). The
> struct target_type passed to dm_register_target is always static read-only
> data
> and perhaps that could be enforced and a pointer stored in tt_internal
> instead
> of making a copy.
But I still think it's worth it:
1. current users of struct target_type hasn't been marked with const, just
static;
2. other similar structures (file_system_type in filesystems, packet_type in
net core, ) all have internally used list_head for manage purpose;
this design can avoid memory frag from kmalloc/kfree.
--
Cheng Renquan, Shenzhen, China
next reply other threads:[~2008-12-19 4:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-19 4:19 crquan [this message]
2008-12-19 4:19 ` [PATCH 1/3] dm-target: use the module's refcount instead crquan
2008-12-19 4:19 ` [PATCH 2/3] dm-target: use pointer reference instead of making a copy crquan
2008-12-19 4:19 ` [PATCH 3/3] dm-target: embed internally used list_head into target_type crquan
2009-01-02 18:12 ` [dm-devel] [PATCH 0/3] dm-target: target_type improvements Alasdair G Kergon
2009-01-03 6:42 ` Cheng Renquan (程任全)
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=1229660385-17153-1-git-send-email-crquan@gmail.com \
--to=crquan@gmail.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.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