Re: Why no trylock for read/write_bh?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 16, 2009 at 02:55:15PM +0530, pradeep singh wrote:
> On Thu, Apr 16, 2009 at 9:56 AM, Jeffrey Cao <jcao.linux@xxxxxxxxx> wrote:
> > On 2009-04-16, Jeffrey Cao <jcao.linux@xxxxxxxxx> wrote:
> >> On 2009-04-15, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote:
> >>
> >>
> >>> "No process context" actually means that the taskstruct's
> >>> mm_struct->mm is NULL.   This means that the pagetable CR3 are not
> >> That's not correct. mm is NULL does not mean no porcess context.
> >> Since all kernel processes/threads share the same upper 1G line address space,
> >> they do not have their own individual line address like user sapce proesses.
> >> All user space processes have their individual page table maps, but kernel
> >> processes share one page table maps. So mm is NULL for kernel processes.
> > I did some kernel source code investigation to prove my thought.
> > kernel_thread() calles do_fork() with the parameter CLONE_VM. that means
> > the kernel process will share the memory space of its parent. And this way
> > all the kernel threads share one memory space.
> 
> Which is memory space of kernel itself, right?
Yes, CLONE_VM colones the kernel address space. All the kernel threads share
this address space.
> And off course this means a kernel thread can be cloned from an existing kernel
> thread only.
Sure, you can't fork a kernel thread from user space.

Jeffrey

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux