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:   Mon, 3 Dec 2018 09:35:24 -0500
From:   Vineeth Remanan Pillai <vpillai@...italocean.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Hugh Dickins <hughd@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Kelley Nielsen <kelleynnn@...il.com>,
        Rik van Riel <riel@...riel.com>
Subject: Re: [PATCH v2] mm: prototype: rid swapoff of quadratic complexity

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ