Hi!
> I observe that mmap_11-4 fails in my x86 environment with:
> 
> Test FAILED: Modification of the partial page at the end of an object is 
> written out

I've seen some failures lately too but haven't had time to look into
these yet.

> I did some googling and found that you rose this problem in 2012:
> http://linux-kernel.2935.n7.nabble.com/Partialy-mapped-page-stays-in-page-cache-after-unmap-td379857.html
> 
> I'm interested what you meant in your patch for the mmap's manual page 
> by "In some cases, this could be fixed by calling msync(2) before the 
> unmap takes place;"
> 
> What are these "some cases"?

That depends on whether is the mmaped file backed up by a disk based
filesystem or not.

Mapped pages are stored in a cache, so if you modify content of a page
that is beyond the mapping but inside the last page the data stays there
till they are written back to the disk and reloaded into the cache
(which can be forced by the msync()). For memory backed filesystems
(tmpfs etc) msync() is no-op because there is no permanent storage to
write the data to, so the rest of partial page is never cleared.

> I took your test program from the man thread and executed it on KVM and 
> on an Sun Ultra 45.
> 
> Here are the results:
> 
> 1. Debian 7 + KVM + 3.2.0-4-amd64
>   * without msync() it fails
>   * with msync() it fails
> 
> 2. Debian 7 + Ultra + 3.2.0-4-sparc64-smp
>   * without msync() it fails
>   * with msync() it passes (!!!)
> 
> So it looks like msync() on x86 doesn't help us. The question here if 
> it's a linux+x86 bug or not...

Is the /tmp/ filesystem the same?

> Could you check your test program and mmap_11-4 in your environment?

Added to my TODO but I'm not sure if I can get to this till the end of
the week.

-- 
Cyril Hrubis
chru...@suse.cz

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to