lkml.org 
[lkml]   [2018]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH -mm] mm, huge page: Copy to access sub-page last when copy huge page
Date
Mike Kravetz <mike.kravetz@oracle.com> writes:

> On 05/17/2018 11:24 PM, Michal Hocko wrote:
>> On Fri 18-05-18 11:03:16, Huang, Ying wrote:
>> [...]
>>> The patch is a generic optimization which should benefit quite some
>>> workloads, not for a specific use case. To demonstrate the performance
>>> benefit of the patch, we tested it with vm-scalability run on
>>> transparent huge page.
>>
>> It is also adds quite some non-intuitive code. So is this worth? Does
>> any _real_ workload benefits from the change?
>
> One way to 'add less code' would be to create a helper routine that
> indicates the order in which sub-pages are to be copied. IIUC, you
> added the same algorithm for sub-page ordering to copy_huge_page()
> that was previously added to clear_huge_page(). Correct?

Yes.

> If so, then perhaps a common helper could be used by both the clear
> and copy huge page routines. It would also make maintenance easier.

That's a good idea. But this may need to turn
copy_user_highpage()/clear_user_highpage() calling in
copy_user_huge_page()/clear_huge_page() from direct call to indirect
call. I don't know whether this will incur some overhead. Will try to
measure this.

Best Regards,
Huang, Ying

\
 
 \ /
  Last update: 2018-05-21 04:35    [W:0.057 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site