lkml.org 
[lkml]   [2018]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] mm: prototype: rid swapoff of quadratic complexity
From
Date
Hi Matthew,


>> This seems terribly complicated.  You run through i_pages, record the
>> indices of the swap entries, then go back and look them up again by
>> calling shmem_getpage() which calls the incredibly complex 300 line
>> shmem_getpage_gfp().
>>
>> Can we refactor shmem_getpage_gfp() to skip some of the checks which
>> aren't necessary when called from this path, and turn this into a nice
>> simple xas_for_each() loop which works one entry at a time?
>
> I shall investigate this and make this simpler as you suggested.

I have looked into this deeper. I think it would be very difficult to
consolidate the whole logic into a single xas_for_each() loop because,
we do disk io and might sleep. I have refactored the code such that it
much more readable now and I am using the same format used by
find_get_entries.

Will send out the next revision later today.


Thanks,

Vineeth

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