From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx131.postini.com [74.125.245.131]) by kanga.kvack.org (Postfix) with SMTP id AAC2B6B0062 for ; Sun, 9 Sep 2012 12:57:25 -0400 (EDT) Message-ID: <1347209830.7709.39.camel@deadeye.wl.decadent.org.uk> Subject: Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0 From: Ben Hutchings Date: Sun, 09 Sep 2012 17:57:10 +0100 In-Reply-To: <5038E7AA.5030107@gmail.com> References: <5038E7AA.5030107@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-wYhpxHhSKRlkiylv7G9Y" Mime-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton , Rik van Riel Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zdenek Kaspar , linux-mm@kvack.org --=-wYhpxHhSKRlkiylv7G9Y Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 2012-08-25 at 16:56 +0200, Zdenek Kaspar wrote: > Hi Greg, >=20 > http://git.kernel.org/?p=3Dlinux/kernel/git/torvalds/linux.git;a=3Dcommit= ;h=3Dfe35004fbf9eaf67482b074a2e032abb9c89b1dd >=20 > 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. >=20 > More details: https://lkml.org/lkml/2012/3/2/320 >=20 > Its included in 3.5, so could this be considered for -longterm kernels ? Andrew, Rik, does this seem appropriate for longterm? Ben. --=20 Ben Hutchings Time is nature's way of making sure that everything doesn't happen at once. --=-wYhpxHhSKRlkiylv7G9Y Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIVAwUAUEzKZue/yOyVhhEJAQoB2hAAjI0JBOCuzxGuFFbAgBkzT6EniYl0wyUP prVyB89lGXnaBP5Fxrd1oMkKZ0OG5vtWYvtRTOB1v1qTlfj3QpT9btGg/mQ3YrXs ECbo/aDj1XZS9o8ycxKeIXYbfVNU4qq0LrA4v/xxwAG2VZRySHNLVzwD20Kx9gTt Nmdv2tUtKjrDIQAH0RfrVoweeGYQHahztWUOyEaLjfE8HMEIsaQh1Ps/SNpfT7GO tenpdyGY2kagvxERtTte7GA05imhetRJHM+086v9A5kN8/kkwBnW7zz3WNm8vMN4 VxES+vH9WZNZTsIjm1EetgThbn4PF0AYWJLiSPazSqSairzB2Fiqkoa1MRbfCShw klRSvSJVAwPc1NaC2k417u0CR8upJYOV/lfi2f4McPtn6tJH6KUwxamJ1pKt6bAE UDdqQdInECjZ3ECdZgVJbdzuNIC/vRsOlxVwq/ZtsKrQXYPNStO832fVx2sNim10 nDpiZdxokYBOTcY9ycUBD9W2/AYYlyOUWa7nDnDNQUu+NoWRweOQqGzVy15jwWeU c721n5vWQgbFkETewi5WLSVcQfcxhUZkFRcbKtgVR5c5ssHFVTGkhW1uAcS+xptE lm7rtedmriDSgLDi7eWWyw3F4nuX+/DrMEYlB4H8JoRhPPZPXyG9EXPwvWSxtlTq TdbBqCpJF5w= =MsKa -----END PGP SIGNATURE----- --=-wYhpxHhSKRlkiylv7G9Y-- -- 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx148.postini.com [74.125.245.148]) by kanga.kvack.org (Postfix) with SMTP id AEE9F6B005D for ; Sun, 9 Sep 2012 13:16:11 -0400 (EDT) Message-ID: <504CCECF.9020104@redhat.com> Date: Sun, 09 Sep 2012 13:15:59 -0400 From: Rik van Riel MIME-Version: 1.0 Subject: Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0 References: <5038E7AA.5030107@gmail.com> <1347209830.7709.39.camel@deadeye.wl.decadent.org.uk> In-Reply-To: <1347209830.7709.39.camel@deadeye.wl.decadent.org.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Ben Hutchings Cc: Andrew Morton , Greg Kroah-Hartman , stable@vger.kernel.org, Zdenek Kaspar , linux-mm@kvack.org 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx161.postini.com [74.125.245.161]) by kanga.kvack.org (Postfix) with SMTP id 7387C6B005D for ; Sun, 9 Sep 2012 14:04:36 -0400 (EDT) Received: by iec9 with SMTP id 9so2375771iec.14 for ; Sun, 09 Sep 2012 11:04:35 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <504CCECF.9020104@redhat.com> References: <5038E7AA.5030107@gmail.com> <1347209830.7709.39.camel@deadeye.wl.decadent.org.uk> <504CCECF.9020104@redhat.com> From: Shentino Date: Sun, 9 Sep 2012 11:03:55 -0700 Message-ID: Subject: Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0 Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Rik van Riel Cc: Ben Hutchings , Andrew Morton , Greg Kroah-Hartman , stable@vger.kernel.org, Zdenek Kaspar , linux-mm@kvack.org On Sun, Sep 9, 2012 at 10:15 AM, 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. 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: email@kvack.org -- 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx178.postini.com [74.125.245.178]) by kanga.kvack.org (Postfix) with SMTP id D51AF6B005D for ; Sun, 9 Sep 2012 14:27:15 -0400 (EDT) Message-ID: <1347215223.7709.59.camel@deadeye.wl.decadent.org.uk> Subject: Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0 From: Ben Hutchings Date: Sun, 09 Sep 2012 19:27:03 +0100 In-Reply-To: <504CCECF.9020104@redhat.com> References: <5038E7AA.5030107@gmail.com> <1347209830.7709.39.camel@deadeye.wl.decadent.org.uk> <504CCECF.9020104@redhat.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-qo1euccM/K/4AbVvsPpC" Mime-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: Rik van Riel Cc: Andrew Morton , Greg Kroah-Hartman , stable@vger.kernel.org, Zdenek Kaspar , linux-mm@kvack.org --=-qo1euccM/K/4AbVvsPpC Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=3Dlinux/kernel/git/torvalds/linux.git;a=3Dcom= mit;h=3Dfe35004fbf9eaf67482b074a2e032abb9c89b1dd > >> > >> 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? >=20 > Yes, absolutely. Default behaviour is not changed at all, and > the patch makes swappiness=3D0 do what people seem to expect it > to do. OK, I've queued this up for 3.2. Ben. --=20 Ben Hutchings Time is nature's way of making sure that everything doesn't happen at once. --=-qo1euccM/K/4AbVvsPpC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIVAwUAUEzfd+e/yOyVhhEJAQqAxw/+O7PNZV1Sw9nlghBK2kGlUeIog84QRDta njwkxcjlDoGUEuAP7YlcS8+vrNfi5rr7axX33RVrOnuupu84RsSKNfr+6UEbY1F+ MojD9LQ79tZ7JNtemeLHAFc++TCGJuQZIYvqqMqNj7aGzldrOuWvOtLRVNqQUZB2 xVXSsB9LJ134w36tbIm7n/uFrbtVk9VsEpsZPwG7MSldwgWDCJiFM6iY3FzCTL5K 8JdEnvsPPVRaUaDd7/JioJwAoqkSy+mQDalFA81l0JDpy/sVALww3jLSV7lU9/it Xsd9xbDtK0e3ydNi1GYnW0Pknqa6qs69QLy/pKCOJEqDKIGeUnAjo8Zz8hEIL9Fc dkqkeahFasi69he6di+FeLsy/UWFwgZjcLYxz72t9WcLVhczMZjEsM6X5o1jvHka A2mXsyRas+8JOAYw/dBMVjAE1LuLvtpl7+5A3ZImQkLejnejqEEGm0BRUjW8jv1a g3+WvlYRuBc6HQYQ6kDaCHlcun1+Qn74wifFolW+1GdKQddysZxbBhONnN7CvSUS zFmWJTku1S1zUS0dDuD8qZBZVzabkbdtrWNzIqEsZb8oqZG99ySmcdOWCKX5tDCK PFWq0GiFlD5LDfSEH1cnd0mskIgRnwkAlT/BOfV4TuA4ogYe6opnQPnUGVJ+ONwL gTrSRhYm/0g= =Moan -----END PGP SIGNATURE----- --=-qo1euccM/K/4AbVvsPpC-- -- 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx179.postini.com [74.125.245.179]) by kanga.kvack.org (Postfix) with SMTP id C9C2D6B0062 for ; Sun, 9 Sep 2012 16:34:17 -0400 (EDT) Date: Sun, 9 Sep 2012 22:34:11 +0200 From: Willy Tarreau Subject: Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0 Message-ID: <20120909203411.GC13847@1wt.eu> References: <5038E7AA.5030107@gmail.com> <1347209830.7709.39.camel@deadeye.wl.decadent.org.uk> <504CCECF.9020104@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <504CCECF.9020104@redhat.com> Sender: owner-linux-mm@kvack.org List-ID: To: Rik van Riel Cc: Ben Hutchings , Andrew Morton , Greg Kroah-Hartman , stable@vger.kernel.org, Zdenek Kaspar , linux-mm@kvack.org 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx184.postini.com [74.125.245.184]) by kanga.kvack.org (Postfix) with SMTP id 008846B006C for ; Mon, 10 Sep 2012 09:36:38 -0400 (EDT) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TB4AJ-0000I7-SU for linux-mm@kvack.org; Mon, 10 Sep 2012 15:36:39 +0200 Received: from 112.132.200.126 ([112.132.200.126]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Sep 2012 15:36:39 +0200 Received: from xiyou.wangcong by 112.132.200.126 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Sep 2012 15:36:39 +0200 From: Cong Wang Subject: Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0 Date: Mon, 10 Sep 2012 13:36:25 +0000 (UTC) Message-ID: References: <5038E7AA.5030107@gmail.com> <1347209830.7709.39.camel@deadeye.wl.decadent.org.uk> <504CCECF.9020104@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: stable@vger.kernel.org On Sun, 09 Sep 2012 at 18:03 GMT, Shentino 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx158.postini.com [74.125.245.158]) by kanga.kvack.org (Postfix) with SMTP id 619BA6B0062 for ; Mon, 10 Sep 2012 13:08:05 -0400 (EDT) Received: by iagk10 with SMTP id k10so2569626iag.14 for ; Mon, 10 Sep 2012 10:08:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <5038E7AA.5030107@gmail.com> <1347209830.7709.39.camel@deadeye.wl.decadent.org.uk> <504CCECF.9020104@redhat.com> From: Shentino Date: Mon, 10 Sep 2012 10:07:24 -0700 Message-ID: Subject: Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0 Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Cong Wang Cc: linux-mm@kvack.org, stable@vger.kernel.org On Mon, Sep 10, 2012 at 6:36 AM, Cong Wang wrote: > On Sun, 09 Sep 2012 at 18:03 GMT, Shentino 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: email@kvack.org -- 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx167.postini.com [74.125.245.167]) by kanga.kvack.org (Postfix) with SMTP id 0B2746B0062 for ; Mon, 10 Sep 2012 13:41:09 -0400 (EDT) Received: by iagk10 with SMTP id k10so2603525iag.14 for ; Mon, 10 Sep 2012 10:41:09 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <5038E7AA.5030107@gmail.com> <1347209830.7709.39.camel@deadeye.wl.decadent.org.uk> <504CCECF.9020104@redhat.com> From: Shentino Date: Mon, 10 Sep 2012 10:40:28 -0700 Message-ID: Subject: Re: Consider for longterm kernels: mm: avoid swapping out with swappiness==0 Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Cong Wang Cc: linux-mm@kvack.org, stable@vger.kernel.org On Mon, Sep 10, 2012 at 10:07 AM, Shentino wrote: > On Mon, Sep 10, 2012 at 6:36 AM, Cong Wang wrote: >> On Sun, 09 Sep 2012 at 18:03 GMT, Shentino 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: email@kvack.org -- 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: email@kvack.org