lkml.org 
[lkml]   [2002]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: question on dup_task_struct
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;
.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.085 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site