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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANN689G7KgUFQLNnukfHL5JSW-Zu=WuzVbyhYBJUxEsUUyDHMQ@mail.gmail.com>
Date:	Wed, 30 Jan 2013 16:31:23 -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

Hi Roman,

On Fri, Jan 4, 2013 at 11:43 PM, Michel Lespinasse <walken@...gle.com> wrote:
> On Fri, Jan 4, 2013 at 10:40 PM, Roman Dubtsov <dubtsov@...il.com> wrote:
>> - POPULATE_VIA_LOOP -- makes the test populate memory using a loop
>> - POPULATE_VIA_MMAP -- makes the test populate memory via MAP_POPULATE
>>
> Heh, very interesting. As it turns out, the problem gets MUCH worse as
> the number of threads increase.
>
> In the POPULATE_VIA_MMAP, follow_page() is called at 4KB increment
> addresses, and it takes the mm->page_table_lock 511 times out of 512
> (that is, every time it falls within a huge page that's just been
> populated). So all OMP_NUM_THREADS threads are constantly bouncing
> over the mm->page_table_lock, and getting terrible performance as a
> result.

FYI, the patchset I just sent out ("fixes for large mm_populate() and
munlock() operations") takes care of this and brings POPULATE_VIA_MMAP
performance up where it should be.

Thanks a lot for the report, as I hadn't noticed this issue before :)

-- 
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