From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: kosaki.motohiro@jp.fujitsu.com, peterz@infradead.org,
xiaosuo@gmail.com, akpm@linux-foundation.org, hnguyen@de.ibm.com,
raisch@de.ibm.com, rolandd@cisco.com, sean.hefty@intel.com,
hal.rosenstock@gmail.com, divy@chelsio.com,
James.Bottomley@suse.de, tytso@mit.edu, adilger@sun.com,
viro@zeniv.linux.org.uk, menage@google.com, lizf@cn.fujitsu.com,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, containers@lists.linux-foundation.org,
eric.dumazet@gmail.com
Subject: Re: [PATCH 1/9] mm: add generic adaptive large memory allocationAPIs
Date: Mon, 17 May 2010 10:34:30 +0900 (JST) [thread overview]
Message-ID: <20100517103050.21B6.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <201005132236.ADJ57893.FLFFMtOVJHOOSQ@I-love.SAKURA.ne.jp>
> Peter Zijlstra wrote:
> > NAK, I really utterly dislike that inatomic argument. The alloc side
> > doesn't function in atomic context either. Please keep the thing
> > symmetric in that regards.
>
> Excuse me. kmalloc(GFP_KERNEL) may sleep (and therefore cannot be used in
> atomic context). However, kfree() for memory allocated with kmalloc(GFP_KERNEL)
> never sleep (and therefore can be used in atomic context).
> Why kmalloc() and kfree() are NOT kept symmetric?
In kmalloc case, we need to consider both kmalloc(GFP_KERNEL)/kfree() pair and
kmalloc(GFP_ATOMIC)/kfree() pair. latter is mainly used on atomic context.
To make kfree() atomic help to keep the implementation simple.
But kvmalloc don't have GFP_ATOMIC feautre. that's big difference.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-05-17 1:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 9:51 [PATCH 1/9] mm: add generic adaptive large memory allocation APIs Changli Gao
2010-05-13 13:20 ` Peter Zijlstra
2010-05-13 13:36 ` [PATCH 1/9] mm: add generic adaptive large memory allocationAPIs Tetsuo Handa
2010-05-17 1:34 ` KOSAKI Motohiro [this message]
2010-05-13 14:08 ` [PATCH 1/9] mm: add generic adaptive large memory allocation APIs Changli Gao
2010-05-14 8:03 ` Peter Zijlstra
2010-05-14 8:12 ` Changli Gao
2010-05-13 14:39 ` Milton Miller
2010-05-13 14:49 ` Changli Gao
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=20100517103050.21B6.A69D9226@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=James.Bottomley@suse.de \
--cc=adilger@sun.com \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.linux-foundation.org \
--cc=divy@chelsio.com \
--cc=eric.dumazet@gmail.com \
--cc=hal.rosenstock@gmail.com \
--cc=hnguyen@de.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=menage@google.com \
--cc=netdev@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=peterz@infradead.org \
--cc=raisch@de.ibm.com \
--cc=rolandd@cisco.com \
--cc=sean.hefty@intel.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--cc=xiaosuo@gmail.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