linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alasdair G Kergon <agk@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>,
	"Zhang, Yanmin" <yanmin_zhang@linux.intel.com>,
	"xinhui.pan" <xinhuix.pan@intel.com>,
	linux-kernel@vger.kernel.org, agk@redhat.com, snitzer@redhat.com,
	dm-devel@redhat.com, "Liu, ShuoX" <shuox.liu@intel.com>
Subject: Re: [dm-devel] [PATCH] md/dm-ioctl.c: optimize memory allocation in copy_params
Date: Wed, 23 Jul 2014 13:54:07 +0100	[thread overview]
Message-ID: <20140723125407.GG6822@agk-dp.fab.redhat.com> (raw)
In-Reply-To: <alpine.LRH.2.02.1407230816000.29551@file01.intranet.prod.int.rdu2.redhat.com>

On Wed, Jul 23, 2014 at 08:16:58AM -0400, Mikulas Patocka wrote:
> So, it means that you do not use device mapper at all. So, why are you 
> trying to change memory allocation in device mapper?
 
So the *test* they run is asking device-mapper to briefly reserve a 64KB
buffer when there is no data to report:  The answer is not to run that
pointless test:)

And if a single 64KB allocation really is a big deal, then patch 'vold'
in userspace so it doesn't ask for 64KB when it clearly doesn't need it!

+ int Devmapper::dumpState(SocketClient *c) {
+    char *buffer = (char *) malloc(1024 * 64);

The code has just
#define DEVMAPPER_BUFFER_SIZE 4096
for all the other dm ioctls it issues.

Only use a larger value when it is needed i.e. if DM_BUFFER_FULL_FLAG gets set.

Alasdair


  reply	other threads:[~2014-07-23 12:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04 10:22 [PATCH] md/dm-ioctl.c: optimize memory allocation in copy_params xinhui.pan
2014-07-08 22:39 ` [dm-devel] " Mikulas Patocka
2014-07-09  2:01   ` Zhang, Yanmin
2014-07-09  3:37     ` xinhui.pan
2014-07-09 14:53     ` Mikulas Patocka
2014-07-22  1:02       ` Zhang, Yanmin
2014-07-22  1:23         ` Alasdair G Kergon
2014-07-22  2:04           ` Alasdair G Kergon
2014-07-23  3:15             ` Zhang, Yanmin
2014-07-23  3:06           ` Zhang, Yanmin
2014-07-23 12:16             ` Mikulas Patocka
2014-07-23 12:54               ` Alasdair G Kergon [this message]
2014-07-23 17:14                 ` Mikulas Patocka
2014-07-24  5:53                   ` Zhang, Yanmin
2014-07-23 12:39         ` 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=20140723125407.GG6822@agk-dp.fab.redhat.com \
    --to=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=shuox.liu@intel.com \
    --cc=snitzer@redhat.com \
    --cc=xinhuix.pan@intel.com \
    --cc=yanmin_zhang@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).