Re: usage of vm_area_struct in shared memory

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

 




Thanks again Ravi,

   The IPC array I talked about is the structure ipc_ids ... which is used 
as shm_ids for shared memory regions, sem_ids for semaphores and msg_ids for 
messages. Hope we are going right here!!!

Asmita from MAASK



>From: Ravi <kravi26@yahoo.com>
>To: MAASK Group <maask12345@hotmail.com>, kernelnewbies@nl.linux.org
>Subject: Re: usage of vm_area_struct in shared memory
>Date: Sat, 19 Oct 2002 15:15:26 -0700 (PDT)
>
>
> >     We are aware that the shared memory structure in the IPC array,
> >  has a  pointer to the inode which has a cyclic link list of
> >  vm_area_structs  of all  processes that have attached to that shared
> >  region. Is this array  (vm_next_share or vm_next_prev) really used
> >  apart from update_mmu_cache or  vmtruncate_list??
>
>The vm_next_share and vm_pprev_share pointers are not for shared
>memory only. They are used to keep track of shared file mappings also.
>And vmtruncate_list() is a _real_ use for them: if more than one
>process
>is mapping the same file and the file got modified (truncated in this
>case)
>some way of updating the vma's of all those processes is needed.
>
>BTW, I didn't get which IPC array you are refering to.
>
> > Also when and where are the shmem_file_operations like
> > shmem_file_read,  shmem_file_map, etc invoked?? Are they by any
> > chance related to accessing  the shared memory used in shmget,
> > shmat??? Or shm_open, shm_link??
>
>  If you are using shmget(), shmat(), etc. shmem_file_opearations are
>not used. sys_shmget() does get an inode from the shm filesystem, but
>it replaces the file operations with shm_file_operations.
>I guess anonymous mmaps (mmapping /dev/zero) and creating/using files
>in
>/dev/shm will use shmem_file_operations.
>
>Hope this helps,
>Ravi.
>
>__________________________________________________
>Do you Yahoo!?
>Y! Web Hosting - Let the expert host your web site
>http://webhosting.yahoo.com/
>--
>Kernelnewbies: Help each other learn about the Linux kernel.
>Archive:       http://mail.nl.linux.org/kernelnewbies/
>FAQ:           http://kernelnewbies.org/faq/


_________________________________________________________________
Unlimited Internet access for only $21.95/month.  Try MSN! 
http://resourcecenter.msn.com/access/plans/2monthsfree.asp

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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