linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0
       [not found] <5038E7AA.5030107@gmail.com>
@ 2012-09-09 16:57 ` Ben Hutchings
  2012-09-09 17:15   ` Rik van Riel
  0 siblings, 1 reply; 8+ messages in thread
From: Ben Hutchings @ 2012-09-09 16:57 UTC (permalink / raw)
  To: Andrew Morton, Rik van Riel
  Cc: Greg Kroah-Hartman, stable, Zdenek Kaspar, linux-mm

[-- Attachment #1: Type: text/plain, Size: 642 bytes --]

On Sat, 2012-08-25 at 16:56 +0200, Zdenek Kaspar wrote:
> Hi Greg,
> 
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=fe35004fbf9eaf67482b074a2e032abb9c89b1dd
> 
> In short: this patch seems beneficial for users trying to avoid memory
> swapping at all costs but they want to keep swap for emergency reasons.
> 
> More details: https://lkml.org/lkml/2012/3/2/320
> 
> Its included in 3.5, so could this be considered for -longterm kernels ?

Andrew, Rik, does this seem appropriate for longterm?

Ben.

-- 
Ben Hutchings
Time is nature's way of making sure that everything doesn't happen at once.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0
  2012-09-09 16:57 ` Consider for longterm kernels: mm: avoid swapping out with swappiness==0 Ben Hutchings
@ 2012-09-09 17:15   ` Rik van Riel
  2012-09-09 18:03     ` Shentino
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Rik van Riel @ 2012-09-09 17:15 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Andrew Morton, Greg Kroah-Hartman, stable, Zdenek Kaspar,
	linux-mm

On 09/09/2012 12:57 PM, Ben Hutchings wrote:
> On Sat, 2012-08-25 at 16:56 +0200, Zdenek Kaspar wrote:
>> Hi Greg,
>>
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=fe35004fbf9eaf67482b074a2e032abb9c89b1dd
>>
>> In short: this patch seems beneficial for users trying to avoid memory
>> swapping at all costs but they want to keep swap for emergency reasons.
>>
>> More details: https://lkml.org/lkml/2012/3/2/320
>>
>> Its included in 3.5, so could this be considered for -longterm kernels ?
>
> Andrew, Rik, does this seem appropriate for longterm?

Yes, absolutely.  Default behaviour is not changed at all, and
the patch makes swappiness=0 do what people seem to expect it
to do.

-- 
All rights reversed

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0
  2012-09-09 17:15   ` Rik van Riel
@ 2012-09-09 18:03     ` Shentino
  2012-09-10 13:36       ` Cong Wang
  2012-09-09 18:27     ` Ben Hutchings
  2012-09-09 20:34     ` Willy Tarreau
  2 siblings, 1 reply; 8+ messages in thread
From: Shentino @ 2012-09-09 18:03 UTC (permalink / raw)
  To: Rik van Riel
  Cc: Ben Hutchings, Andrew Morton, Greg Kroah-Hartman, stable,
	Zdenek Kaspar, linux-mm

On Sun, Sep 9, 2012 at 10:15 AM, Rik van Riel <riel@redhat.com> wrote:
> On 09/09/2012 12:57 PM, Ben Hutchings wrote:
>>
>> On Sat, 2012-08-25 at 16:56 +0200, Zdenek Kaspar wrote:
>>>
>>> Hi Greg,
>>>
>>>
>>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=fe35004fbf9eaf67482b074a2e032abb9c89b1dd
>>>
>>> In short: this patch seems beneficial for users trying to avoid memory
>>> swapping at all costs but they want to keep swap for emergency reasons.
>>>
>>> More details: https://lkml.org/lkml/2012/3/2/320
>>>
>>> Its included in 3.5, so could this be considered for -longterm kernels ?
>>
>>
>> Andrew, Rik, does this seem appropriate for longterm?
>
>
> Yes, absolutely.  Default behaviour is not changed at all, and
> the patch makes swappiness=0 do what people seem to expect it
> to do.

Just curious, but what theoretically would happen if someone were to
want to set swappiness to 200 or something?

Should it be sorta like vfs_cache_pressure?

> --
> All rights reversed
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0
  2012-09-09 17:15   ` Rik van Riel
  2012-09-09 18:03     ` Shentino
@ 2012-09-09 18:27     ` Ben Hutchings
  2012-09-09 20:34     ` Willy Tarreau
  2 siblings, 0 replies; 8+ messages in thread
From: Ben Hutchings @ 2012-09-09 18:27 UTC (permalink / raw)
  To: Rik van Riel
  Cc: Andrew Morton, Greg Kroah-Hartman, stable, Zdenek Kaspar,
	linux-mm

[-- Attachment #1: Type: text/plain, Size: 964 bytes --]

On Sun, 2012-09-09 at 13:15 -0400, Rik van Riel wrote:
> On 09/09/2012 12:57 PM, Ben Hutchings wrote:
> > On Sat, 2012-08-25 at 16:56 +0200, Zdenek Kaspar wrote:
> >> Hi Greg,
> >>
> >> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=fe35004fbf9eaf67482b074a2e032abb9c89b1dd
> >>
> >> In short: this patch seems beneficial for users trying to avoid memory
> >> swapping at all costs but they want to keep swap for emergency reasons.
> >>
> >> More details: https://lkml.org/lkml/2012/3/2/320
> >>
> >> Its included in 3.5, so could this be considered for -longterm kernels ?
> >
> > Andrew, Rik, does this seem appropriate for longterm?
> 
> Yes, absolutely.  Default behaviour is not changed at all, and
> the patch makes swappiness=0 do what people seem to expect it
> to do.

OK, I've queued this up for 3.2.

Ben.

-- 
Ben Hutchings
Time is nature's way of making sure that everything doesn't happen at once.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0
  2012-09-09 17:15   ` Rik van Riel
  2012-09-09 18:03     ` Shentino
  2012-09-09 18:27     ` Ben Hutchings
@ 2012-09-09 20:34     ` Willy Tarreau
  2 siblings, 0 replies; 8+ messages in thread
From: Willy Tarreau @ 2012-09-09 20:34 UTC (permalink / raw)
  To: Rik van Riel
  Cc: Ben Hutchings, Andrew Morton, Greg Kroah-Hartman, stable,
	Zdenek Kaspar, linux-mm

On Sun, Sep 09, 2012 at 01:15:59PM -0400, Rik van Riel wrote:
> >>http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=fe35004fbf9eaf67482b074a2e032abb9c89b1dd
> >>
> >>In short: this patch seems beneficial for users trying to avoid memory
> >>swapping at all costs but they want to keep swap for emergency reasons.
> >>
> >>More details: https://lkml.org/lkml/2012/3/2/320
> >>
> >>Its included in 3.5, so could this be considered for -longterm kernels ?
> >
> >Andrew, Rik, does this seem appropriate for longterm?
> 
> Yes, absolutely.  Default behaviour is not changed at all, and
> the patch makes swappiness=0 do what people seem to expect it
> to do.

Just for the record, in 3.0 and below we don't have vmscan_swappiness(),
so if the match makes sense there, that function will need to be backported,
in which mem_cgroup_swappiness() will have to be replaced by get_swappiness().

Regards,
Willy

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0
  2012-09-09 18:03     ` Shentino
@ 2012-09-10 13:36       ` Cong Wang
  2012-09-10 17:07         ` Shentino
  0 siblings, 1 reply; 8+ messages in thread
From: Cong Wang @ 2012-09-10 13:36 UTC (permalink / raw)
  To: linux-mm; +Cc: stable

On Sun, 09 Sep 2012 at 18:03 GMT, Shentino <shentino@gmail.com> wrote:
>
> Just curious, but what theoretically would happen if someone were to
> want to set swappiness to 200 or something?
>
> Should it be sorta like vfs_cache_pressure?
>


How could it be set to 200? As 0~100 is valid:

        {
	                .procname       = "swappiness",
		        .data           = &vm_swappiness,
		        .maxlen         = sizeof(vm_swappiness),
			.mode           = 0644,
		        .proc_handler   = proc_dointvec_minmax,
			.extra1         = &zero,
			.extra2         = &one_hundred,
        },

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0
  2012-09-10 13:36       ` Cong Wang
@ 2012-09-10 17:07         ` Shentino
  2012-09-10 17:40           ` Shentino
  0 siblings, 1 reply; 8+ messages in thread
From: Shentino @ 2012-09-10 17:07 UTC (permalink / raw)
  To: Cong Wang; +Cc: linux-mm, stable

On Mon, Sep 10, 2012 at 6:36 AM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> On Sun, 09 Sep 2012 at 18:03 GMT, Shentino <shentino@gmail.com> wrote:
>>
>> Just curious, but what theoretically would happen if someone were to
>> want to set swappiness to 200 or something?
>>
>> Should it be sorta like vfs_cache_pressure?
>>
>
>
> How could it be set to 200? As 0~100 is valid:
>
>         {
>                         .procname       = "swappiness",
>                         .data           = &vm_swappiness,
>                         .maxlen         = sizeof(vm_swappiness),
>                         .mode           = 0644,
>                         .proc_handler   = proc_dointvec_minmax,
>                         .extra1         = &zero,
>                         .extra2         = &one_hundred,
>         },

My comment/question was more abstract and focusing on the comparison
to vfs_cache_pressure.

:P
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0
  2012-09-10 17:07         ` Shentino
@ 2012-09-10 17:40           ` Shentino
  0 siblings, 0 replies; 8+ messages in thread
From: Shentino @ 2012-09-10 17:40 UTC (permalink / raw)
  To: Cong Wang; +Cc: linux-mm, stable

On Mon, Sep 10, 2012 at 10:07 AM, Shentino <shentino@gmail.com> wrote:
> On Mon, Sep 10, 2012 at 6:36 AM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
>> On Sun, 09 Sep 2012 at 18:03 GMT, Shentino <shentino@gmail.com> wrote:
>>>
>>> Just curious, but what theoretically would happen if someone were to
>>> want to set swappiness to 200 or something?
>>>
>>> Should it be sorta like vfs_cache_pressure?
>>>
>>
>>
>> How could it be set to 200? As 0~100 is valid:
>>
>>         {
>>                         .procname       = "swappiness",
>>                         .data           = &vm_swappiness,
>>                         .maxlen         = sizeof(vm_swappiness),
>>                         .mode           = 0644,
>>                         .proc_handler   = proc_dointvec_minmax,
>>                         .extra1         = &zero,
>>                         .extra2         = &one_hundred,
>>         },
>
> My comment/question was more abstract and focusing on the comparison
> to vfs_cache_pressure.

Just to be clear about what I meant.

Both swapping and reclaiming from dentry/inode caches both share the
common factor of being alternatives to reclaiming from page cache when
memory is tight.

So I was wondering how similiar in effect these two knobs should be.

One possible use case off the top of my head is a file server that
banks heavily on page cache and spends most of its runtime sending
file data over the network.  It might be overkill but swappiness > 100
might actually be beneficial here.  I have no numbers to back it up
though as it's a rough idea.

Sorry if I'm butting in on the subject but I was curious about the idea.

Also still learning how to pos tin general on the kernel lists, so
apologies if I've been rude or anything.

>
> :P
>>
>> --
>> To unsubscribe, send a message with 'unsubscribe linux-mm' in
>> the body to majordomo@kvack.org.  For more info on Linux MM,
>> see: http://www.linux-mm.org/ .
>> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-09-10 17:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5038E7AA.5030107@gmail.com>
2012-09-09 16:57 ` Consider for longterm kernels: mm: avoid swapping out with swappiness==0 Ben Hutchings
2012-09-09 17:15   ` Rik van Riel
2012-09-09 18:03     ` Shentino
2012-09-10 13:36       ` Cong Wang
2012-09-10 17:07         ` Shentino
2012-09-10 17:40           ` Shentino
2012-09-09 18:27     ` Ben Hutchings
2012-09-09 20:34     ` Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).