From: Andrew Morton <akpm@zip.com.au>
To: Oliver Neukum <Oliver.Neukum@lrz.uni-muenchen.de>
Cc: linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@transmeta.com>
Subject: Re: question on dup_task_struct
Date: Sat, 03 Aug 2002 15:22:51 -0700 [thread overview]
Message-ID: <3D4C57BB.9D735B13@zip.com.au> (raw)
In-Reply-To: 17b65z-1ERay0C@fmrl02.sul.t-online.com
Oliver Neukum wrote:
>
> Hi,
>
> why is GFP_ATOMIC used in fork.c::dup_task_struct?
Presumably so that the allocation of the task structure can
dip into the emergency pools, giving fork a better chance
of succeeding?
We don't need to do that now - we can run page reclaim in
there as well as dip into the emergency pools.
fork.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
--- 2.5.30/kernel/fork.c~fork-alloc Sat Aug 3 15:19:10 2002
+++ 2.5.30-akpm/kernel/fork.c Sat Aug 3 15:19:54 2002
@@ -106,9 +106,10 @@ static struct task_struct *dup_task_stru
struct thread_info *ti;
ti = alloc_thread_info();
- if (!ti) return NULL;
+ if (!ti)
+ return NULL;
- tsk = kmem_cache_alloc(task_struct_cachep,GFP_ATOMIC);
+ tsk = kmem_cache_alloc(task_struct_cachep, GFP_KERNEL|__GFP_HIGH);
if (!tsk) {
free_thread_info(ti);
return NULL;
.
next prev parent reply other threads:[~2002-08-03 22:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-03 20:34 question on dup_task_struct Oliver Neukum
2002-08-03 22:22 ` Andrew Morton [this message]
2002-08-03 22:29 ` Andrew Morton
2002-08-03 22:40 ` Andrew Morton
2002-08-04 1:35 ` Linus Torvalds
2002-08-04 13:42 ` Rik van Riel
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=3D4C57BB.9D735B13@zip.com.au \
--to=akpm@zip.com.au \
--cc=Oliver.Neukum@lrz.uni-muenchen.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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