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]
Date:	Thu, 12 Aug 2010 12:08:07 +0200
From:	Micha Nelissen <micha@...i.hopto.org>
To:	Kevin Easton <kevin@...rana.org>
CC:	linux-kernel@...r.kernel.org
Subject: Re: Why is get_user_pages so slow?

Hi Kevin,

Kevin Easton wrote:
> Yep, you are.  Because your pointer 'p' is a pointer to int, when you 
> increment it by 0x1000 in your loops you are actually incrementing it by 
> 0x1000 * sizeof(int) - so you're only actually touching one page in four.

Oops sorry, thanks for catching my mistake.

I also discovered the following: if I read from all pages, then call 
get_user_pages, it is still quite slow (did I get a read-only page?). 
However, if I touch all pages by writing to them, then get_user_pages 
becomes a factor 40 times faster or so.

All is clear now, I think. Thanks.

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