[lkml]   [2018]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH -V7 RESEND 08/21] swap: Support to read a huge swap cluster for swapin a THP
Daniel Jordan <> writes:

> On Sat, Dec 01, 2018 at 08:34:06AM +0800, Huang, Ying wrote:
>> Daniel Jordan <> writes:
>> > What do you think?
>> I think that swapoff() which is the main user of try_to_unuse() isn't a
>> common operation in practical. So it's not necessary to make it more
>> complex for this.
> Ok, probably not worth the surgery on try_to_unuse, even if swapoff can be
> expensive when it does happen.
>> In alloc_hugepage_direct_gfpmask(), the only information provided by vma
>> is: vma->flags & VM_HUGEPAGE. Because we have no vma available, I think
>> it is OK to just assume that the flag is cleared. That is, rely on
>> system-wide THP settings only.
>> What do you think about this proposal?
> Sounds like a good compromise.
> So alloc_hugepage_direct_gfpmask will learn to make 'vma' optional? Slightly
> concerned that future callers that should be passing vma's might not and open a
> way to ignore vma huge page hints, but probably not a big deal in practice.

alloc_pages_vma() -> get_vma_policy() -> __get_vma_policy()

has done that already. So I guess that's not a big issue. The callers
should be careful.

Best Regards,
Huang, Ying

 \ /
  Last update: 2018-12-04 03:30    [W:0.052 / U:4.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site