mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alasdair G Kergon <agk@redhat.com>
To: crquan@gmail.com
Cc: dm-devel@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [dm-devel] [PATCH] dm-target.c: simplify target_type to avoid kmalloc
Date: Wed, 17 Dec 2008 11:48:07 +0000	[thread overview]
Message-ID: <20081217114807.GD25976@agk.fab.redhat.com> (raw)
In-Reply-To: <1228822355-12674-1-git-send-email-crquan@gmail.com>

On Tue, Dec 09, 2008 at 07:32:35PM +0800, crquan@gmail.com wrote:
> Move the list_head from tt_internal into struct target_type embedded,
> The struct tt_internal is totally unneeded, and the kmalloc is avoided,
> block of memory copy is also avoided
 
> The only defect is that dm_register_target users cannot use const
> target_type anymore.
 
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.

> the function of tt_internal's use field is replaced by the module's
> reference count.
 
That is an independent change I think: please submit it as a separate patch.
When this was first written, the module reference count was managed differently
by this code so I can well believe 'use' is now superfluous.

Alasdair
-- 
agk@redhat.com

      reply	other threads:[~2008-12-17 11:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-09 11:32 crquan
2008-12-17 11:48 ` Alasdair G Kergon [this message]

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=20081217114807.GD25976@agk.fab.redhat.com \
    --to=agk@redhat.com \
    --cc=crquan@gmail.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

all inboxes | Powered by JetHome®