Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-28 Thread Rik van Riel
On 02/27/2014 07:33 PM, Hugh Dickins wrote: > On Tue, 18 Feb 2014, Kelley Nielsen wrote: > >> The function try_to_unuse() is of quadratic complexity, with a lot of >> wasted effort. It unuses swap entries one by one, potentially iterating >> over all the page tables for all the processes in the

Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-28 Thread Rik van Riel
On 02/27/2014 07:33 PM, Hugh Dickins wrote: On Tue, 18 Feb 2014, Kelley Nielsen wrote: The function try_to_unuse() is of quadratic complexity, with a lot of wasted effort. It unuses swap entries one by one, potentially iterating over all the page tables for all the processes in the system

Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-27 Thread Hugh Dickins
On Tue, 18 Feb 2014, Kelley Nielsen wrote: > The function try_to_unuse() is of quadratic complexity, with a lot of > wasted effort. It unuses swap entries one by one, potentially iterating > over all the page tables for all the processes in the system for each > one. You've chosen a good target,

Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-27 Thread Hugh Dickins
On Tue, 18 Feb 2014, Kelley Nielsen wrote: The function try_to_unuse() is of quadratic complexity, with a lot of wasted effort. It unuses swap entries one by one, potentially iterating over all the page tables for all the processes in the system for each one. You've chosen a good target, and

Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-25 Thread Rik van Riel
On 02/18/2014 07:35 PM, Kelley Nielsen wrote: > The function try_to_unuse() is of quadratic complexity, with a lot of > wasted effort. It unuses swap entries one by one, potentially iterating > over all the page tables for all the processes in the system for each > one. > > This new proposed

Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-25 Thread Rik van Riel
On 02/18/2014 07:35 PM, Kelley Nielsen wrote: The function try_to_unuse() is of quadratic complexity, with a lot of wasted effort. It unuses swap entries one by one, potentially iterating over all the page tables for all the processes in the system for each one. This new proposed

Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-19 Thread One Thousand Gnomes
> Do you have situations in which swapoff is taking an unacceptable > amount of time? If so, please update the changelog to provide full > details on this, with before-and-after timing measurements. Yes - because now and then (about once a month) with 3.10 or so + and encrypted swap my box with

Re: [OPW kernel] Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-19 Thread Josh Triplett
On Wed, Feb 19, 2014 at 04:39:47PM -0500, Rik van Riel wrote: > On 02/19/2014 04:27 PM, Andrew Morton wrote: > > On Tue, 18 Feb 2014 16:35:22 -0800 Kelley Nielsen > > wrote: > > > >> The function try_to_unuse() is of quadratic complexity, with a lot of > >> wasted effort. It unuses swap entries

Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-19 Thread Rik van Riel
On 02/19/2014 04:27 PM, Andrew Morton wrote: > On Tue, 18 Feb 2014 16:35:22 -0800 Kelley Nielsen wrote: > >> The function try_to_unuse() is of quadratic complexity, with a lot of >> wasted effort. It unuses swap entries one by one, potentially iterating >> over all the page tables for all the

Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-19 Thread Andrew Morton
On Tue, 18 Feb 2014 16:35:22 -0800 Kelley Nielsen wrote: > The function try_to_unuse() is of quadratic complexity, with a lot of > wasted effort. It unuses swap entries one by one, potentially iterating > over all the page tables for all the processes in the system for each > one. > > This new

Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-19 Thread Andrew Morton
On Tue, 18 Feb 2014 16:35:22 -0800 Kelley Nielsen kelley...@gmail.com wrote: The function try_to_unuse() is of quadratic complexity, with a lot of wasted effort. It unuses swap entries one by one, potentially iterating over all the page tables for all the processes in the system for each one.

Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-19 Thread Rik van Riel
On 02/19/2014 04:27 PM, Andrew Morton wrote: On Tue, 18 Feb 2014 16:35:22 -0800 Kelley Nielsen kelley...@gmail.com wrote: The function try_to_unuse() is of quadratic complexity, with a lot of wasted effort. It unuses swap entries one by one, potentially iterating over all the page tables for

Re: [OPW kernel] Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-19 Thread Josh Triplett
On Wed, Feb 19, 2014 at 04:39:47PM -0500, Rik van Riel wrote: On 02/19/2014 04:27 PM, Andrew Morton wrote: On Tue, 18 Feb 2014 16:35:22 -0800 Kelley Nielsen kelley...@gmail.com wrote: The function try_to_unuse() is of quadratic complexity, with a lot of wasted effort. It unuses swap

Re: [RFC] mm:prototype for the updated swapoff implementation

2014-02-19 Thread One Thousand Gnomes
Do you have situations in which swapoff is taking an unacceptable amount of time? If so, please update the changelog to provide full details on this, with before-and-after timing measurements. Yes - because now and then (about once a month) with 3.10 or so + and encrypted swap my box with

[RFC] mm:prototype for the updated swapoff implementation

2014-02-18 Thread Kelley Nielsen
The function try_to_unuse() is of quadratic complexity, with a lot of wasted effort. It unuses swap entries one by one, potentially iterating over all the page tables for all the processes in the system for each one. This new proposed implementation of try_to_unuse simplifies its complexity to

[RFC] mm:prototype for the updated swapoff implementation

2014-02-18 Thread Kelley Nielsen
The function try_to_unuse() is of quadratic complexity, with a lot of wasted effort. It unuses swap entries one by one, potentially iterating over all the page tables for all the processes in the system for each one. This new proposed implementation of try_to_unuse simplifies its complexity to