Re: PG_locked flag and MAP_SHARED

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

 



On Tue, Mar 01, 2005 at 14:44:52 +0100, Arjan van de Ven wrote:
> On Tue, 2005-03-01 at 05:19 -0800, arvind k wrote:
> > Hi All,
> > 
> > I understand that PG_locked flag is set in page->flags
> > before initiating I/O on a page to avoid parallel
> > I/Os. But I am wondering how we avoid other processes
> > and threads from accessing the same page in userspace
> > if it is mapped(MAP_SHARED) to the address space of
> > multiple processes.
> 
> we don't... and that's ok
> what will happen is that the writes those processes do get written out 
> again later anyway, so there's no data loss involved...

In fact, there IS a data-loss involved, because one of the applications
overwrites data written by the other. However, the applications are
fully aware that they have a shared read-write mapping and it's thus
THEIR business to do all necessary synchronization. Kernel just writes
the final result to disk.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@xxxxxx>

Attachment: signature.asc
Description: Digital signature


[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