Re: Why is get_user_pages so slow?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Kevin Easton
Date: Wednesday, August 11, 2010 - 8:43 pm

Quoting Micha Nelissen <micha@neli.hopto.org>:


Hi Micha,

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.

If you change the types of 'buf', 'p' and 'e' to 'char *' then it  
touches every page - and (and least on my test box) the MAP_POPULATE  
case pulls ahead.

     - Kevin



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Why is get_user_pages so slow?, Micha Nelissen, (Tue Aug 10, 12:50 pm)
Re: Why is get_user_pages so slow?, Kevin Easton, (Wed Aug 11, 8:43 pm)
Re: Why is get_user_pages so slow?, Micha Nelissen, (Thu Aug 12, 3:08 am)