[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q about do_fork()
petur thors wrote:
> John Levon wrote:
> > I also can't see (looking quickly) any problem with the routine being
> multi-threaded
> >
> > john
> >
> > --
> > "I am a conscientious man, when I throw rocks at seabirds I leave no tern
> > unstoned."
> > - Ogden Nash
>
> Yes, thanks. But then there must be? a lock of some kind in
> alloc_task_struct
> in do_fork().Right? Two processes canīt allocate free page frames (8kb
> task_union) at the exact same moment.(please correct me if iīm wrong).
> Mucho thanks
The actual page allocation is protected by the per-zone lock
in page_alloc.c:rmqueue(), so locking alloc_task_struct() should
not be necessary.
-- Joe
> -
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive: http://mail.nl.linux.org/
> IRC Channel: irc.openprojects.net / #kernelnewbies
> Web Page: http://www.kernelnewbies.org/
-- Joe Knapka
"It was just a maddened crocodile hidden in a flower bed. It could
have happened to anyone." -- Pratchett
// Linux MM Documentation in progress:
// http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html
* Evolution is an "unproven theory" in the same sense that gravity is. *
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/