Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-17 Thread Michal Hocko
On Mon 17-12-12 12:54:15, Johannes Weiner wrote: > On Mon, Dec 17, 2012 at 05:37:35PM +0100, Michal Hocko wrote: > > On Fri 14-12-12 19:18:51, Johannes Weiner wrote: > > > On Fri, Dec 14, 2012 at 05:13:45PM +0100, Michal Hocko wrote: > > > > On Fri 14-12-12 10:43:55, Rik van Riel wrote: > > > > >

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-17 Thread Johannes Weiner
On Mon, Dec 17, 2012 at 05:37:35PM +0100, Michal Hocko wrote: > On Fri 14-12-12 19:18:51, Johannes Weiner wrote: > > On Fri, Dec 14, 2012 at 05:13:45PM +0100, Michal Hocko wrote: > > > On Fri 14-12-12 10:43:55, Rik van Riel wrote: > > > > On 12/14/2012 03:37 AM, Michal Hocko wrote: > > > > > > >

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-17 Thread Michal Hocko
On Fri 14-12-12 19:18:51, Johannes Weiner wrote: > On Fri, Dec 14, 2012 at 05:13:45PM +0100, Michal Hocko wrote: > > On Fri 14-12-12 10:43:55, Rik van Riel wrote: > > > On 12/14/2012 03:37 AM, Michal Hocko wrote: > > > > > > >I can answer the later. Because memsw comes with its price and > > >

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-17 Thread Michal Hocko
On Fri 14-12-12 19:18:51, Johannes Weiner wrote: On Fri, Dec 14, 2012 at 05:13:45PM +0100, Michal Hocko wrote: On Fri 14-12-12 10:43:55, Rik van Riel wrote: On 12/14/2012 03:37 AM, Michal Hocko wrote: I can answer the later. Because memsw comes with its price and swappiness is much

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-17 Thread Johannes Weiner
On Mon, Dec 17, 2012 at 05:37:35PM +0100, Michal Hocko wrote: On Fri 14-12-12 19:18:51, Johannes Weiner wrote: On Fri, Dec 14, 2012 at 05:13:45PM +0100, Michal Hocko wrote: On Fri 14-12-12 10:43:55, Rik van Riel wrote: On 12/14/2012 03:37 AM, Michal Hocko wrote: I can answer the

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-17 Thread Michal Hocko
On Mon 17-12-12 12:54:15, Johannes Weiner wrote: On Mon, Dec 17, 2012 at 05:37:35PM +0100, Michal Hocko wrote: On Fri 14-12-12 19:18:51, Johannes Weiner wrote: On Fri, Dec 14, 2012 at 05:13:45PM +0100, Michal Hocko wrote: On Fri 14-12-12 10:43:55, Rik van Riel wrote: On 12/14/2012

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-14 Thread Johannes Weiner
On Fri, Dec 14, 2012 at 05:13:45PM +0100, Michal Hocko wrote: > On Fri 14-12-12 10:43:55, Rik van Riel wrote: > > On 12/14/2012 03:37 AM, Michal Hocko wrote: > > > > >I can answer the later. Because memsw comes with its price and > > >swappiness is much cheaper. On the other hand it makes sense

RE: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-14 Thread Satoru Moriya
On 12/14/2012 10:43 AM, Rik van Riel wrote: > On 12/14/2012 03:37 AM, Michal Hocko wrote: > >> I can answer the later. Because memsw comes with its price and >> swappiness is much cheaper. On the other hand it makes sense that >> swappiness==0 doesn't swap at all. Or do you think we should get

RE: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-14 Thread Satoru Moriya
On 12/14/2012 03:37 AM, Michal Hocko wrote: > On Thu 13-12-12 23:50:30, Johannes Weiner wrote: >> On Thu, Dec 13, 2012 at 10:25:43PM +, Satoru Moriya wrote: >>> >>> I introduced swappiness check here with fe35004f because, in some >>> cases, we prefer OOM to swap out pages to detect problems

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-14 Thread Michal Hocko
On Fri 14-12-12 10:43:55, Rik van Riel wrote: > On 12/14/2012 03:37 AM, Michal Hocko wrote: > > >I can answer the later. Because memsw comes with its price and > >swappiness is much cheaper. On the other hand it makes sense that > >swappiness==0 doesn't swap at all. Or do you think we should get

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-14 Thread Rik van Riel
On 12/14/2012 03:37 AM, Michal Hocko wrote: I can answer the later. Because memsw comes with its price and swappiness is much cheaper. On the other hand it makes sense that swappiness==0 doesn't swap at all. Or do you think we should get back to _almost_ doesn't swap at all? swappiness==0

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-14 Thread Michal Hocko
On Thu 13-12-12 23:50:30, Johannes Weiner wrote: > On Thu, Dec 13, 2012 at 10:25:43PM +, Satoru Moriya wrote: > > > > On 12/13/2012 11:05 AM, Michal Hocko wrote:> On Thu 13-12-12 16:29:59, > > Michal Hocko wrote: > > >> On Thu 13-12-12 10:34:20, Mel Gorman wrote: > > >>> On Wed, Dec 12, 2012

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-14 Thread Michal Hocko
On Thu 13-12-12 23:50:30, Johannes Weiner wrote: On Thu, Dec 13, 2012 at 10:25:43PM +, Satoru Moriya wrote: On 12/13/2012 11:05 AM, Michal Hocko wrote: On Thu 13-12-12 16:29:59, Michal Hocko wrote: On Thu 13-12-12 10:34:20, Mel Gorman wrote: On Wed, Dec 12, 2012 at 04:43:34PM

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-14 Thread Rik van Riel
On 12/14/2012 03:37 AM, Michal Hocko wrote: I can answer the later. Because memsw comes with its price and swappiness is much cheaper. On the other hand it makes sense that swappiness==0 doesn't swap at all. Or do you think we should get back to _almost_ doesn't swap at all? swappiness==0

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-14 Thread Michal Hocko
On Fri 14-12-12 10:43:55, Rik van Riel wrote: On 12/14/2012 03:37 AM, Michal Hocko wrote: I can answer the later. Because memsw comes with its price and swappiness is much cheaper. On the other hand it makes sense that swappiness==0 doesn't swap at all. Or do you think we should get back to

RE: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-14 Thread Satoru Moriya
On 12/14/2012 03:37 AM, Michal Hocko wrote: On Thu 13-12-12 23:50:30, Johannes Weiner wrote: On Thu, Dec 13, 2012 at 10:25:43PM +, Satoru Moriya wrote: I introduced swappiness check here with fe35004f because, in some cases, we prefer OOM to swap out pages to detect problems as soon as

RE: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-14 Thread Satoru Moriya
On 12/14/2012 10:43 AM, Rik van Riel wrote: On 12/14/2012 03:37 AM, Michal Hocko wrote: I can answer the later. Because memsw comes with its price and swappiness is much cheaper. On the other hand it makes sense that swappiness==0 doesn't swap at all. Or do you think we should get back to

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-14 Thread Johannes Weiner
On Fri, Dec 14, 2012 at 05:13:45PM +0100, Michal Hocko wrote: On Fri 14-12-12 10:43:55, Rik van Riel wrote: On 12/14/2012 03:37 AM, Michal Hocko wrote: I can answer the later. Because memsw comes with its price and swappiness is much cheaper. On the other hand it makes sense that

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Johannes Weiner
On Thu, Dec 13, 2012 at 10:25:43PM +, Satoru Moriya wrote: > > On 12/13/2012 11:05 AM, Michal Hocko wrote:> On Thu 13-12-12 16:29:59, Michal > Hocko wrote: > >> On Thu 13-12-12 10:34:20, Mel Gorman wrote: > >>> On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: > When a

RE: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Satoru Moriya
On 12/13/2012 11:05 AM, Michal Hocko wrote:> On Thu 13-12-12 16:29:59, Michal Hocko wrote: >> On Thu 13-12-12 10:34:20, Mel Gorman wrote: >>> On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: When a reclaim scanner is doing its final scan before giving up and there is

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Mel Gorman
On Thu, Dec 13, 2012 at 02:05:34PM -0500, Johannes Weiner wrote: > On Thu, Dec 13, 2012 at 10:34:20AM +, Mel Gorman wrote: > > On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: > > > When a reclaim scanner is doing its final scan before giving up and > > > there is swap space

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Johannes Weiner
On Thu, Dec 13, 2012 at 10:34:20AM +, Mel Gorman wrote: > On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: > > When a reclaim scanner is doing its final scan before giving up and > > there is swap space available, pay no attention to swappiness > > preference anymore. Just

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Michal Hocko
On Thu 13-12-12 16:29:59, Michal Hocko wrote: > On Thu 13-12-12 10:34:20, Mel Gorman wrote: > > On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: > > > When a reclaim scanner is doing its final scan before giving up and > > > there is swap space available, pay no attention to

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Michal Hocko
On Thu 13-12-12 10:34:20, Mel Gorman wrote: > On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: > > When a reclaim scanner is doing its final scan before giving up and > > there is swap space available, pay no attention to swappiness > > preference anymore. Just swap. > > > > Note

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Mel Gorman
On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: > When a reclaim scanner is doing its final scan before giving up and > there is swap space available, pay no attention to swappiness > preference anymore. Just swap. > > Note that this change won't make too big of a difference for

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Mel Gorman
On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: When a reclaim scanner is doing its final scan before giving up and there is swap space available, pay no attention to swappiness preference anymore. Just swap. Note that this change won't make too big of a difference for

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Michal Hocko
On Thu 13-12-12 10:34:20, Mel Gorman wrote: On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: When a reclaim scanner is doing its final scan before giving up and there is swap space available, pay no attention to swappiness preference anymore. Just swap. Note that this

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Michal Hocko
On Thu 13-12-12 16:29:59, Michal Hocko wrote: On Thu 13-12-12 10:34:20, Mel Gorman wrote: On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: When a reclaim scanner is doing its final scan before giving up and there is swap space available, pay no attention to swappiness

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Johannes Weiner
On Thu, Dec 13, 2012 at 10:34:20AM +, Mel Gorman wrote: On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: When a reclaim scanner is doing its final scan before giving up and there is swap space available, pay no attention to swappiness preference anymore. Just swap.

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Mel Gorman
On Thu, Dec 13, 2012 at 02:05:34PM -0500, Johannes Weiner wrote: On Thu, Dec 13, 2012 at 10:34:20AM +, Mel Gorman wrote: On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: When a reclaim scanner is doing its final scan before giving up and there is swap space available,

RE: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Satoru Moriya
On 12/13/2012 11:05 AM, Michal Hocko wrote: On Thu 13-12-12 16:29:59, Michal Hocko wrote: On Thu 13-12-12 10:34:20, Mel Gorman wrote: On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: When a reclaim scanner is doing its final scan before giving up and there is swap space

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-13 Thread Johannes Weiner
On Thu, Dec 13, 2012 at 10:25:43PM +, Satoru Moriya wrote: On 12/13/2012 11:05 AM, Michal Hocko wrote: On Thu 13-12-12 16:29:59, Michal Hocko wrote: On Thu 13-12-12 10:34:20, Mel Gorman wrote: On Wed, Dec 12, 2012 at 04:43:34PM -0500, Johannes Weiner wrote: When a reclaim scanner is

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-12 Thread Simon Jeons
On Wed, 2012-12-12 at 16:43 -0500, Johannes Weiner wrote: > When a reclaim scanner is doing its final scan before giving up and > there is swap space available, pay no attention to swappiness > preference anymore. Just swap. > Confuse! If it's final scan and still swap space available, why

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-12 Thread Rik van Riel
On 12/12/2012 04:43 PM, Johannes Weiner wrote: When a reclaim scanner is doing its final scan before giving up and there is swap space available, pay no attention to swappiness preference anymore. Just swap. Note that this change won't make too big of a difference for general reclaim:

[patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-12 Thread Johannes Weiner
When a reclaim scanner is doing its final scan before giving up and there is swap space available, pay no attention to swappiness preference anymore. Just swap. Note that this change won't make too big of a difference for general reclaim: anonymous pages are already force-scanned when there is

[patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-12 Thread Johannes Weiner
When a reclaim scanner is doing its final scan before giving up and there is swap space available, pay no attention to swappiness preference anymore. Just swap. Note that this change won't make too big of a difference for general reclaim: anonymous pages are already force-scanned when there is

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-12 Thread Rik van Riel
On 12/12/2012 04:43 PM, Johannes Weiner wrote: When a reclaim scanner is doing its final scan before giving up and there is swap space available, pay no attention to swappiness preference anymore. Just swap. Note that this change won't make too big of a difference for general reclaim:

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

2012-12-12 Thread Simon Jeons
On Wed, 2012-12-12 at 16:43 -0500, Johannes Weiner wrote: When a reclaim scanner is doing its final scan before giving up and there is swap space available, pay no attention to swappiness preference anymore. Just swap. Confuse! If it's final scan and still swap space available, why nr[lru]