Nishanth,

   I need some more time to understand the code thoroughly... will get back to 
you in couple of days with some more details.

Thanks a lot for your help.
Mehul.

There are only 10 kind of people in the world ... those who knows binary and 
those who do not......

--- On Wed, 12/31/08, Nishanth Aravamudan <n...@us.ibm.com> wrote:
From: Nishanth Aravamudan <n...@us.ibm.com>
Subject: Re: [Libhugetlbfs-devel] Lib hugetlbfs
To: "mehul vora" <mehu...@yahoo.com>
Cc: libhugetlbfs-devel@lists.sourceforge.net, a...@us.ibm.com
Date: Wednesday, December 31, 2008, 1:01 PM

On 31.12.2008 [07:26:38 -0800], mehul vora wrote:
> Nishanth,
> 
>  Couple of doubts... 
> 
> 1) Can't text remapping cause any problem with the "code"
being
> executed ? I mean, from  code (function - remap_segments() ) it looks
> like "code remaps itself". If any tlb exception  comes after
"munmap"
> then there is no valid pagetable entry for the code segment as
>  "munmap" removes page table reference ??

Right. That's why we resolve the mmap() symbol so that we don't need to
rely on the PLT or anything when we try to run mmap() without a text
segment. It's a real black hole there. If you take an exception, it will
fail, you're right. We've not seen that happen on power, x86, x86_64,
but is there something specific about MIPS that makes that a concern? I
don't know much about the MIPS arch. requirements or VM.

> 2) Why "prepare_segment" routine which copies passed
segment's data in
> to the hugepages is called from child process ? Can't parent do the
> same ? 

prepare_segment() is called by each process to try and remap a given
segment. I should say first, but that only matters in the case of
sharing.  In the non-sharing case, it doesn't, as there is no relation
between parent and child segments in terms of hugetlbfs. Each process is
independent, because we unlink the files (and thus hide the data from
any other process).

The only time you should consider parent/child relationships in
libhugetlbfs' remapping code, I'd say, is with sharing of segments
enabled. And then it's only for the text segment, and only because it's
read-only.

Thanks,
Nish

-- 
Nishanth Aravamudan <n...@us.ibm.com>
IBM Linux Technology Center



      
------------------------------------------------------------------------------
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to