mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Joe Perches <joe@perches.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Sangjung Woo <sangjung.woo@samsung.com>
Subject: Re: [RFC PATCH] device: Add kernel standard devm_k.alloc functions
Date: Wed, 9 Oct 2013 12:30:53 -0400	[thread overview]
Message-ID: <20131009163053.GF22495@htj.dyndns.org> (raw)
In-Reply-To: <1381302282.2050.1.camel@joe-AO722>

Hello,

On Wed, Oct 09, 2013 at 12:04:42AM -0700, Joe Perches wrote:
> > > > > 	devm_kzalloc
> > > > > 	devm_kcalloc
> > > > > 	devm_kmalloc_array
> > > > > 
> > > > > Add gfp.h to device.h for the newly added static inlines.
...
> Unless Tejun has an objection soon, yes.

Do we really need devm_kmalloc_array() for devm interface?  The
reasonsing behind only having kzalloc was that it's not worthwhile
skipping zeroing for stuff happening during driver init/exit paths.
The resource management overhead itself is already significant and
unscalable compared to the raw cost of alloc/free and the interface
isn't supposed to be used in super-hot paths.  Shouldn't
devm_kzalloc() and devm_kcalloc() be enough?

Thanks.

-- 
tejun

  reply	other threads:[~2013-10-09 16:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09  5:32 Joe Perches
2013-10-09  5:43 ` Greg KH
2013-10-09  6:16   ` Joe Perches
2013-10-09  6:54     ` Greg KH
2013-10-09  7:04       ` Joe Perches
2013-10-09 16:30         ` Tejun Heo [this message]
2013-10-09 17:49           ` Joe Perches
2013-10-11 20:11 ` Andrew Morton
2013-10-18 16:57   ` Kevin Hilman
2013-10-18 17:04     ` Kevin Hilman
2013-10-18 22:57       ` Greg KH
2013-10-19  5:52         ` Kevin Hilman
2013-10-20  2:57           ` Greg KH
2013-10-20 15:22             ` Joe Perches
2013-10-25 12:59               ` Olof Johansson
2013-10-25 15:23                 ` Greg KH
2013-10-18 17:06     ` Joe Perches
2013-10-18 17:11       ` Kevin Hilman

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=20131009163053.GF22495@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sangjung.woo@samsung.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

all inboxes | Powered by JetHome®