lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 Jan 2013 16:09:04 -0800
From:	Michel Lespinasse <walken@...gle.com>
To:	Roman Dubtsov <dubtsov@...il.com>
Cc:	linux-kernel@...r.kernel.org,
	Andy Lutomirski <luto@...capital.net>,
	Rik van Riel <riel@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Hugh Dickins <hughd@...gle.com>
Subject: Re: mmap() scalability in the presence of the MAP_POPULATE flag

On Wed, Jan 2, 2013 at 8:50 AM, Roman Dubtsov <dubtsov@...il.com> wrote:
> Concurrent mmap() calls from the same process are serialized via downing
> mm->mmap_sem for write. This means that operations like populating the
> pages which do not alter vmas are also performed serially. Anecdotal
> data from two machines I have access to is that populating pages by
> touching them in a loop outside of mmap() improves performance of the
> synthetic micro-benchmark by ~40% in the worst case. A crude patch that
> modifies vm_mmap_pgoff() to call make_pages_present() outside of
> do_mmap_pgoff() after upping the semaphore when MAP_POPULATE is present
> brings identical performance improvement.
>
> Is there an interest in fixing this or concurrent mmaps() from the same
> process are too much of a corner case to worry about it?

Funny this comes up again. I actually have a patch series that is
supposed to do that:
[PATCH 0/9] Avoid populating unbounded num of ptes with mmap_sem held

However, the patches are still pending, didn't get much review
(probably not enough for Andrew to take them at this point), and I
think everyone forgot about them during the winter break.

Care to have a look at that thread and see if it works for you ?

(caveat: you will possibly also need "[PATCH 10/9] mm: make
do_mmap_pgoff return populate as a size in bytes, not as a bool" to
make the series actually work for you)

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ